Game Develop Core: ChooseObjectDialog.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
ChooseObjectDialog.h
Go to the documentation of this file.
1
5 #if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
6
7 #ifndef GDCORE_CHOOSEOBJECTDIALOG_H
8 #define GDCORE_CHOOSEOBJECTDIALOG_H
9
10 #include <string>
11 #include <vector>
12 //(*Headers(ChooseObjectDialog)
13 #include <wx/treectrl.h>
14 #include <wx/sizer.h>
15 #include <wx/menu.h>
16 #include <wx/textctrl.h>
17 #include <wx/statline.h>
18 #include <wx/button.h>
19 #include <wx/dialog.h>
20 //*)
21 #include <wx/imaglist.h>
22 #include <wx/srchctrl.h>
23 namespace gd { class Project; }
24 namespace gd { class Layout; }
25
26 namespace gd
27 {
28
34 class GD_CORE_API ChooseObjectDialog: public wxDialog
35 {
36 public:
37
47 ChooseObjectDialog(wxWindow* parent,
48 Project & project,
49 gd::Layout & layout,
50 bool canSelectGroup = true,
51 std::string onlyObjectOfType_ = "",
52 bool allowMultipleSelection_ = false);
53
54 virtual ~ChooseObjectDialog();
55
59 const std::string & GetChosenObject() const { return objectChosen; }
60
64 const std::vector <std::string> & GetChosenObjects() const { return objectsChosen; }
65
66 //(*Declarations(ChooseObjectDialog)
67 wxMenu Menu2;
68 wxMenu Menu1;
69 wxSearchCtrl* searchCtrl;
70 wxMenuItem* MenuItem1;
71 wxMenuItem* MenuItem4;
72 wxTreeCtrl* objectsList;
73 wxButton* ChoisirBt;
74 wxMenuItem* editGroupMenuItem;
75 wxStaticLine* StaticLine1;
76 wxButton* AnnulerBt;
77 wxMenuItem* editMenuItem;
78 //*)
79
80
81 protected:
82
83 //(*Identifiers(ChooseObjectDialog)
84 static const long ID_TREECTRL1;
85 static const long ID_TEXTCTRL1;
86 static const long ID_STATICLINE1;
87 static const long ID_BUTTON1;
88 static const long ID_BUTTON2;
89 static const long ID_MENUITEM2;
90 static const long ID_MENUITEM1;
91 static const long ID_MENUITEM3;
92 static const long ID_MENUITEM4;
93 //*)
94
95 private:
96
97 //(*Handlers(ChooseObjectDialog)
98 void OnObjetsListSelectionChanged(wxTreeEvent& event);
99 void OnChoisirBtClick(wxCommandEvent& event);
100 void OnAnnulerBtClick(wxCommandEvent& event);
101 void OnAucunBtClick(wxCommandEvent& event);
102 void OnObjetsListItemRightClick(wxTreeEvent& event);
103 void OnGroupesListSelectionChanged(wxTreeEvent& event);
104 void OnObjetsListItemActivated(wxTreeEvent& event);
105 void OnGroupesListItemRightClick(wxTreeEvent& event);
106 void OnGroupesListItemActivated(wxTreeEvent& event);
107 void OnglobalObjectsListSelectionChanged(wxTreeEvent& event);
108 void OnglobalObjectsListItemRightClick(wxTreeEvent& event);
109 void OnglobalObjectsListItemActivated(wxTreeEvent& event);
110 void OnglobalObjectGroupsItemActivated(wxTreeEvent& event);
111 void OnglobalObjectGroupsSelectionChanged(wxTreeEvent& event);
112 void OnglobalObjectGroupsItemRightClick(wxTreeEvent& event);
113 void OnsearchCtrlText(wxCommandEvent& event);
114 //*)
115
119 void Refresh();
120
121 wxTreeItemId item;
122 wxTreeItemId itemGroups;
123 wxTreeItemId itemGlobal;
124 wxTreeItemId itemGlobalGroups;
125
126 Project & project;
127 gd::Layout & layout;
128
129 std::string objectChosen;
130 std::vector <std::string> objectsChosen;
131
132 wxImageList * imageList;
133 std::string onlyObjectOfType;
134 bool allowMultipleSelection;
135 bool canSelectGroup;
136
137 DECLARE_EVENT_TABLE()
138 };
139
140 }
141 #endif
142 #endif