MyGUI 3.4.3
MyGUI_ControllerPosition.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_CONTROLLER_POSITION_H_
8#define MYGUI_CONTROLLER_POSITION_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Delegate.h"
12#include "MyGUI_Types.h"
13#include "MyGUI_WidgetDefines.h"
15
16namespace MyGUI
17{
18
21 {
23
24 public:
26
28
29 void setCoord(const IntCoord& _destCoord);
30
31 void setSize(const IntSize& _destSize);
32
33 void setPosition(const IntPoint& _destPoint);
34
44 void setFunction(std::string_view _value);
45
49 void setTime(float _value);
50
55
56 bool addTime(Widget* _widget, float _time) override;
57 void prepareItem(Widget* _widget) override;
58 void setProperty(std::string_view _key, std::string_view _value) override;
59
60 private:
61 IntCoord mStartCoord;
62 IntCoord mDestCoord;
63 float mTime{1};
64 float mElapsedTime{0};
65
66 // controller changing position
67 bool mCalcPosition{false};
68 // controller changing size
69 bool mCalcSize{false};
70
78 FrameAction eventFrameAction;
79 };
80
81} // namespace MyGUI
82
83#endif // MYGUI_CONTROLLER_POSITION_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
void setAction(FrameAction::IDelegate *_value)
void setFunction(std::string_view _value)
bool addTime(Widget *_widget, float _time) override
delegates::Delegate< const IntCoord &, const IntCoord &, IntCoord &, float > FrameAction
void setProperty(std::string_view _key, std::string_view _value) override
void setPosition(const IntPoint &_destPoint)
void prepareItem(Widget *_widget) override
void setCoord(const IntCoord &_destCoord)
void setSize(const IntSize &_destSize)
widget description should be here.
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:27
types::TCoord< int > IntCoord
Definition MyGUI_Types.h:36
types::TSize< int > IntSize
Definition MyGUI_Types.h:30