FRAME_OpenMapF.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. //---------------------------------------------------------------------------
  2. #ifndef FRAME_OpenMapFH
  3. #define FRAME_OpenMapFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <SHDocVw.hpp>
  10. //---------------------------------------------------------------------------
  11. #include "UJSExec.hpp"
  12. //---------------------------------------------------------------------------
  13. #include "cxButtons.hpp"
  14. #include "cxCheckBox.hpp"
  15. #include "cxContainer.hpp"
  16. #include "cxControls.hpp"
  17. #include "cxEdit.hpp"
  18. #include "cxGraphics.hpp"
  19. #include "cxLabel.hpp"
  20. #include "cxLookAndFeelPainters.hpp"
  21. #include "cxLookAndFeels.hpp"
  22. #include "cxTextEdit.hpp"
  23. #include "dxSkinBlue.hpp"
  24. #include "dxSkinsCore.hpp"
  25. #include <Dialogs.hpp>
  26. #include <ExtCtrls.hpp>
  27. #include <ImgList.hpp>
  28. #include <Menus.hpp>
  29. #include <OleCtrls.hpp>
  30. #include "dxSkinBlack.hpp"
  31. #include "dxSkinCaramel.hpp"
  32. #include "dxSkinCoffee.hpp"
  33. #include "dxSkinDarkRoom.hpp"
  34. #include "dxSkinDarkSide.hpp"
  35. #include "dxSkinFoggy.hpp"
  36. #include "dxSkinGlassOceans.hpp"
  37. #include "dxSkiniMaginary.hpp"
  38. #include "dxSkinLilian.hpp"
  39. #include "dxSkinLiquidSky.hpp"
  40. #include "dxSkinLondonLiquidSky.hpp"
  41. #include "dxSkinMcSkin.hpp"
  42. #include "dxSkinMoneyTwins.hpp"
  43. #include "dxSkinOffice2007Black.hpp"
  44. #include "dxSkinOffice2007Blue.hpp"
  45. #include "dxSkinOffice2007Green.hpp"
  46. #include "dxSkinOffice2007Pink.hpp"
  47. #include "dxSkinOffice2007Silver.hpp"
  48. #include "dxSkinOffice2010Black.hpp"
  49. #include "dxSkinOffice2010Blue.hpp"
  50. #include "dxSkinOffice2010Silver.hpp"
  51. #include "dxSkinSeven.hpp"
  52. #include "dxSkinSharp.hpp"
  53. #include "dxSkinSilver.hpp"
  54. #include "dxSkinStardust.hpp"
  55. //---------------------------------------------------------------------------
  56. typedef void (*CALLBACK_MAP)(TObject *ASender, const String AFunc, const String AArgs, const bool AFirst);
  57. //---------------------------------------------------------------------------
  58. class TFRAMEOpenMap : public TFrame
  59. {
  60. __published: // IDE-managed Components
  61. TPanel *PnlToolbar;
  62. TcxButton *BtnMapToJpg;
  63. TcxButton *BtnZoomIn;
  64. TcxButton *BtnZoomOut;
  65. TcxButton *BtnRefresh;
  66. TEdit *EdFocus;
  67. TcxButton *BtnMoveDefBounds;
  68. TcxButton *BtnZoomPrev;
  69. TcxButton *BtnZoomNext;
  70. TcxButton *BtnMapClick;
  71. TcxLabel *cxLabel26;
  72. TcxLabel *cxLabel27;
  73. TSaveDialog *SaveDialog1;
  74. TcxImageList *ilToolbarsSmall;
  75. TPanel *PnlGisTool;
  76. TcxLabel *cxLabel1;
  77. TPanel *PnlLoading;
  78. TImage *ImgLoading;
  79. TcxLabel *lblTitle;
  80. TMemo *reMsg;
  81. TcxLabel *LblZoom;
  82. TTimer *TmrMapOpen;
  83. TcxButton *BtnMoveMapToFit;
  84. TcxCheckBox *ChkShowNmbr;
  85. TcxTextEdit *EdMapPos;
  86. TcxButton *BtnMapSelect;
  87. TImage *Image1;
  88. TPanel *PnlMap;
  89. TWebBrowser *WebBrowser1;
  90. void __fastcall BtnMapToJpgClick(TObject *Sender);
  91. void __fastcall WebBrowser1DownloadComplete(TObject *Sender);
  92. void __fastcall BtnZoomInClick(TObject *Sender);
  93. void __fastcall BtnZoomOutClick(TObject *Sender);
  94. void __fastcall BtnZoomPrevClick(TObject *Sender);
  95. void __fastcall BtnZoomNextClick(TObject *Sender);
  96. void __fastcall BtnMoveDefBoundsClick(TObject *Sender);
  97. void __fastcall WebBrowser1BeforeNavigate2(TObject *ASender, const IDispatch *pDisp, OleVariant &URL, OleVariant &Flags,
  98. OleVariant &TargetFrameName, OleVariant &PostData, OleVariant &Headers, WordBool &Cancel);
  99. void __fastcall LblZoomDblClick(TObject *Sender);
  100. void __fastcall BtnRefreshClick(TObject *Sender);
  101. void __fastcall TmrMapOpenTimer(TObject *Sender);
  102. void __fastcall reMsgDblClick(TObject *Sender);
  103. void __fastcall BtnMapClickClick(TObject *Sender);
  104. void __fastcall BtnMoveMapToFitClick(TObject *Sender);
  105. void __fastcall ChkShowNmbrClick(TObject *Sender);
  106. void __fastcall PnlGisToolDblClick(TObject *Sender);
  107. void __fastcall BtnMapSelectClick(TObject *Sender);
  108. private: // User declarations
  109. void __fastcall SetLinkLevel(int ALinkLevel);
  110. String FHtmlFileName;
  111. TJSExec *fJSExec;
  112. bool FMapStart;
  113. int FMapZoom;
  114. double FCenterX;
  115. double FCenterY;
  116. int FLayerIdx;
  117. String FTitle;
  118. public:
  119. CALLBACK_MAP MapCallbackFunc;
  120. public:
  121. void __fastcall OnCloseQuery(bool &CanClose);
  122. void __fastcall LoadLocalSkin();
  123. void __fastcall OpenMap();
  124. void __fastcall LoadMap();
  125. void WriteLog(char *AFmt, ...);
  126. bool __fastcall ExecScript(String AScript);
  127. void __fastcall SelectObjectByPos(double dPosX, double dPosY, bool bArrow=false);
  128. bool __fastcall SelectLinkByPos(int X, int Y, String &ALinkId);
  129. bool __fastcall GetLevelLinkId(int ALinkLevel, String &sLinkId, int X, int Y);
  130. void __fastcall SelGisItem(int AType, String AId);
  131. public: // User declarations
  132. __fastcall TFRAMEOpenMap(TComponent* Owner);
  133. __property int LayerIdx = { read = FLayerIdx, write=FLayerIdx };
  134. __property bool MapStart = { read = FMapStart };
  135. __property int MapZoom = { read = FMapZoom };
  136. __property double CenterX = { read = FCenterX };
  137. __property double CenterY = { read = FCenterY };
  138. };
  139. //---------------------------------------------------------------------------
  140. //extern PACKAGE TFRAMEOpenMap *FRAMEOpenMap;
  141. //---------------------------------------------------------------------------
  142. #endif