MyGUI: MyGUI_PointerManager.h Source File

MyGUI 3.4.2

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

- File List
- Globals

MyGUI_PointerManager.h
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#ifndef MYGUI_POINTER_MANAGER_H_
8#define MYGUI_POINTER_MANAGER_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Singleton.h"
12#include "MyGUI_IUnlinkWidget.h"
13#include "MyGUI_ImageBox.h"
14#include "MyGUI_IPointer.h"
15#include "MyGUI_BackwardCompatibility.h"
16
17namespace MyGUI
18{
19
20 class MYGUI_EXPORT PointerManager :
21 public IUnlinkWidget,
22 public MemberObsolete<PointerManager>
23 {
24 MYGUI_SINGLETON_DECLARATION(PointerManager);
25 public:
26 PointerManager();
27
28 void initialise();
29 void shutdown();
30
32 void setVisible(bool _visible);
34 bool isVisible() const;
35
39 void setPointer(const std::string& _name);
41 void resetToDefaultPointer();
42
44 const std::string& getDefaultPointer() const;
46 void setDefaultPointer(const std::string& _value);
47
49 const std::string& getLayerName() const;
51 void setLayerName(const std::string& _value);
52
54 IPointer* getByName(const std::string& _name) const;
55
56 /*events:*/
61 delegates::CMultiDelegate1<const std::string&> eventChangeMousePointer;
62
63 private:
64 void _unlinkWidget(Widget* _widget) override;
65 void _load(xml::ElementPtr _node, const std::string& _file, Version _version);
66
67 // создает виджет
68 Widget* baseCreateWidget(WidgetStyle _style, const std::string& _type, const std::string& _skin, const IntCoord& _coord, Align _align, const std::string& _layer, const std::string& _name);
69
70 // удаляет всех детей
71 void _destroyAllChildWidget();
72
73 void Update();
74
75 void notifyFrameStart(float _time);
76 void notifyChangeMouseFocus(Widget* _widget);
77 void setPointer(const std::string& _name, Widget* _owner);
78
79 private:
80 // вектор всех детей виджетов
81 VectorWidgetPtr mWidgetChild;
82
83 std::string mDefaultName;
84 IntPoint mPoint;
85 IntPoint mOldPoint;
86 bool mVisible;
87 std::string mLayerName;
88 std::string mSkinName;
89
90 Widget* mWidgetOwner;
91 ImageBox* mMousePointer;
92 IPointer* mPointer;
93 std::string mCurrentMousePointer;
94
95 bool mIsInitialise;
96 std::string mXmlPointerTagName;
97 std::string mXmlPropertyTagName;
98 std::string mXmlDefaultPointerValue;
99 };
100
101} // namespace MyGUI
102
103#endif // MYGUI_POINTER_MANAGER_H_
MyGUI_BackwardCompatibility.h
MyGUI_IPointer.h
MyGUI_IUnlinkWidget.h
MyGUI_ImageBox.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_Singleton.h
MYGUI_SINGLETON_DECLARATION
#define MYGUI_SINGLETON_DECLARATION(ClassName)
Definition MyGUI_Singleton.h:111
MyGUI::IPointer
Definition MyGUI_IPointer.h:18
MyGUI::IUnlinkWidget
Definition MyGUI_IUnlinkWidget.h:17
MyGUI::ImageBox
widget description should be here.
Definition MyGUI_ImageBox.h:24
MyGUI::MemberObsolete
Definition MyGUI_DeprecatedTypes.h:14
MyGUI::PointerManager
Definition MyGUI_PointerManager.h:23
MyGUI::PointerManager::eventChangeMousePointer
delegates::CMultiDelegate1< const std::string & > eventChangeMousePointer
Definition MyGUI_PointerManager.h:61
MyGUI::Version
Definition MyGUI_Version.h:18
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:37
MyGUI::delegates::MultiDelegate
Definition MyGUI_Delegate.h:200
MyGUI::xml::Element
Definition MyGUI_XmlDocument.h:159
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition MyGUI_WidgetDefines.h:20
MyGUI::Align
Definition MyGUI_Align.h:20
MyGUI::WidgetStyle
Definition MyGUI_WidgetStyle.h:19
MyGUI::types::TCoord< int >
MyGUI::types::TPoint< int >