00001
00025 #ifndef INC_MGUI_DLG_LINKTOTILESET_H
00026 #define INC_MGUI_DLG_LINKTOTILESET_H
00027
00028 #ifndef INC_MGUI_DLGSHELL_H
00029 #include <mgui/dlgshell.h>
00030 #endif
00031
00032 #ifndef INC_MGUI_TOOLBAR_H
00033 #include <mgui/toolbar.h>
00034 #endif
00035
00036 #ifndef INC_MGUI_LISTBOX_H
00037 #include <mgui/listbox.h>
00038 #endif
00039
00040 #ifndef INC_MGUI_FORMLIST_H
00041 #include <mgui/formlist.h>
00042 #endif
00043
00044 #ifndef INC_MGUI_FORM_EDIT_TSD_H
00045 #include <mgui/formedittsd.h>
00046 #endif
00047
00048 #ifndef INC_MGUI_DLGGETOBJECTFILTER_H
00049 #include <mgui/dlggetobjectfilter.h>
00050 #endif
00051
00052 class FILEPATHLIST;
00053 namespace MGUI {
00054
00055 class FORM_LINKTOTILESET : public MGUI::FORM_COMPOSITE {
00056 public:
00057 FORM_LINKTOTILESET ();
00058 virtual ~FORM_LINKTOTILESET ();
00059
00060 static ERRVALUE RunJob (const FILEPATH& path);
00061
00063 ERRVALUE Create (
00064 MGUI::LAYOUT_PANE_BASE& ParentPane
00065 );
00066
00067 private:
00068 #ifndef GENERATING_DOXYGEN_OUTPUT
00069 enum COL {
00070 COL_TilesetName = 0,
00071 COL_Type,
00072 COL_MinLevel,
00073 COL_MaxLevel,
00074 COL_TypeID,
00075 COL_TilesetPath,
00076 COL_COUNT
00077 };
00078
00079 enum CMDID {
00080 CMDID_JobSave = 1,
00081 CMDID_JobQueue,
00082 CMDID_FileRun,
00083 CMDID_ItemsAdd,
00084 CMDID_ItemsRemoveSelected,
00085 CMDID_ItemsRemoveAll,
00086 CMDID_COUNT
00087 };
00088
00089 enum TILESET {
00090 TILESET_GoogleMaps = 1,
00091 TILESET_GoogleEarth = 2,
00092 TILESET_BingMaps = 3,
00093 TILESET_NASAWorldWind = 4
00094 };
00095
00096 class FOLDER_FILTER : public MGUI::DLG_GETOBJECT_FILTER {
00097 public:
00098 FOLDER_FILTER ();
00099 virtual ~FOLDER_FILTER ();
00100 private:
00101 virtual bool v_IsFolderSelectable (
00102 const FILEPATH& FolderPath,
00103 int position
00104 ) const;
00105 };
00106
00107 MGUI::CTRL_TOOLBAR m_ToolBar;
00108 MGUI::FORM_LIST m_TSDList;
00109 MGUI::CTRL_TOGGLEBUTTON m_TglAutoCreateTSD;
00110 MGUI::CTRL_TOGGLEBUTTON m_TglUseLowestLevel;
00111 MGUI::CTRL_TOGGLEBUTTON m_TglMakeTileMap;
00112 MGUI::FORM_EDIT_TSD m_FormEditTSD;
00113 MGUI::CTRL_PUSHBUTTON m_SaveBtn;
00114 MGUI::LAYOUT_BOOK m_Book;
00115 MGUI::LAYOUT_PAGE m_PageAuto;
00116 MGUI::LAYOUT_PAGE m_PageManual;
00117
00118 void CreateJob (bool held);
00119 void OnRunJob ();
00120 void OnSaveJob ();
00121
00122 ERRVALUE AddSrcItems ();
00123 ERRVALUE DoCmdRun ();
00124 ERRVALUE GetOutput (FILEPATHLIST& TSDPaths);
00125 bool OnClick (int itemnum, int fieldnum, const MGUI::POINT&, MGUI::POINTERBUTTON, MGUI::KEYSTATE);
00126 void OnPageInitAuto (MGUI::LAYOUT_PAGE& page);
00127 void OnPageInitManual (MGUI::LAYOUT_PAGE& page);
00128 void OnSaveTSD();
00129 void OnToolBar(MGUI::ID cmdid, bool state);
00130 void OnTglAutoCreate ();
00131 void RemoveSrcItemsSelected();
00132 void RemoveAllSrcItems();
00133 static ERRVALUE Run (
00134 const FILEPATH& FolderPath,
00135 const FILEPATH& TSDPath,
00136 TILESET Type,
00137 INT32 MinLevel,
00138 INT32 MaxLevel,
00139 bool ScanBottomOnly,
00140 bool MakeTileMap
00141 );
00142 void SetType (int itemnum, TILESET type);
00143 #endif // GENERATING_DOXYGEN_OUTPUT
00144 };
00145
00146 }
00147
00148 #endif