MyGUI 3.2.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_ControllerManager.h
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_CONTROLLER_MANAGER_H__
23 #define __MYGUI_CONTROLLER_MANAGER_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Singleton.h"
27 #include "MyGUI_ControllerItem.h"
28 #include "MyGUI_IUnlinkWidget.h"
29 #include "MyGUI_WidgetDefines.h"
30 #include "MyGUI_ActionController.h"
31
32 namespace MyGUI
33 {
34
35 class MYGUI_EXPORT ControllerManager :
36 public Singleton<ControllerManager>,
37 public IUnlinkWidget
38 {
39 public:
40 ControllerManager();
41
42 void initialise();
43 void shutdown();
44
48 ControllerItem* createItem(const std::string& _type);
49
57 void addItem(Widget* _widget, ControllerItem* _item);
58
62 void removeItem(Widget* _widget);
63
64 private:
65 void _unlinkWidget(Widget* _widget);
66 void frameEntered(float _time);
67 void clear();
68
69 private:
70 typedef std::pair<Widget*, ControllerItem*> PairControllerItem;
71 typedef std::list<PairControllerItem> ListControllerItem;
72 ListControllerItem mListItem;
73
74 bool mIsInitialise;
75 };
76
77 } // namespace MyGUI
78
79 #endif // __MYGUI_CONTROLLER_MANAGER_H__
MyGUI::Widget
Definition: MyGUI_Widget.h:41
MyGUI_Prerequest.h
MyGUI_ActionController.h
MyGUI_Singleton.h
MyGUI_WidgetDefines.h
MyGUI::IUnlinkWidget
Definition: MyGUI_IUnlinkWidget.h:31
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::ControllerManager
Definition: MyGUI_ControllerManager.h:35
MyGUI::ControllerItem
Definition: MyGUI_ControllerItem.h:34
MyGUI::Singleton
Definition: MyGUI_Singleton.h:35
MyGUI_ControllerItem.h
MyGUI_IUnlinkWidget.h