Game Develop Core: LayersEditorPanel.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
LayersEditorPanel.h
Go to the documentation of this file.
1
5 #if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
6 #ifndef EDITORLAYERS_H
7 #define EDITORLAYERS_H
8
9 //(*Headers(LayersEditorPanel)
10 #include <wx/listctrl.h>
11 #include <wx/sizer.h>
12 #include <wx/menu.h>
13 #include <wx/aui/aui.h>
14 #include <wx/panel.h>
15 #include <wx/imaglist.h>
16 //*)
17 #include "GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvasAssociatedEditor.h"
18 namespace gd { class LayoutEditorCanvas; }
19 namespace gd { class Project; }
20 namespace gd { class Layout; }
21 namespace gd { class Layer; }
22 #include "GDCore/IDE/Dialogs/MainFrameWrapper.h"
23
24 namespace gd
25 {
26
32 class GD_CORE_API LayersEditorPanel: public wxPanel, public gd::LayoutEditorCanvasAssociatedEditor
33 {
34 public:
35
36 LayersEditorPanel(wxWindow* parent, gd::Project & project_, gd::Layout & layout_, gd::MainFrameWrapper & mainFrameWrapper_);
37 virtual ~LayersEditorPanel();
38
42 void Refresh();
43
47 void SetAssociatedLayoutEditorCanvas(gd::LayoutEditorCanvas * layoutCanvas_) { layoutCanvas = layoutCanvas_; Refresh(); };
48
53 gd::LayoutEditorCanvas * GetAssociatedLayoutEditorCanvas() { return layoutCanvas; };
54
58 virtual bool Enable(bool enable=true) { return wxWindow::Enable(enable); };
59
60 protected:
61
62 //(*Identifiers(LayersEditorPanel)
63 static const long ID_AUITOOLBARITEM1;
64 static const long ID_AUITOOLBARITEM4;
65 static const long ID_AUITOOLBARITEM5;
66 static const long ID_AUITOOLBARITEM3;
67 static const long ID_AUITOOLBARITEM2;
68 static const long ID_AUITOOLBARITEM6;
69 static const long ID_AUITOOLBARITEM7;
70 static const long ID_AUITOOLBAR1;
71 static const long ID_PANEL3;
72 static const long ID_LISTCTRL1;
73 static const long idMenuEdit;
74 static const long idMenuAdd;
75 static const long idMenuDel;
76 static const long idMenuUp;
77 static const long idMenuDown;
78 //*)
79 static const long ID_BITMAPBUTTON1;
80 static const long ID_BITMAPBUTTON6;
81 static const long ID_BITMAPBUTTON3;
82
83 private:
84
85 //(*Handlers(LayersEditorPanel)
86 void OntoolBarPanelResize(wxSizeEvent& event);
87 void OnAddSelected(wxCommandEvent& event);
88 void OnDelSelected(wxCommandEvent& event);
89 void OnUpSelected(wxCommandEvent& event);
90 void OnDownSelected(wxCommandEvent& event);
91 void OnlayersListItemRClick(wxListEvent& event);
92 void OnlayersListItemSelect(wxListEvent& event);
93 void OnlayersListItemActivated(wxListEvent& event);
94 void OnEditSelected1(wxCommandEvent& event);
95 void OnlayersListItemSelect1(wxListEvent& event);
96 void OnlayersListItemFocused(wxListEvent& event);
97 void OnRefreshClick(wxCommandEvent& event);
98 void OnHelpClick(wxCommandEvent& event);
99 //*)
100 void UpdateSelectedLayerIcon();
101 void OnRefresh(wxCommandEvent& event);
102 void OnMoreOptions(wxCommandEvent& event);
103 void EditSelectedLayer();
104 void OnHelp(wxCommandEvent& event);
105 gd::Layer * GetSelectedLayer();
106
107 //(*Declarations(LayersEditorPanel)
108 wxAuiManager* AuiManager1;
109 wxAuiToolBar* toolbar;
110 wxMenuItem* MenuItem2;
111 wxMenuItem* MenuItem1;
112 wxListCtrl* layersList;
113 wxMenu contextMenu;
114 wxPanel* toolBarPanel;
115 wxImageList* imageList;
116 //*)
117
118 gd::Project & project;
119 gd::Layout & layout;
120 gd::LayoutEditorCanvas * layoutCanvas;
121 gd::MainFrameWrapper & mainFrameWrapper;
122
123 std::string layerSelected;
124
125 void CreateToolbar();
126
127 DECLARE_EVENT_TABLE()
128 };
129
130
131 }
132
133 #endif
134 #endif