//---------------------------------------------------------------------------

#ifndef VMSBACKMFH
#define VMSBACKMFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <DB.hpp>
#include <DBClient.hpp>
#include <Provider.hpp>
//---------------------------------------------------------------------------
#include "CenterCommF.h"
#include "DataTypesF.h"
#include "WindowMsgF.h"
#include "CDSVmsCtlrF.h"
#include "VMSFORM0F.h"
#include "VMSMODL0F.h"
#include "VMSVIEWMF.h"
//---------------------------------------------------------------------------
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <Buttons.hpp>
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxDropDownEdit.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxMaskEdit.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinMcSkin.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinCaramel.hpp"
#include "dxSkinCoffee.hpp"
#include "dxSkinDarkRoom.hpp"
#include "dxSkinDarkSide.hpp"
#include "dxSkinFoggy.hpp"
#include "dxSkinGlassOceans.hpp"
#include "dxSkiniMaginary.hpp"
#include "dxSkinLilian.hpp"
#include "dxSkinLiquidSky.hpp"
#include "dxSkinLondonLiquidSky.hpp"
#include "dxSkinMoneyTwins.hpp"
#include "dxSkinOffice2007Black.hpp"
#include "dxSkinOffice2007Blue.hpp"
#include "dxSkinOffice2007Green.hpp"
#include "dxSkinOffice2007Pink.hpp"
#include "dxSkinOffice2007Silver.hpp"
#include "dxSkinOffice2010Black.hpp"
#include "dxSkinOffice2010Blue.hpp"
#include "dxSkinOffice2010Silver.hpp"
#include "dxSkinSeven.hpp"
#include "dxSkinSharp.hpp"
#include "dxSkinSilver.hpp"
#include "dxSkinStardust.hpp"
//---------------------------------------------------------------------------

class TVMSBACKM : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TPanel *PnlClient;
    TScrollBox *ScrollBox;
    TFlowPanel *FpnlForm;
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall ScrollBoxClick(TObject *Sender);
    void __fastcall ScrollBoxMouseWheel(TObject *Sender, TShiftState Shift, int WheelDelta, TPoint &MousePos, bool &Handled);
    void __fastcall FormResize(TObject *Sender);
    void __fastcall FpnlFormClick(TObject *Sender);
    void __fastcall FormDestroy(TObject *Sender);
          
private:	// User declarations
    int     FDisplayMode;
    bool    FPlay;

public:
	TList      *FListForm;
    HWND        FWndParent;
    String      FScreenName;
    int         FScreenIndex;
    int         FViewWidth;

    int         FMinWidth, FMinHeight;
    int         FMaxWidth, FMaxHeight;

    int         FMonitoringType;

public:		// User declarations
    __fastcall TVMSBACKM(TComponent* AOwner, HWND AHandle, String ACaption, int AScreenIdx);

    void __fastcall ClearFormList();
    bool __fastcall AddVmsForm(String AVmsNmbr);
    void __fastcall RecalFormPosition();
    void __fastcall SetFormSize(int AWidth);

    void __fastcall  SetPlay(bool APlay);

    __property bool  Play = { read = FPlay, write = SetPlay };

    __property int   DisplayMode = { read = FDisplayMode, write = FDisplayMode };

    void __fastcall RefreshVmsStatus();
    void __fastcall RefreshVmsMessage();

    void __fastcall OnVmsSelectMessage(TMessage &Msg);
    void __fastcall OnVmsSelectDblClickMessage(TMessage &Msg);
	BEGIN_MESSAGE_MAP
        MESSAGE_HANDLER(WM_VMS_SELECT, TMessage, OnVmsSelectMessage)
        MESSAGE_HANDLER(WM_VMS_SELECT_DBLCLICK, TMessage, OnVmsSelectDblClickMessage)
    END_MESSAGE_MAP(TForm)
};
//---------------------------------------------------------------------------
//extern PACKAGE TVMSBACKM *VMSBACKM;
//---------------------------------------------------------------------------
#endif

