xFRAME_OpenMapF.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. //---------------------------------------------------------------------------
  10. #include "cxButtons.hpp"
  11. #include "cxCheckBox.hpp"
  12. #include "cxContainer.hpp"
  13. #include "cxControls.hpp"
  14. #include "cxEdit.hpp"
  15. #include "cxGraphics.hpp"
  16. #include "cxLabel.hpp"
  17. #include "cxLookAndFeelPainters.hpp"
  18. #include "cxLookAndFeels.hpp"
  19. #include "cxTextEdit.hpp"
  20. #include "dxSkinBlack.hpp"
  21. #include "dxSkinBlue.hpp"
  22. #include "dxSkinCaramel.hpp"
  23. #include "dxSkinCoffee.hpp"
  24. #include "dxSkinDarkRoom.hpp"
  25. #include "dxSkinDarkSide.hpp"
  26. #include "dxSkinFoggy.hpp"
  27. #include "dxSkinGlassOceans.hpp"
  28. #include "dxSkiniMaginary.hpp"
  29. #include "dxSkinLilian.hpp"
  30. #include "dxSkinLiquidSky.hpp"
  31. #include "dxSkinLondonLiquidSky.hpp"
  32. #include "dxSkinMcSkin.hpp"
  33. #include "dxSkinMoneyTwins.hpp"
  34. #include "dxSkinOffice2007Black.hpp"
  35. #include "dxSkinOffice2007Blue.hpp"
  36. #include "dxSkinOffice2007Green.hpp"
  37. #include "dxSkinOffice2007Pink.hpp"
  38. #include "dxSkinOffice2007Silver.hpp"
  39. #include "dxSkinOffice2010Black.hpp"
  40. #include "dxSkinOffice2010Blue.hpp"
  41. #include "dxSkinOffice2010Silver.hpp"
  42. #include "dxSkinsCore.hpp"
  43. #include "dxSkinSeven.hpp"
  44. #include "dxSkinSharp.hpp"
  45. #include "dxSkinSilver.hpp"
  46. #include "dxSkinStardust.hpp"
  47. #include <Dialogs.hpp>
  48. #include <ExtCtrls.hpp>
  49. #include <ImgList.hpp>
  50. #include <Menus.hpp>
  51. #include <OleCtrls.hpp>
  52. #include <SHDocVw.hpp>
  53. //---------------------------------------------------------------------------
  54. #include "UJSExec.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. TWebBrowser *WebBrowser1;
  76. TPanel *PnlGisTool;
  77. TcxLabel *cxLabel1;
  78. TPanel *PnlLoading;
  79. TImage *ImgLoading;
  80. TcxLabel *lblTitle;
  81. TMemo *reMsg;
  82. TcxLabel *LblZoom;
  83. TTimer *TmrMapOpen;
  84. TcxButton *BtnMoveMapToFit;
  85. TcxCheckBox *ChkShowNmbr;
  86. TcxTextEdit *EdMapPos;
  87. TcxButton *BtnMapSelect;
  88. void __fastcall BtnMapToJpgClick(TObject *Sender);
  89. void __fastcall WebBrowser1DownloadComplete(TObject *Sender);
  90. void __fastcall BtnZoomInClick(TObject *Sender);
  91. void __fastcall BtnZoomOutClick(TObject *Sender);
  92. void __fastcall BtnZoomPrevClick(TObject *Sender);
  93. void __fastcall BtnZoomNextClick(TObject *Sender);
  94. void __fastcall BtnMoveDefBoundsClick(TObject *Sender);
  95. void __fastcall WebBrowser1BeforeNavigate2(TObject *ASender, const IDispatch *pDisp, OleVariant &URL, OleVariant &Flags,
  96. OleVariant &TargetFrameName, OleVariant &PostData, OleVariant &Headers, WordBool &Cancel);
  97. void __fastcall LblZoomDblClick(TObject *Sender);
  98. void __fastcall BtnRefreshClick(TObject *Sender);
  99. void __fastcall TmrMapOpenTimer(TObject *Sender);
  100. void __fastcall reMsgDblClick(TObject *Sender);
  101. void __fastcall BtnMapClickClick(TObject *Sender);
  102. void __fastcall BtnMoveMapToFitClick(TObject *Sender);
  103. void __fastcall ChkShowNmbrClick(TObject *Sender);
  104. void __fastcall PnlGisToolDblClick(TObject *Sender);
  105. void __fastcall BtnMapSelectClick(TObject *Sender);
  106. private: // User declarations
  107. void __fastcall SetLinkLevel(int ALinkLevel);
  108. String FHtmlFileName;
  109. TJSExec *fJSExec;
  110. bool FMapStart;
  111. int FMapZoom;
  112. double FCenterX;
  113. double FCenterY;
  114. int FLayerIdx;
  115. String FTitle;
  116. public:
  117. CALLBACK_MAP MapCallbackFunc;
  118. public:
  119. void __fastcall OnCloseQuery(bool &CanClose);
  120. void __fastcall LoadLocalSkin();
  121. void __fastcall OpenMap();
  122. void __fastcall LoadMap();
  123. void WriteLog(char *AFmt, ...);
  124. bool __fastcall ExecScript(String AScript);
  125. void __fastcall SelectObjectByPos(double dPosX, double dPosY, bool bArrow=false);
  126. bool __fastcall SelectLinkByPos(int X, int Y, String &ALinkId);
  127. bool __fastcall GetLevelLinkId(int ALinkLevel, String &sLinkId, int X, int Y);
  128. void __fastcall SelGisItem(int AType, String AId);
  129. public: // User declarations
  130. __fastcall TFRAMEOpenMap(TComponent* Owner);
  131. __property int LayerIdx = { read = FLayerIdx, write=FLayerIdx };
  132. __property bool MapStart = { read = FMapStart };
  133. __property int MapZoom = { read = FMapZoom };
  134. __property double CenterX = { read = FCenterX };
  135. __property double CenterY = { read = FCenterY };
  136. };
  137. //---------------------------------------------------------------------------
  138. //extern PACKAGE TFRAMEOpenMap *FRAMEOpenMap;
  139. //---------------------------------------------------------------------------
  140. #endif