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

#ifndef FRAME_FlashMapFH
#define FRAME_FlashMapFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Graphics.hpp>
#include "ImageBtn.h"
#include <ExtCtrls.hpp>
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxGroupBox.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "dxSkinBlack.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 "dxSkinMcSkin.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 "dxSkinsCore.hpp"
#include "dxSkinSeven.hpp"
#include "dxSkinSharp.hpp"
#include "dxSkinSilver.hpp"
#include "dxSkinStardust.hpp"
#include <ImgList.hpp>
#include "ShockwaveEx.hpp"
#include "ShockwaveFlashObjects_TLB.hpp"
#include <OleCtrls.hpp>
#include "CommFlashF.h"
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------

typedef void (*CALLBACK_FLASH)(TObject *ASender, const WideString request);

class TFRAMEFlashMap : public TFrame
{
__published:	// IDE-managed Components
    TcxGroupBox *GrpTool;
    TImageBtn *ImgPan;
    TImageBtn *ImgZoomIn;
    TImageBtn *ImgZoomOut;
    TImageBtn *ImgSel;
    TImageBtn *ImgStnd;
    TPanel *Panel5;
    TImage *ImgPan_n;
    TImage *ImgPan_c;
    TImage *ImgZoomOut_c;
    TImage *ImgZoomOut_n;
    TImage *ImgStnd_c;
    TImage *ImgStnd_n;
    TImage *ImgSel_c;
    TImage *ImgSel_n;
    TImage *ImgZoomIn_c;
    TImage *ImgZoomIn_n;
    TImageBtn *ImgRefresh;
    TImage *ImgRefresh_n;
    TImage *ImgRefresh_c;
    TLabel *LbDef;
    TImage *ImgSelect;
    TTimer *TmrSelect;
    TImageList *ImgGis;
    TPanel *Panel1;
    TShockwaveFlashEx *ShockwaveFlash1;
    TMemo *Memo1;
    TTimer *TmrInit;
    TStatusBar *StatusBar;
    void __fastcall OnGisOperationClick(TObject *Sender);
    void __fastcall ImgStndClick(TObject *Sender);
    void __fastcall ImgRefreshClick(TObject *Sender);
    void __fastcall TmrSelectTimer(TObject *Sender);
    void __fastcall ShockwaveFlash1FlashCall(TObject *ASender, const WideString request);
    void __fastcall FrameResize(TObject *Sender);
    void __fastcall TmrInitTimer(TObject *Sender);
    void __fastcall GrpToolDblClick(TObject *Sender);
    void __fastcall Memo1DblClick(TObject *Sender);

private:	// User declarations
    void __fastcall SetLinkLevel(int ALinkLevel);
    void __fastcall SetDrawMode(int ADrawMode);

    int     FLinkLevel;
    int     FDrawMode;
    bool    FMapInit;

public:
    bool    MapStart;
    bool    ModeSelect;
    bool    LoadTraffic;

    CALLBACK_FLASH  FlashCallbackFunc;

    void __fastcall LoadLocalSkin();
    void __fastcall LoadGisMap();

    //TDDPoint        m_ptSelect;
    void __fastcall SelectObjectByPos(double dPosX, double dPosY, bool bArrow=false);
    void __fastcall SelectObjectByPos();
    void __fastcall SelGisItem(int AType, String AId);
    void __fastcall LoadMap();

	void __fastcall OnCloseQuery(bool &CanClose);

    __property int  LinkLevel = {read = FLinkLevel, write=SetLinkLevel };
    __property int  DrawMode  = {read = FDrawMode,  write=SetDrawMode };

public:		// User declarations
    __fastcall TFRAMEFlashMap(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TFRAMEFlashMap *FRAMEFlashMap;
//---------------------------------------------------------------------------
#endif

