 |
Gorgon Game Engine
|
Go to the documentation of this file.
3 #include "../UI/ComponentStackWidget.h"
4 #include "../Property.h"
9 namespace Gorgon {
namespace Widgets {
68 void SetText(
const std::string &value);
71 std::string
GetText()
const {
return text; }
96 bool HasIcon()
const {
return icon !=
nullptr; }
102 throw std::runtime_error(
"This widget has no icon.");
120 void ActivateClickRepeat(
int delay = 500,
int repeat = 400,
int accelerationtime = 2000,
int minrepeat = 200);
142 bool ownicon =
false;
143 bool spacedown =
false;
144 bool mousedown =
false;
153 int repeatdelay = 500;
154 int repeatinit = 400;
155 int repeatacc = 2000;
157 int repeatdiff = -200;
160 repeatstate repeaten = repeatdisabled;
Object property allows the consumers of the property to be able to access object's member functions a...
Definition: Property.h:323
@ Icon
Data will effect the displayed graphics.
Definition: Template.h:678
void SetData(ComponentTemplate::DataEffect effect, const std::string &text)
Sets the data for a specific data effect.
Definition: ComponentStack.cpp:725
This class provides event mechanism.
Definition: Event.h:134
A regular drawable animation provider.
Definition: Animations.h:28
This class stores visual information about a widget template.
Definition: Template.h:392
Supports everything that string class supports including +, +=, length()
Definition: Property.h:562
constexpr Type Text
Stores text data, no longer a resource.
Definition: GID.h:134
unsigned long DeltaTime()
Returns the time passed since the last frame.
Definition: Time.h:258
virtual ~Drawable()
Definition: Drawables.h:19
void RemoveCondition(ComponentCondition condition, bool transition=true)
Removes a condition and its associated components.
Definition: ComponentStack.h:54
void RemoveData(ComponentTemplate::DataEffect effect)
Removes the data associated with data effect.
Definition: ComponentStack.cpp:759
@ Text
Works only for TextholderTemplate, data will affect the text that is displayed.
Definition: Template.h:651
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
void SetFrameEvent(std::function< void()> handler)
Sets a function to be called before update check.
Definition: ComponentStack.h:413
virtual Animation & CreateAnimation(Gorgon::Animation::ControllerBase &timer) const override=0
This function should create a new animation with the given controller and if owner parameter is set t...
This object contains an bitmap image.
Definition: Bitmap.h:25
void RemoveFrameEvent()
Removes the function that will be called before update check.
Definition: ComponentStack.h:433
void AddCondition(ComponentCondition condition, bool transition=true)
Adds a condition and its associated components to the stack.
Definition: ComponentStack.h:48
void SetClickEvent(std::function< void(ComponentTemplate::Tag, Geometry::Point, Input::Mouse::Button)> handler)
Sets the mouse down event.
Definition: ComponentStack.h:490
@ Active
This is for widgets that can be activated, like a count down timer.
Definition: Template.h:245
A regular drawable animation.
Definition: Animations.h:14
@ Graphics
Definition: Template.h:164
Represents a drawable object, that can be drawn to the given point.
Definition: Drawables.h:17
void HandleMouse(Input::Mouse::Button accepted=Input::Mouse::Button::All)
This function instructs stack to handle mouse to automatically change hover/down states,...
Definition: ComponentStack.cpp:1023
void SetMouseDownEvent(std::function< void(ComponentTemplate::Tag, Geometry::Point, Input::Mouse::Button)> handler)
Sets the mouse down event.
Definition: ComponentStack.h:465
void SetMouseUpEvent(std::function< void(ComponentTemplate::Tag, Geometry::Point, Input::Mouse::Button)> handler)
Sets the mouse up event.
Definition: ComponentStack.h:478