4 #include <wx/notebook.h>
8 #include "common__tools.h"
9 #include "common__modalsFrames.h"
15 * The application central start and end of the program
20 class MyApp
: public wxApp
24 wxString autoLoadFrame
;
28 virtual bool OnInit();
36 * The main Window for the Application
39 class StartFrame
: public wxFrame
42 StartFrame(const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
);
43 void ShowEntityFrame();
46 void OnEditEntities(wxCommandEvent
& event
);
47 void OnLoadStages(wxCommandEvent
& event
);
48 void OnCheckAutoLoad(wxCommandEvent
& event
);
50 void evtClose( wxCloseEvent
& );
51 void EvtActivate( wxActivateEvent
& );
53 void OnQuit(wxCommandEvent
& event
);
54 void OnAbout(wxCommandEvent
& event
);
55 void OnAddProject(wxCommandEvent
& event
);
56 void OnDelProject(wxCommandEvent
& event
);
57 void OnRenameProject(wxCommandEvent
& event
);
58 void OnChgDirProject(wxCommandEvent
& event
);
59 void OnRepairWindaubePath(wxCommandEvent
& WXUNUSED(event
));
60 void OnSetEditor(wxCommandEvent
& event
);
62 bool LoadCurrentProject_Models();
63 bool LoadCurrentProject_Levels();
65 wxListBox
*lstBx_projects
;
66 wxCheckBox
*chckbx_autoLoad
;
68 bool b_reset_entityFrame
;
70 wxString frame_launched
;
73 extern StartFrame
*startFrame
;
77 * The Window where to edit entity properties and animations.
79 class Panel_withAnims
;
81 class EntityFrame
: public wxFrame
84 EntityFrame(wxWindow
*_parent
, const wxString
& title
);
87 void OnEditEntities(wxCommandEvent
& event
);
88 void OnLoadStages(wxCommandEvent
& event
);
90 void OnQuit(wxCommandEvent
& event
);
91 void OnAbout(wxCommandEvent
& event
);
93 void EvtUndo(wxCommandEvent
& event
);
94 void EvtRedo(wxCommandEvent
& event
);
96 void EvtResize( wxSizeEvent
& event
);
97 void EvtClose( wxCloseEvent
& event
);
98 void EvtActivate( wxActivateEvent
& );
99 void EvtMenu(wxCommandEvent
& event
);
100 void EvtCharPress(wxKeyEvent
& event
);
102 void Reload_Frames();
104 void PanelPageChanging(wxNotebookEvent
& event
);
105 void SetPanelErrorsIntitule( const wxString
& new_intitule
);
107 Panel_withAnims
* GetCurrentPanel();
113 int entitySelection_time
; //Keep a trace of change of selected entity
114 int entityLastSelection_time
;
118 std::map
<wxString
,wxString
> map_ent_animHistory
;
119 void EntityAnimsHistory__Append(const wxString
& _ent_name
);
120 void EntityAnimsHistory__Clear();
123 void Menu_DoRedos__Update_Labels(std::list
<History_Group
*>::iterator it_group
);
124 void Restore_ControlsState( void* pStates
);
125 bool May_Register_ControlsState();
126 void Register_ControlsState_inHistory( const wxString
& f_caller
);
127 void Set_ControlsState_In( void* elt_datas
);
132 std::vector
<wxString
> vect_ent_history
;
135 DECLARE_EVENT_TABLE()
137 extern EntityFrame
*entityFrame
;
142 * Level Editor window.
145 class LevelEditorFrame
;
146 extern LevelEditorFrame
*leFrame
;
150 * Enumeration of ID for StartFrame
161 ID_LOAD_STAGES
= 104,
162 ID_EDIT_ENTITIES
= 105,
164 ID_LIST_PROJECTS
= 106,
165 ID_ADD_PROJECT
= 107,
166 ID_DEL_PROJECT
= 108,
167 ID_RENAME_PROJECT
= 109,
168 ID_CHGDIR_PROJECT
= 110,
170 ID_WND_CHG_PJCT_NAME
= 111,
171 ID_REPAIR_FILEPATHS
= 112,
173 ID_ENTITIES_CURR_SAVE
= 234,
174 ID_ENTITIES_CURR_RELOAD
= 235,
175 ID_ENTITIES_SAVEALL
= 236,
176 ID_ENTITIES_RELOADALL
= 237,
177 ID_ENTITIES_RELOAD_MODELSTXT
= 238,
179 ID_ENTITIES_RELOAD_GIFS
= 239,
180 ID_HELP_PLEASE
= 240,
182 ID_OPEN_IN_EDITOR
= 242,
183 ID_BACK_TO_STARTFRAME
= 243,
185 ID_LEVEL_FIRST_ID
= 244,
187 * RESERVED To Stages ID in menu
194 ID_STAGE_EDIT_SETTINGS
= 302,
196 ID_STAGE_RELOAD
= 303,
197 ID_STAGE_RELOAD_ALL
= 304,
199 ID_STAGE_SAVE
= 3003,
200 ID_STAGE_SAVE_ALL
= 3004,
202 ID_OBJECT_COPY
= 3005,
203 ID_OBJECT_SUPP
= 3006,
204 ID_OBJECT_PROPERTIES
= 3007,
205 ID_OBJECT_SORT_AT_OBJECTS
= 3008,
207 ID_STAGE_LOADED_ENTITIES
= 308,
210 ID_SCENE_BG_LIST_START
= 311,
211 /* RESERVED TO 349 */
212 ID_SCENE_BG_EDIT_ORDER
= 350,
214 ID_SCENE_PANELS_LIST_START
= 360,
215 /* RESERVED TO 399 */
216 ID_SCENE_PANELS_EDIT_ORDER
= 400,
218 ID_SCENE_WATER
= 401,
219 ID_SCENE_FRONTPANEL
= 402,
221 ID_SCENE_MENU_BG
= 404,
222 ID_SCENE_MENU_PANELS
= 405,
225 ID_STAGE_LIST_START
= 410,
226 /* RESERVED TO 499 */
229 ID_SET_LIST_START
= 501,
230 /* RESERVED TO 549 */
232 ID_SET_EDIT_SETTINGS
= 551,
234 ID_LEVELSTXT_SAVE
= 552,
235 ID_OPEN_LEVELSTXT_IN_EDITOR
= 553,
237 ID_SET_EDIT_EXTENDED_PROPS
= 554,
238 ID_STAGE_EDIT_EXTENDED_PROPS
= 555,
239 ID_OBJECT_EDIT_EXTENDED_PROPS
= 556,
240 ID_STAGE_EDIT_DECLARE_SETTINGS
= 557,
242 ID_SCENE_FRONTPANEL_ORDER
= 559,
243 ID_SCENE_FRONTPANEL_LIST_START
= 560,
244 /* RESERVED TO 599 */
246 ID_SCENE_BG_ADD
= 600,
247 ID_SCENE_PANELS_ADD
= 601,
250 ID_ENTITIES_HISTORY_CLEAR
= 610,
251 ID_ENTITIES_HISTORY_START
= 620,
252 /* RESERVED TO 640 */
262 #endif /*OB_EDITOR_H_*/