40 #ifndef _uiscrollbar_cpp
41 #define _uiscrollbar_cpp
43 #include "UI/scrollbar.h"
44 #include "UI/button.h"
45 #include "UI/pagedcontainer.h"
46 #include "UI/screen.h"
47 #include "UI/uimanager.h"
49 #include "Input/metacode.h"
68 DownRightButton(NULL),
70 IncrementDistance(0.01),
80 DownRightButton(NULL),
82 IncrementDistance(0.01),
85 { this->
AddEvent(Scrollbar::EventScrollValueChanged); }
92 DownRightButton(NULL),
94 IncrementDistance(0.01),
97 { this->
AddEvent(Scrollbar::EventScrollValueChanged); }
113 }
else if( Code.
GetCode() == Input::MOUSEHORIZONTAL ) {
116 }
else if( Code.
GetCode() == Input::MOUSEVERTICAL ) {
120 }
else if( Code.
GetCode() == Input::MOUSEWHEELVERTICAL || Code.
GetCode() == Input::MOUSEWHEELHORIZONTAL ) {
209 if( !PropertiesNode.
Empty() ) {
211 CurrAttrib = PropertiesNode.
GetAttribute(
"IncrementDistance");
212 if( !CurrAttrib.
Empty() )
215 CurrAttrib = PropertiesNode.
GetAttribute(
"ScrollerSize");
216 if( !CurrAttrib.
Empty() )
219 CurrAttrib = PropertiesNode.
GetAttribute(
"AutoHideScroll");
220 if( !CurrAttrib.
Empty() )
255 if( EventWidget == NULL )
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
A light-weight handle for manipulating attributes in DOM tree.
bool Boole
Generally acts a single bit, true or false.
bool AsBool(bool def=false) const
Attempts to convert the value of the attribute to a float and returns the results.
Thrown when the requested identity could not be found.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
A simple reference counting pointer.
EventSubscriberSlot * Subscribe(const String &EventName, EventSubscriber *Sub)
Adds a subscriber to this event.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
bool Empty() const
Is this storing anything at all?
PagedContainer * Container
A pointer to the PagedContainer this scrollbar is providing page data for.
float Real
A Datatype used to represent a real floating point number.
bool SetValue(const Char8 *rhs)
Set the value of this.
This class represents a 2D rect which can express the size and position of a renderable on screen...
A light-weight handle for manipulating nodes in DOM tree.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
This is used to represent a point on a 2 dimentional area, such as a screen.
bool Empty() const
Is this storing anything at all?
Real AsReal(Real def=0) const
Attempts to convert the value of the attribute to a Real and returns the results. ...
Event * AddEvent(const String &EventName)
Creates a new event this Publisher can fire.
String Name
The unique name of this Renderable.
void FireEvent(EventArgumentsPtr Args)
Fires an event.
This is the base class for interpretting widget values to page positions.
virtual Widget * GetWidget(const String &Name)
Gets a widget in this screen by name.
The bulk of the engine components go in this namspace.
virtual const Vector2 & GetMouseHitPosition() const
Gets the mouse position from the last call to "FindHoveredQuad(const Vector2&).
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
This class is a helper class for creating UI's. It is responsible for storing and keeping track of al...
std::string String
A datatype used to a series of characters.
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
virtual void UpdateVisibleChildren()
Forces an update of the visible children in this container.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.
Screen * ParentScreen
A pointer to the Screen that created this Renderable.