This class is the base class for all widgets. More...
#include <uiwidget.h>
Public Types | |
|
typedef std::map< Whole, RenderablePair > | RenderableMap |
|
typedef std::pair < BasicRenderable *, Widget * > | RenderablePair |
| enum | WidgetType { W_ButtonListBox, W_Cell, W_CellGrid, W_CheckBox, W_DropDownList, W_DropDownMenu, W_GenericWidgetContainer, W_ListBox, W_Menu, W_MenuWindow, W_RadioButton, W_Scrollbar, W_Spinner, W_TabSet, W_TextBox, W_Window } |
Public Member Functions | |
| Widget (const String &name, Layer *Parent) | |
| Standard initialization constructor. | |
| virtual | ~Widget () |
| Standard destructor. | |
| virtual void | _AppendVertices (ScreenVertexData &Vertices) |
| Appends the vertices of this renderable to another vector. | |
| virtual void | _MarkDirty () |
| Marks this renderable as well as all parent objects as dirty. | |
| virtual void | _Redraw () |
| Regenerates the verticies in this renderable. | |
| virtual bool | CheckMouseHover () |
| Checks to see if the current mouse position is over this widget. | |
| virtual Vector2 | GetActualPosition () const |
| Sets the pixel position of this widget. | |
| virtual Vector2 | GetActualSize () const |
| Sets the pixel size of this widget. | |
| virtual Button * | GetHoveredButton () const |
| Gets the hovered button within this widget, if any. | |
| virtual Widget * | GetHoveredSubWidget () const |
| Gets the hovered sub-widget within this widget, if any. | |
| virtual InputCaptureData * | GetInputCaptureData () const |
| Gets the data determining what input should be captured. | |
| virtual Layer * | GetLayer () const |
| Gets the layer this widget belongs to. | |
| virtual ConstString & | GetName () const |
| Gets the name of this widget. | |
| virtual Vector2 | GetPosition () const |
| Gets the relative position of this widget. | |
| virtual RenderableRect | GetRect (bool Relative=true) const |
| Gets this Widgets' Rect. | |
| virtual UI::RenderPriority | GetRenderPriority () const |
| Gets the priority this widget should be rendered with. | |
| virtual Vector2 | GetSize () const |
| Gets the relative size of this widget. | |
| virtual WidgetType | GetType () const |
| Gets the type of widget this is. | |
| virtual bool | GetVisible () const |
| Gets the visibility setting of this widget. | |
| virtual void | Hide () |
| Forces this widget to hide. | |
| virtual bool | IsHovered () const |
| Gets the result of the last mouse hover check. | |
| virtual bool | IsInputCaptureWidget () const |
| Checks if this is an input capturing widget. | |
| virtual bool | IsVisible () const |
| Gets whether or not this widget is being drawn. | |
| virtual void | SetActualPosition (const Vector2 &Position)=0 |
| Sets the pixel position of this widget. | |
| virtual void | SetActualSize (const Vector2 &Size)=0 |
| Sets the pixel size of this widget. | |
| virtual void | SetPosition (const Vector2 &Position)=0 |
| Sets the relative position of this widget. | |
| virtual void | SetRect (const RenderableRect &Rect) |
| Sets the Rect(Position and Size) of this Widget. | |
| virtual void | SetRenderPriority (const UI::RenderPriority &Priority) |
| Sets the priority this widget should be rendered with. | |
| virtual void | SetSize (const Vector2 &Size)=0 |
| Sets the relative size of this widget. | |
| virtual void | SetVisible (bool visible) |
| Sets the visibility of this widget. | |
| virtual void | SetWidgetCallback (WidgetCallback *CB) |
| Sets the callback to be used by this widget. | |
| virtual void | Show () |
| Forces this widget to be shown. | |
| virtual void | UpdateDimensions ()=0 |
| Updates the dimensions of this widget to match those of the new screen size. | |
Protected Member Functions | |
| virtual void | AddSubRenderable (const Whole &Zorder, const RenderablePair &ToAdd) |
| Adds a renderable as a subrenderable to this widget. | |
| virtual bool | CheckMouseHoverImpl ()=0 |
| Child specific mouse hover method. | |
| virtual void | ProcessCapturedInputs () |
| Processes the captured inputs. This is an empty function and should be overridden if making an input capturing widget. | |
| virtual void | SetVisibleImpl (bool visible)=0 |
| Child specific visibility method. | |
| virtual void | SubWidgetFocusUpdate (bool Force=false) |
| For use with sub-widget update/automation when the mouse isn't hovered. | |
| virtual void | SubWidgetUpdate (bool Force=false) |
| For use with sub-widget update/automation. | |
| virtual void | Update (bool Force=false) |
| For use with widget update/automation. | |
| virtual void | UpdateImpl (bool Force=false)=0 |
| Child specific update method. | |
Protected Attributes | |
| UI::WidgetCallback * | Callback |
| InputCaptureData * | CaptureData |
| bool | Dirty |
| bool | Hovered |
| UI::Button * | HoveredButton |
| UI::Widget * | HoveredSubWidget |
| UIManager * | Manager |
| String | Name |
| Layer * | ParentLayer |
| UI::Widget * | ParentWidget |
| UI::RenderPriority | Priority |
| Vector2 | RelPosition |
| Vector2 | RelSize |
| RenderableMap | SubRenderables |
| UI::Widget * | SubWidgetFocus |
| WidgetType | Type |
| std::vector< VertexData > | Vertices |
| bool | Visible |
Friends | |
| class | Layer |
| class | Mezzanine::UIManager |
This class is the base class for all widgets.
Definition at line 100 of file uiwidget.h.
Standard initialization constructor.
| Parent | The parent layer that created this widget. |
| name | The Name for the Widget. |
Definition at line 98 of file uiwidget.cpp.
| void Mezzanine::UI::Widget::_AppendVertices | ( | ScreenVertexData & | Vertices | ) | [virtual] |
Appends the vertices of this renderable to another vector.
| Vertices | The vector of vertex's to append to. |
Reimplemented in Mezzanine::UI::Menu.
Definition at line 355 of file uiwidget.cpp.
| bool Mezzanine::UI::Widget::CheckMouseHover | ( | ) | [virtual] |
Checks to see if the current mouse position is over this widget.
Definition at line 232 of file uiwidget.cpp.
| Vector2 Mezzanine::UI::Widget::GetActualPosition | ( | ) | const [virtual] |
Sets the pixel position of this widget.
Definition at line 278 of file uiwidget.cpp.
| Vector2 Mezzanine::UI::Widget::GetActualSize | ( | ) | const [virtual] |
Sets the pixel size of this widget.
Definition at line 288 of file uiwidget.cpp.
| Button * Mezzanine::UI::Widget::GetHoveredButton | ( | ) | const [virtual] |
Gets the hovered button within this widget, if any.
Definition at line 308 of file uiwidget.cpp.
| Widget * Mezzanine::UI::Widget::GetHoveredSubWidget | ( | ) | const [virtual] |
Gets the hovered sub-widget within this widget, if any.
Definition at line 313 of file uiwidget.cpp.
| InputCaptureData * Mezzanine::UI::Widget::GetInputCaptureData | ( | ) | const [virtual] |
Gets the data determining what input should be captured.
Definition at line 323 of file uiwidget.cpp.
| Layer * Mezzanine::UI::Widget::GetLayer | ( | ) | const [virtual] |
Gets the layer this widget belongs to.
Definition at line 318 of file uiwidget.cpp.
| ConstString & Mezzanine::UI::Widget::GetName | ( | ) | const [virtual] |
Gets the name of this widget.
Definition at line 219 of file uiwidget.cpp.
| Vector2 Mezzanine::UI::Widget::GetPosition | ( | ) | const [virtual] |
Gets the relative position of this widget.
The position is relative to the screen size. Values range from 0.0 to 1.0.
Definition at line 273 of file uiwidget.cpp.
| RenderableRect Mezzanine::UI::Widget::GetRect | ( | bool | Relative = true | ) | const [virtual] |
Gets this Widgets' Rect.
| Relative | Whether or not you want the Rect to be populated with Relative values. |
Definition at line 267 of file uiwidget.cpp.
| UI::RenderPriority Mezzanine::UI::Widget::GetRenderPriority | ( | ) | const [virtual] |
Gets the priority this widget should be rendered with.
Definition at line 303 of file uiwidget.cpp.
| Vector2 Mezzanine::UI::Widget::GetSize | ( | ) | const [virtual] |
Gets the relative size of this widget.
The size is relative to the screen size. Values range from 0.0 to 1.0.
Definition at line 283 of file uiwidget.cpp.
| Widget::WidgetType Mezzanine::UI::Widget::GetType | ( | ) | const [virtual] |
Gets the type of widget this is.
Definition at line 204 of file uiwidget.cpp.
| bool Mezzanine::UI::Widget::GetVisible | ( | ) | const [virtual] |
Gets the visibility setting of this widget.
Definition at line 184 of file uiwidget.cpp.
| bool Mezzanine::UI::Widget::IsHovered | ( | ) | const [virtual] |
Gets the result of the last mouse hover check.
Definition at line 214 of file uiwidget.cpp.
| bool Mezzanine::UI::Widget::IsInputCaptureWidget | ( | ) | const [virtual] |
Checks if this is an input capturing widget.
Definition at line 209 of file uiwidget.cpp.
| bool Mezzanine::UI::Widget::IsVisible | ( | ) | const [virtual] |
Gets whether or not this widget is being drawn.
This function will check the visibility of all parent objects to see if it is being drawn. This will not tell you whether or not this widget has it's own visibility setting enabled. For that see: GetVisible().
Definition at line 189 of file uiwidget.cpp.
| virtual void Mezzanine::UI::Widget::SetActualPosition | ( | const Vector2 & | Position | ) | [pure virtual] |
Sets the pixel position of this widget.
| Position | A vector2 representing the pixel position of this widget. |
Implemented in Mezzanine::UI::Cell, Mezzanine::UI::CellGrid, Mezzanine::UI::CheckBox, Mezzanine::UI::DropDownList, Mezzanine::UI::ListBox, Mezzanine::UI::Menu, Mezzanine::UI::RenderableContainerWidget, Mezzanine::UI::Scrollbar, Mezzanine::UI::ScrolledCellGrid, Mezzanine::UI::Spinner, Mezzanine::UI::TabSet, and Mezzanine::UI::Window.
| virtual void Mezzanine::UI::Widget::SetActualSize | ( | const Vector2 & | Size | ) | [pure virtual] |
Sets the pixel size of this widget.
| Size | A vector2 representing the pixel size of this widget. |
Implemented in Mezzanine::UI::Cell, Mezzanine::UI::CellGrid, Mezzanine::UI::CheckBox, Mezzanine::UI::DropDownList, Mezzanine::UI::ListBox, Mezzanine::UI::Menu, Mezzanine::UI::RenderableContainerWidget, Mezzanine::UI::Scrollbar, Mezzanine::UI::ScrolledCellGrid, Mezzanine::UI::Spinner, Mezzanine::UI::TabSet, and Mezzanine::UI::Window.
| virtual void Mezzanine::UI::Widget::SetPosition | ( | const Vector2 & | Position | ) | [pure virtual] |
Sets the relative position of this widget.
The position is relative to the screen size. Values range from 0.0 to 1.0.
| Position | A vector2 representing the relative position of this widget. |
Implemented in Mezzanine::UI::Cell, Mezzanine::UI::CellGrid, Mezzanine::UI::CheckBox, Mezzanine::UI::DropDownList, Mezzanine::UI::ListBox, Mezzanine::UI::Menu, Mezzanine::UI::RenderableContainerWidget, Mezzanine::UI::Scrollbar, Mezzanine::UI::ScrolledCellGrid, Mezzanine::UI::Spinner, Mezzanine::UI::TabSet, and Mezzanine::UI::Window.
| void Mezzanine::UI::Widget::SetRect | ( | const RenderableRect & | Rect | ) | [virtual] |
Sets the Rect(Position and Size) of this Widget.
| Rect | The Rect to set. |
Definition at line 255 of file uiwidget.cpp.
| void Mezzanine::UI::Widget::SetRenderPriority | ( | const UI::RenderPriority & | Priority | ) | [virtual] |
Sets the priority this widget should be rendered with.
The default value for this is Medium.
| Priority | The priority level to be used when rendering this widget. |
Definition at line 293 of file uiwidget.cpp.
| virtual void Mezzanine::UI::Widget::SetSize | ( | const Vector2 & | Size | ) | [pure virtual] |
Sets the relative size of this widget.
The size is relative to the screen size. Values range from 0.0 to 1.0.
| Size | A vector2 representing the relative size of this widget. |
Implemented in Mezzanine::UI::Cell, Mezzanine::UI::CellGrid, Mezzanine::UI::CheckBox, Mezzanine::UI::DropDownList, Mezzanine::UI::ListBox, Mezzanine::UI::Menu, Mezzanine::UI::RenderableContainerWidget, Mezzanine::UI::Scrollbar, Mezzanine::UI::ScrolledCellGrid, Mezzanine::UI::Spinner, Mezzanine::UI::TabSet, and Mezzanine::UI::Window.
| void Mezzanine::UI::Widget::SetVisible | ( | bool | visible | ) | [virtual] |
Sets the visibility of this widget.
| visible | Bool determining whether or not this widget should be visible. |
Definition at line 174 of file uiwidget.cpp.
| void Mezzanine::UI::Widget::SetWidgetCallback | ( | WidgetCallback * | CB | ) | [virtual] |
Sets the callback to be used by this widget.
| CB | The callback to be set for this widget. |
Definition at line 224 of file uiwidget.cpp.
| virtual void Mezzanine::UI::Widget::UpdateDimensions | ( | ) | [pure virtual] |
Updates the dimensions of this widget to match those of the new screen size.
This function is called automatically when a viewport changes in size, and shouldn't need to be called manually.
Implemented in Mezzanine::UI::Cell, Mezzanine::UI::CellGrid, Mezzanine::UI::CheckBox, Mezzanine::UI::DropDownList, Mezzanine::UI::ListBox, Mezzanine::UI::Menu, Mezzanine::UI::MenuWindow, Mezzanine::UI::PagedCellGrid, Mezzanine::UI::RenderableContainerWidget, Mezzanine::UI::Scrollbar, Mezzanine::UI::ScrolledCellGrid, Mezzanine::UI::Spinner, Mezzanine::UI::TabSet, and Mezzanine::UI::Window.
1.7.3