Game Develop Core: MainFrameWrapper.h Source File

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
MainFrameWrapper.h
Go to the documentation of this file.
1
5 #if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
6 #ifndef MAINFRAMEWRAPPER_H
7 #define MAINFRAMEWRAPPER_H
8 #include <algorithm>
9 #include <vector>
10 #include <wx/infobar.h> //Strangely needed
11 class wxTopLevelWindow;
12 class wxWindow;
13 class wxRibbonBar;
14 class wxRibbonButtonBar;
15 class wxAuiManager;
16 class wxAuiNotebook;
17
18 namespace gd
19 {
20
24 class GD_CORE_API MainFrameWrapper
25 {
26 public:
30 MainFrameWrapper(wxRibbonBar * ribbon_,
31 wxRibbonButtonBar * ribbonSceneEditorButtonBar_,
32 wxTopLevelWindow * mainEditor_,
33 wxAuiManager * paneManager_,
34 wxAuiNotebook * editorsNotebook_,
35 wxInfoBar * infoBar_,
36 std::vector<wxWindow*> * scenesLockingShortcuts_,
37 const wxString & workingDirectory_) :
38 ribbon(ribbon_),
39 ribbonSceneEditorButtonBar(ribbonSceneEditorButtonBar_),
40 mainEditor(mainEditor_),
41 paneManager(paneManager_),
42 editorsNotebook(editorsNotebook_),
43 infoBar(infoBar_),
44 scenesLockingShortcuts(scenesLockingShortcuts_),
45 workingDirectory(workingDirectory_)
46 {
47 };
48
49 virtual ~MainFrameWrapper() {};
50
54 wxRibbonBar * GetRibbon() const { return ribbon; };
55
59 wxRibbonButtonBar * GetRibbonSceneEditorButtonBar() const { return ribbonSceneEditorButtonBar; };
60
64 wxAuiManager & GetPaneManager() const { return *paneManager; };
65
69 wxTopLevelWindow * GetMainEditor() const { return mainEditor; };
70
74 void LockShortcuts(wxWindow * window) { scenesLockingShortcuts->push_back(window); }
75
79 void UnLockShortcuts(wxWindow * window)
80 {
81 scenesLockingShortcuts->erase(std::remove(scenesLockingShortcuts->begin(), scenesLockingShortcuts->end(), window), scenesLockingShortcuts->end());
82 }
83
87 wxInfoBar * GetInfoBar() const { return infoBar; };
88
92 wxAuiNotebook * GetEditorsNotebook() { return editorsNotebook; }
93
97 wxString GetIDEWorkingDirectory() const { return workingDirectory; }
98
102 void DisableControlsForScenePreviewing();
103
107 void EnableControlsAfterScenePreviewing() { for (unsigned int i = 0;i<disableOnPreview.size();++i) disableOnPreview[i]->Enable(); };
108
112 void AddControlToBeDisabledOnPreview(wxWindow * control) { if ( find(disableOnPreview.begin(), disableOnPreview.end(), control) == disableOnPreview.end() ) disableOnPreview.push_back(control); }
113
117 void RemoveControlToBeDisabledOnPreview(wxWindow * control);
118
119 private:
120
121 wxRibbonBar * ribbon;
122 wxRibbonButtonBar * ribbonSceneEditorButtonBar;
123 wxTopLevelWindow * mainEditor;
124 wxAuiManager * paneManager;
125 wxAuiNotebook * editorsNotebook;
126 wxInfoBar * infoBar;
127 std::vector<wxWindow*> * scenesLockingShortcuts;
128 std::vector<wxWindow*> disableOnPreview;
129 wxString workingDirectory;
130 };
131
132 }
133
134 #endif // MAINFRAMEWRAPPER_H
135 #endif