MyGUI 3.4.1
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"
16
17namespace MyGUI
18{
19
21 public IUnlinkWidget,
22 public MemberObsolete<PointerManager>
23 {
25 public:
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:*/
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_
#define MYGUI_EXPORT
#define MYGUI_SINGLETON_DECLARATION(ClassName)
widget description should be here.
delegates::CMultiDelegate1< const std::string & > eventChangeMousePointer
widget description should be here.
Definition: MyGUI_Widget.h:37
std::vector< Widget * > VectorWidgetPtr