(*
*******************************************************************************
*         Copyright (C) SofCon 2003 All Rights Reserved                       *
*******************************************************************************
*
*    project:     Vizualizacni knihovny pro jednotku KIT
*
*
*    title:       ofscus
*
*******************************************************************************
*
*    description: Customizacni procedura pro terminaly, ktere maji
*                 primo mapovany display do VideoRAM (priznak ofFlickSafe)
*
*    version:     0.01
*
*     (vyse uvedena verze je pouze verze teto knihovny, ktera
*      je soucasti baliku LIBV, jehoz verze je uvedena v knihovne
*      Iodrv.pas)
*
*    language:    Borland Pascal
*
*    author:      Binko
*    history:     date        sign   remark
*                 06/09/04    bin     prvni vydani
*
*****************************************************************************
*)

unit ofscus;

interface

implementation

uses controls, grctrls;

{-------------------------------
{ FlickSafeCustomizeProc
{---
{ Konfiguracni procedura pro vsechny komponenty definovane
{ v jednotka VMenu a GrMenu. Procedura konfiguruje komponenty
{ tak, aby byly vhodne zobrazeny a reagovaly spravne na
{ vstupni udalosti terminalu Term10 }
{---
{ AControl   Odkaz na instanci komponenty
{ AClass     Kod tridy konfigurace
{---
{ AClass musi odpovidat tride komponenty, jinak
{ volani funkce muze zpusobit nepredvidatelne nasledky.
}

procedure FlickSafeCustomizeProc( AControl: PControl; AClass: Word ); far;
begin
  case AClass and ccGeneralMask of

  {----------------- TWindow }
    ccWindow:
    begin
      with PWindow( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TFrame }
    ccFrame:
    begin
      with PFrame( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TDialog }
    ccDialog:
    begin
      with PDialog( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TPageControl }
    ccPageControl:
    begin
      with PPageControl( AControl )^ do
      begin
      end;
    end;

  {----------------- TPage }
    ccPage:
    begin
      with PPage( AControl )^ do
      begin
      end;
    end;

  {----------------- TApplication }
    ccApplication:
    begin
      with PApplication( AControl )^ do
      begin
      end;
    end;


  {----------------- TButton }
    ccButton:
    begin
      with PButton( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TEdit }
    ccEdit:
    begin
      with PEdit( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TListBox }
    ccListBox:
    begin
      with PListBox( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TListView }
    ccListView:
    begin
      with PListView( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;


  {----------------- TListEdit }
    ccListEdit:
    begin
      with PListEdit( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TNavigator }
    ccNavigator:
    begin
      with PNavigator( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TProgressBar }
    ccProgressBar:
    begin
      with PProgressBar( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TScrollBar }
    ccScrollBar:
    begin
      with PScrollBar( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TTrackBar }
    ccTrackBar:
    begin
      with PTrackBar( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TUpDown }
    ccUpDown:
    begin
      with PUpDown( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TStaticText }
    ccStaticText:
    begin
      with PStaticText( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TPaintBox }
    ccPaintBox:
    begin
      with PPaintBox( AControl )^ do
      begin
      end;
    end;

  {----------------- TImage }
    ccImage:
    begin
      with PImage( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 )
      end;
    end;

  {----------------- TKeyPad }
    ccKeyPad:
    begin
      with PKeyPad( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 )
      end;
    end;

  {----------------- TMenuBar }
    ccMenuBar:
    begin
      with PMenuBar( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 )
      end;
    end;

  {----------------- TMenuBox }
    ccMenuBox:
    begin
      with PMenuBar( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 )
      end;
    end;

  {----------------- TMenuOverlay }
    ccMenuOverlay:
    begin
      with PMenuOverlay( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TMenuPopup }
    ccMenuPopup:
    begin
      with PMenuPopup( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 );
      end;
    end;

  {----------------- TDeskTop }
    ccDeskTop:
    begin
      with PDeskTop( AControl )^ do
      begin
        SetOptions( ofFlickSafe, 0 ); { muze se zdat podivne, ale nevadi }
      end;
    end;


  else
    { Invalid class }
  end;
end;



begin
  RegisterCustomizeProc( FlickSafeCustomizeProc, cplDefault );
end.
