Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Mezzanine::UI::ListBox Class Reference

This is a widget for displaying a list of captions in a box. More...

#include <listbox.h>

+ Inheritance diagram for Mezzanine::UI::ListBox:
+ Collaboration diagram for Mezzanine::UI::ListBox:

Public Types

typedef Widget ListItem
 Convenience typedef for objects that will be used to represent list items in this ListBox.
 
enum  ListItemOrdering { LIO_TopInsert = 1, LIO_BottomInsert = 2 }
 This enum is used to describe how new ListItems are inserted into the list. More...
 
- Public Types inherited from Mezzanine::UI::Widget
typedef StateLayerGroupMap::const_iterator ConstStateLayerGroupIterator
 Const Iterator type for RenderLayerGroup instances stored in relation to widget states.
 
typedef StateLayerGroupMap::iterator StateLayerGroupIterator
 Iterator type for RenderLayerGroup instances stored in relation to widget states.
 
typedef std::map< UInt32, RenderLayerGroup * > StateLayerGroupMap
 Container class for storing RenderLayerGroup instances in relation to widget states.
 
enum  WidgetGroupID {
  WG_Normal = 1, WG_Hovered = 2, WG_Focused = 3, WG_Dragged = 4,
  WG_Mezzanine_Reserved_1 = 9, WG_Mezzanine_Reserved_2 = 10, WG_Mezzanine_Reserved_3 = 11, WG_Mezzanine_Reserved_4 = 12,
  WG_User_Group_1 = 17, WG_User_Group_2 = 18, WG_User_Group_3 = 19, WG_User_Group_4 = 20
}
 Enum used to conveniently track the pre-made RenderLayerGroups used by Widgets.
 
enum  WidgetState {
  WS_Untouched = 0, WS_Hovered = 1, WS_Focused = 2, WS_Dragged = 4,
  WS_Mezzanine_Reserved_1 = 8, WS_Mezzanine_Reserved_2 = 16, WS_Mezzanine_Reserved_3 = 32, WS_Mezzanine_Reserved_4 = 64,
  WS_User_State_1 = 128, WS_User_State_2 = 256, WS_User_State_3 = 512, WS_User_State_4 = 1024
}
 Enum describing the current state of the widget.
 
- Public Types inherited from Mezzanine::UI::QuadRenderable
typedef std::vector< Widget * > ChildContainer
 Basic container type for Widget storage by this class.
 
typedef ChildContainer::iterator ChildIterator
 Iterator type for Widget instances stored by this class.
 
typedef ChildContainer::const_iterator ConstChildIterator
 Const Iterator type for Widget instances stored by this class.
 
typedef RenderLayerGroupContainer::const_iterator ConstRenderLayerGroupIterator
 Const Iterator type for RenderLayerGroup instances stored by this class.
 
typedef RenderLayerContainer::const_iterator ConstRenderLayerIterator
 Const Iterator type for RenderLayer instances stored by this class.
 
typedef ChildContainer::const_reverse_iterator ConstReverseChildIterator
 Const Reverse Iterator type for Widget instances stored by this class.
 
typedef std::vector< RenderLayer * > RenderLayerContainer
 Basic container type for RenderLayer storage by this class.
 
typedef std::vector< RenderLayerGroup * > RenderLayerGroupContainer
 Basic container type for RenderLayerGroup storage by this class.
 
typedef RenderLayerGroupContainer::iterator RenderLayerGroupIterator
 Iterator type for RenderLayerGroup instances stored by this class.
 
typedef RenderLayerContainer::iterator RenderLayerIterator
 Iterator type for RenderLayer instances stored by this class.
 
typedef ChildContainer::reverse_iterator ReverseChildIterator
 Reverse Iterator type for Widget instances stored by this class.
 
- Public Types inherited from Mezzanine::UI::Renderable
enum  RenderableType { RT_LineList, RT_Screen, RT_Widget }
 A small enum to describe the type of renderable this is.
 
- Public Types inherited from Mezzanine::EventPublisher
typedef EventContainer::const_iterator ConstEventIterator
 Const Iterator type for Event instances stored by this class.
 
typedef std::map< String, Event * > EventContainer
 Basic container type for Event storage by this class.
 
typedef EventContainer::iterator EventIterator
 Iterator type for Event instances stored by this class.
 

Public Member Functions

 ListBox (Screen *Parent)
 Blank constructor. More...
 
 ListBox (const String &RendName, const UI::ScrollbarStyle &Style, Screen *Parent)
 Standard initialization constructor. More...
 
 ListBox (const String &RendName, const UnifiedRect &RendRect, const UI::ScrollbarStyle &Style, Screen *Parent)
 Rect constructor. More...
 
 ListBox (const XML::Node &XMLNode, Screen *Parent)
 XML constructor. More...
 
virtual ~ListBox ()
 Class destructor.
 
virtual ListItemCreateMultiLineListItem (const String &ItemName, const String &Text)
 Convenience method that will create and add a ListItem with a multi-line text layer to this ListBox. More...
 
virtual ListItemCreateSingleLineListItem (const String &ItemName, const String &Text)
 Convenience method that will create and add a ListItem with a single line text layer to this ListBox. More...
 
virtual void DestroyAllListItems ()
 Destroys all the ListItems currently owned by this ListBox.
 
virtual void DestroyListItem (ListItem *ToBeDestroyed)
 Destroys a ListItem owned by this ListBox. More...
 
virtual ListItemGetLastSelectedListItem () const
 Gets the last ListItem that was selected/focused. More...
 
virtual VerticalContainerGetListContainer () const
 Gets the ListItem container within this widget. More...
 
virtual ListItemGetListItem (const String &Name) const
 Gets a ListItem in this ListBox by name. More...
 
virtual FontDataGetListItemFont () const
 Gets the font that will be used by ListItems in this ListBox. More...
 
virtual ListBox::ListItemOrdering GetListItemOrdering () const
 Gets how new entries will be inserted into the list. More...
 
virtual const SizingInfoGetListItemSize () const
 Gets the size to be given to children processed by this container if forced sizing is enabled. More...
 
virtual Whole GetListItemSizeEnforcement () const
 Gets when the set list item sizing will be applied to any given list item. More...
 
virtual Real GetListItemTextScalar () const
 Gets the relative scalar being used to automatically scale text in ListItems created by this ListBox. More...
 
virtual TextLayer::ScalingMode GetListItemTextScalingMode () const
 Gets the automatic scaling mode being used by ListItems created by this ListBox. More...
 
virtual VerticalScrollbarGetListScroll () const
 Gets the Scrollbar within this widget. More...
 
virtual Whole GetNumListItems () const
 Gets the number of ListItems in this ListBox. More...
 
virtual const UnifiedDimGetScrollbarWidth () const
 Gets the Unified width of the child scrollbar in this ListBox. More...
 
virtual const StringGetTypeName () const
 Gets the type of widget this is. More...
 
virtual void ProtoDeSerializeChildQuads (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the ChildQuads of this object with it. More...
 
virtual void ProtoDeSerializeProperties (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the properties of this object with it. More...
 
virtual void ProtoSerializeChildQuads (XML::Node &SelfRoot) const
 Convert the child quads of this class to an XML::Node ready for serialization. More...
 
virtual void ProtoSerializeProperties (XML::Node &SelfRoot) const
 Convert the properties of this class to an XML::Node ready for serialization. More...
 
virtual void SetListItemFont (FontData *Font)
 Sets the font that will be used by ListItems in this ListBox. More...
 
virtual void SetListItemFont (const String &FontName)
 Sets the font that will be used by ListItems in this ListBox. More...
 
virtual void SetListItemOrdering (ListBox::ListItemOrdering Order)
 Sets how new entries will be inserted into the list. More...
 
virtual void SetListItemSize (const SizingInfo &ForcedSize)
 Sets the size to be given to children processed by this container if forced sizing is enabled. More...
 
virtual void SetListItemSizeEnforcement (const Whole Enforcement)
 Sets when the set list item sizing will be applied to any given list item. More...
 
virtual void SetListItemSizing (const SizingInfo &ForcedSize, const Whole Enforcement)
 Sets both the size and enforcement rules for forced list item sizing in this container. More...
 
virtual void SetListItemTextScale (const TextLayer::ScalingMode Mode, const Real Scalar)
 Sets the mode and scaler of auto-scaling applied to ListItems created by this ListBox. More...
 
virtual void SetScrollbarWidth (const UnifiedDim &ScrollWidth)
 Sets the Unified width of the child scrollbar in this ListBox. More...
 
virtual void UpdateDimensions (const Rect &OldSelfRect, const Rect &NewSelfRect)
 Updates the dimensions of this QuadRenderable based on the transform of it's parent. More...
 
- Public Member Functions inherited from Mezzanine::UI::Widget
 Widget (Screen *Parent)
 Blank constructor. More...
 
 Widget (const String &RendName, Screen *Parent)
 Standard initialization constructor. More...
 
 Widget (const String &RendName, const UnifiedRect &RendRect, Screen *Parent)
 Rect constructor. More...
 
 Widget (const XML::Node &XMLNode, Screen *Parent)
 XML constructor. More...
 
virtual ~Widget ()
 Standard destructor.
 
virtual Boole _HandleInput (const Input::MetaCode &Code)
 Handles input passed to this widget. More...
 
virtual void _NotifyChildStateChange (Widget *Child, const UInt32 &OldState, const UInt32 &NewState)
 Notifies this widget that a child (or grandchild) has had it's state updated. More...
 
virtual void _NotifyEvent (EventArgumentsPtr Args)
 Notifies this subscriber of an event being fired. More...
 
virtual void _OnFocusGained ()
 Self logic to be executed when focus is given to this widget. More...
 
virtual void _OnFocusLocked ()
 Self logic to be executed when focus is locked to this widget. More...
 
virtual void _OnFocusLost ()
 Self logic to be executed when focus is removed from this widget. More...
 
virtual void _OnFocusUnlocked ()
 Self logic to be executed when focus is no longer locked to this widget. More...
 
virtual void _OnMouseDragEnd ()
 Self logic to be executed when the mouse cursor stops dragging across the bounds of this widget. More...
 
virtual void _OnMouseDragStart ()
 Self logic to be executed when the mouse cursor starts dragging across the bounds of this widget. More...
 
virtual void _OnMouseEnter ()
 Self logic to be executed when the mouse cursor enters the bounds of this widget. More...
 
virtual void _OnMouseExit ()
 Self logic to be executed when the mouse cursor leaves the bounds of thiw widget. More...
 
virtual void _OnVisibilityHidden ()
 Self logic to be executed when this widget becomes invisible.
 
virtual void _OnVisibilityShown ()
 Self logic to be executed when this widget becomes visible.
 
virtual void BindGroupToState (const UInt32 BindState, RenderLayerGroup *ToBind)
 Binds a RenderLayerGroup to a WidgetState. More...
 
virtual void ForceState (const UInt32 NewState)
 Forces a new state of this Widget. More...
 
WidgetGetBottomMostHoveredWidget ()
 Gets a pointer to the Widget at the bottom of the hovered SubWidget chain. More...
 
virtual String GetDerivedSerializableName () const
 Gets the most derived serializable name of this Renderable. More...
 
virtual RenderLayerGroupGetGroupBoundToState (const UInt32 BindState) const
 Gets the current RenderLayerGroup bound to a specified WidgetState. More...
 
WidgetGetHoveredSubWidget () const
 Gets the hovered sub-widget within this widget, if any. More...
 
virtual RenderableType GetRenderableType () const
 Gets the type of renderable this is. More...
 
virtual UInt32 GetState () const
 Gets the current state of this Widget. More...
 
virtual Boole GetVisible () const
 Gets the visibility setting of this renderable. More...
 
virtual Boole HasFocus () const
 Gets whether or not this widget currently has focus. More...
 
virtual void Hide ()
 Forces this renderable to hide. More...
 
virtual Boole IsDragged () const
 Gets whether or not the system mouse is being dragged over this widget. More...
 
virtual Boole IsHovered () const
 Gets the result of the last mouse hover check. More...
 
virtual Boole IsVisible () const
 Gets whether or not this renderable is being drawn. More...
 
virtual void ProtoDeSerializeEvents (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the Events of this object with it. More...
 
virtual void ProtoDeSerializeStateGroupBindings (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the state-group bindings of this object with it. More...
 
virtual void ProtoSerializeEvents (XML::Node &SelfRoot) const
 Convert the Events of this class to an XML::Node ready for serialization. More...
 
virtual void ProtoSerializeStateGroupBindings (XML::Node &SelfRoot) const
 Convert the state-group bindings of this class to an XML::Node ready for serialization. More...
 
virtual Boole SetGroupFromState (const UInt32 BindState)
 Sets the group bound to the specified WidgetState as active. More...
 
virtual void SetVisible (Boole CanSee)
 Sets the visibility of this renderable. More...
 
virtual void Show ()
 Forces this renderable to be shown. More...
 
- Public Member Functions inherited from Mezzanine::UI::QuadRenderable
 QuadRenderable (Screen *Parent)
 Blank constructor. More...
 
 QuadRenderable (const String &RendName, Screen *Parent)
 Class constructor. More...
 
 QuadRenderable (const String &RendName, const UnifiedRect &RendRect, Screen *Parent)
 Parent-less constructor. More...
 
virtual ~QuadRenderable ()
 Class destructor. More...
 
virtual void _AppendRenderData (ScreenRenderData &RenderData)
 Appends the vertices of this renderable to another vector. More...
 
virtual void _AppendRenderDataCascading (ScreenRenderData &RenderData)
 Appends the vertices of this renderable to another vector, and then does the same for this renderable's children. More...
 
virtual void _Clean ()
 Refreshes the render data of this renderable. More...
 
virtual void _MarkAllChildrenDirty ()
 Tells this QuadRenderable to mark each of it's children (and their children) as dirty. More...
 
virtual void _MarkAllLayersDirty ()
 Tells this QuadRenderable that all of it's layers are dirty. More...
 
virtual void _MarkDirty ()
 Marks this renderable as dirty, and informs other renderables if needed. More...
 
virtual void _NotifyParenthood (QuadRenderable *NewParent)
 Notifies this QuadRenderable that it has been added to another QuadRenderable. More...
 
virtual void _SetLayoutStrat (LayoutStrategy *ToSet)
 Sets a new LayoutStrategy for this quad to use. More...
 
virtual void _SetZOrder (const UInt16 &Zorder)
 Ssts the ZOrder value for this renderable. More...
 
virtual void AddChild (Widget *Child)
 Adds a Widget to this as a child of this quad. More...
 
virtual void AddChild (Widget *Child, const UInt16 ZOrder)
 Adds a Widget to this as a child of this quad. More...
 
void AddLayerToExistingGroup (RenderLayer *Layer, const UInt16 LayerZOrder, const UInt16 GroupID)
 Adds a RenderLayer to the specified group. More...
 
void AddLayerToGroup (RenderLayer *Layer, const UInt16 LayerZOrder, const UInt16 GroupID)
 Adds a RenderLayer to the specified group. More...
 
void AddLayerToGroup (RenderLayer *Layer, const GroupOrderEntry &GroupAndZ)
 Adds a RenderLayer to the specified group. More...
 
void AddLayerToGroups (RenderLayer *Layer, const GroupOrderEntryVector &Entrys)
 Adds a RenderLayer to multiple groups. More...
 
virtual Boole CheckOverlap (const QuadRenderable *Quad) const
 Checks to see if another Quad is overlapping with this one. More...
 
ChildIterator ChildrenBegin ()
 Gets an iterator to the first child Widget. More...
 
ConstChildIterator ChildrenBegin () const
 Gets a const iterator to the first child Widget. More...
 
ChildIterator ChildrenEnd ()
 Gets an iterator to one passed the last child Widget. More...
 
ConstChildIterator ChildrenEnd () const
 Gets an iterator to one passed the last child Widget. More...
 
MultiImageLayerCreateMultiImageLayer ()
 Creates an MultiImageLayer for this renderable. More...
 
MultiImageLayerCreateMultiImageLayer (const UInt16 NormalZ, const UInt16 HoveredZ)
 Creates an MultiImageLayer for this renderable. More...
 
MultiImageLayerCreateMultiImageLayer (const GroupOrderEntry &GroupAndZ)
 Creates an MultiImageLayer for this renderable and adds it to a RenderLayerGroup. More...
 
MultiLineTextLayerCreateMultiLineTextLayer ()
 Creats a MultiLineTextLayer for this renderable. More...
 
MultiLineTextLayerCreateMultiLineTextLayer (const UInt16 NormalZ, const UInt16 HoveredZ)
 Creats a MultiLineTextLayer for this renderable. More...
 
MultiLineTextLayerCreateMultiLineTextLayer (const GroupOrderEntry &GroupAndZ)
 Creats a MultiLineTextLayer for this renderable. More...
 
MultiLineTextLayerCreateMultiLineTextLayer (const String &FontName)
 Creats a MultiLineTextLayer for this renderable. More...
 
MultiLineTextLayerCreateMultiLineTextLayer (const String &FontName, const UInt16 NormalZ, const UInt16 HoveredZ)
 Creats a MultiLineTextLayer for this renderable. More...
 
MultiLineTextLayerCreateMultiLineTextLayer (const String &FontName, const GroupOrderEntry &GroupAndZ)
 Creats a MultiLineTextLayer for this renderable. More...
 
RenderLayerGroupCreateOrRetrieveRenderLayerGroup (const UInt16 GroupID)
 Gets the named RenderLayerGroup or creates one with the specified ID if it does not exist. More...
 
RenderLayerGroupCreateRenderLayerGroup (const UInt16 GroupID)
 Creates a new RenderLayerGroup that can have.

Exceptions
Thisfunction will throw an exception if a group already exists with the provided name.
More...
 
SingleImageLayerCreateSingleImageLayer ()
 Creates a SingleImageLayer for this renderable. More...
 
SingleImageLayerCreateSingleImageLayer (const UInt16 NormalZ, const UInt16 HoveredZ)
 Creates a SingleImageLayer for this renderable. More...
 
SingleImageLayerCreateSingleImageLayer (const GroupOrderEntry &GroupAndZ)
 Creates a SingleImageLayer for this renderable and adds it to a RenderLayerGroup. More...
 
SingleImageLayerCreateSingleImageLayer (const String &SpriteName)
 Creates a SingleImageLayer for this renderable. More...
 
SingleImageLayerCreateSingleImageLayer (const String &SpriteName, const UInt16 NormalZ, const UInt16 HoveredZ)
 Creates a SingleImageLayer for this renderable. More...
 
SingleImageLayerCreateSingleImageLayer (const String &SpriteName, const GroupOrderEntry &GroupAndZ)
 Creates a SingleImageLayer for this renderable and adds it to a RenderLayerGroup. More...
 
SingleLineTextLayerCreateSingleLineTextLayer ()
 Creats a SingleLineTextLayer for this renderable. More...
 
SingleLineTextLayerCreateSingleLineTextLayer (const UInt16 NormalZ, const UInt16 HoveredZ)
 Creats a SingleLineTextLayer for this renderable. More...
 
SingleLineTextLayerCreateSingleLineTextLayer (const GroupOrderEntry &GroupAndZ)
 Creats a SingleLineTextLayer for this renderable. More...
 
SingleLineTextLayerCreateSingleLineTextLayer (const String &FontName)
 Creats a SingleLineTextLayer for this renderable. More...
 
SingleLineTextLayerCreateSingleLineTextLayer (const String &FontName, const UInt16 NormalZ, const UInt16 HoveredZ)
 Creats a SingleLineTextLayer for this renderable. More...
 
SingleLineTextLayerCreateSingleLineTextLayer (const String &FontName, const GroupOrderEntry &GroupAndZ)
 Creats a SingleLineTextLayer for this renderable. More...
 
virtual void DestroyAllChildren ()
 Destroys all child Widgets currently inside this QuadRenderable.
 
void DestroyAllRenderLayerGroups ()
 Destroy's all RenderLayerGroups being stored/managed by this QuadRenderable.
 
void DestroyAllRenderLayers ()
 Destroys all RenderLayers being stored by this renderable.
 
virtual void DestroyChild (Widget *ToBeDestroyed)
 Destroys a child Widget currently inside this QuadRenderable. More...
 
void DestroyRenderLayer (RenderLayer *ToBeDestroyed)
 Destroys a RenderLayer being stored by this renderable. More...
 
void DestroyRenderLayerGroup (const UInt16 GroupID)
 Destroy's a RenderLayerGroup by ID. More...
 
void DestroyRenderLayerGroup (RenderLayerGroup *ToBeDestroyed)
 Destroy's a RenderLayerGroup by pointer. More...
 
RenderLayerGroupGetActiveGroup () const
 Gets the current RenderLayerGroup used for rendering. More...
 
virtual Vector2 GetActualPosition () const
 Gets the pixel position of this widget. More...
 
virtual Vector2 GetActualSize () const
 Gets the pixel size of this widget. More...
 
virtual UI::AspectRatioLock GetAspectRationLock () const
 Gets how (and if) the aspect ratio of this quad is locked. More...
 
virtual WidgetGetChild (const UInt16 Zorder) const
 Gets a child by it's ZOrder. More...
 
virtual WidgetGetChild (const String &RendName) const
 Gets a child by it's name. More...
 
WidgetGetClosestChild (Widget *Child)
 Gets a pointer to the child of this QuadRenderable that is storing a child, or another quad that is. More...
 
virtual UInt16 GetHighestChildZOrder () const
 Gets the highest ZOrder among the children of this QuadRenderable. More...
 
virtual Whole GetHorizontalPositioningRules () const
 Gets the current behavior this quad will follow when it is positioned automatically on the X axis. More...
 
virtual Whole GetHorizontalSizingRules () const
 Gets the current behavior this quad will follow for the X axis when it is resized. More...
 
virtual Real GetIdealHeightForText () const
 Gets the height needed for this quadrenderable to be able to completely display text in it's child text layers. More...
 
virtual UInt16 GetLowestChildZOrder () const
 Gets the lowest ZOrder among the children of this QuadRenderable. More...
 
virtual Boole GetManualTransformUpdates () const
 Gets whether or not this quad will be automatically updated when parent transforms are updated. More...
 
virtual UnifiedVec2 GetMaxSize () const
 Gets the currently set maximum size for this quad. More...
 
virtual UnifiedVec2 GetMinSize () const
 Gets the currently set minimum size for this quad. More...
 
virtual Boole GetMousePassthrough () const
 Gets whether or not Mouse Passthrough is enabled. More...
 
QuadRenderableGetNextSibling (Boole Wrap=true)
 Gets the QuadRenderable after this one among the QuadRenderables owned by it's parent. More...
 
virtual Whole GetNumChildren () const
 Gets the number of children in this QuadRenderable. More...
 
UInt32 GetNumRenderLayerGroups () const
 Gets the number of RenderLayerGroup's created for this renderable. More...
 
UInt32 GetNumRenderLayers () const
 Gets the number of RenderLayers created for this renderable. More...
 
UInt32 GetNumVisibleRenderLayers () const
 Gets the number of RenderLayers that are visible in this renderable. More...
 
QuadRenderableGetParent () const
 Gets the parent of this quad. More...
 
virtual const PositioningInfoGetPositioningPolicy () const
 Gets the current behavior this QuadRenderable will use when it is positioned. More...
 
QuadRenderableGetPrevSibling (Boole Wrap=true)
 Gets the QuadRenderable before this one among the QuadRenderables owned by it's parent. More...
 
virtual Rect GetRect () const
 Gets this QuadRenderables' Rect. More...
 
RenderLayerGetRenderLayer (const UInt32 &Index) const
 Gets a RenderLayer belonging to this QuadRenderable by index. More...
 
RenderLayerGetRenderLayer (const Whole Which, const UI::RenderLayerType Type)
 Gets a RenderLayer belonging to this QuadRenderable by it's type. More...
 
RenderLayerGroupGetRenderLayerGroup (const UInt16 GroupID) const
 Gets a RenderLayerGroup by ID. More...
 
virtual const SizingInfoGetSizingPolicy () const
 Gets the current behavior this QuadRenderable will use when it is sized. More...
 
QuadRenderableGetTopMostQuad ()
 Gets the QuadRenderable that is both an ancestor of this quad, and a direct child of the screen. More...
 
virtual UnifiedVec2 GetUnifiedPosition () const
 Gets the position of this QuadRenderable as a Unified Vector2. More...
 
virtual UnifiedRect GetUnifiedRect () const
 Gets the Unified positiona nd size of this QuadRenderable as a unified rect. More...
 
virtual UnifiedVec2 GetUnifiedSize () const
 Gets the size of this QuadRenderable as a Unified Vector2. More...
 
virtual Whole GetVerticalPositioningRules () const
 Gets the current behavior this quad will follow when it is positioned automatically on the Y axis. More...
 
virtual Whole GetVerticalSizingRules () const
 Gets the current behavior this quad will follow for the Y axis when it is resized. More...
 
virtual const UInt16GetZOrder () const
 Gets the currently set ZOrder of this QuadRenderable with it's parent. More...
 
virtual Boole IsChildOfScreen () const
 Gets whether or not this QuadRenderable is a direct child of it's screen. More...
 
virtual Boole IsInside (const Vector2 &Point) const
 Checks to see if a point in 2D space is inside this quad. More...
 
Boole IsVertexCachingEnabled () const
 Gets whether or not vertex caching is enabled for this Quad. More...
 
virtual void PopulateTextLinesInLayers (const Real MaxWidth)
 Populates all text lines in all text layers owned by this quad. More...
 
virtual void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
virtual void ProtoDeSerializeRenderLayerGroups (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the RenderLayerGroups of this object with it. More...
 
virtual void ProtoDeSerializeRenderLayers (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the RenderLayers of this object with it. More...
 
virtual void ProtoSerialize (XML::Node &ParentNode) const
 Convert this class to an XML::Node ready for serialization. More...
 
virtual void ProtoSerializeRenderLayerGroups (XML::Node &SelfRoot) const
 Convert the RenderLayerGroups of this class to an XML::Node ready for seriailization. More...
 
virtual void ProtoSerializeRenderLayers (XML::Node &SelfRoot) const
 Convert the RenderLayers of this class to an XML::Node ready for serialization. More...
 
ReverseChildIterator RChildrenBegin ()
 Gets an iterator to the last Widget. More...
 
ConstReverseChildIterator RChildrenBegin () const
 Gets a const iterator to the last Widget. More...
 
ReverseChildIterator RChildrenEnd ()
 Gets an iterator to one before the first child Widget. More...
 
ConstReverseChildIterator RChildrenEnd () const
 Gets a const iterator to one before the first child Widget. More...
 
virtual void RemoveAllChildren ()
 Removes all child Widgets from this QuadRenderable. More...
 
virtual void RemoveChild (Widget *ToBeRemoved)
 Removes a child Widget from this quadrenderable. More...
 
void RemoveLayerFromAllGroups (RenderLayer *Layer)
 Removes a single RenderLayer from all RenderLayerGroups owned by this QuadRenderable. More...
 
void RemoveLayerFromGroup (RenderLayer *Layer, const UInt16 GroupID)
 Removes a single RenderLayer from a specified RenderLayerGroup. More...
 
RenderLayerIterator RenderLayerBegin ()
 Gets an iterator to the first RenderLayer. More...
 
ConstRenderLayerIterator RenderLayerBegin () const
 Gets a const iterator to the first RenderLayer. More...
 
RenderLayerIterator RenderLayerEnd ()
 Gets an iterator to one passed the last RenderLayer. More...
 
ConstRenderLayerIterator RenderLayerEnd () const
 Gets an iterator to one passed the last RenderLayer. More...
 
RenderLayerGroupIterator RenderLayerGroupBegin ()
 Gets an iterator to the first RenderLayerGroup. More...
 
ConstRenderLayerGroupIterator RenderLayerGroupBegin () const
 Gets a const iterator to the first RenderLayerGroup. More...
 
RenderLayerGroupIterator RenderLayerGroupEnd ()
 Gets an iterator to one passed the last RenderLayerGroup. More...
 
ConstRenderLayerGroupIterator RenderLayerGroupEnd () const
 Gets an iterator to one passed the last RenderLayerGroup. More...
 
Boole RenderLayerGroupExists (const UInt16 GroupID) const
 Checks to see if a RenderLayerGroup exists. More...
 
void SetActiveGroup (const UInt16 GroupID)
 Sets the RenderLayerGroup that will be used to render this renderable. More...
 
void SetActiveGroup (RenderLayerGroup *Group)
 Sets the RenderLayerGroup that will be used to render this renderable. More...
 
virtual void SetAspectRatioLock (const UI::AspectRatioLock Lock)
 Sets how (and if) the aspect ratio of this quad is locked. More...
 
virtual void SetHorizontalPositioningRules (const Whole Rules)
 Sets the behavior this quad will have when it is positioned automatically on the X axis. More...
 
virtual void SetHorizontalSizingRules (const Whole Rules)
 Sets the behavior this quad will have on the X axis when it is resized. More...
 
void SetLocalVertexCaching (Boole Enable)
 Enables or disables caching of vertex's belonging to this and all child renderables. More...
 
virtual void SetManualTransformUpdates (Boole Enable)
 Sets whether or not this quad has specific behaviors for it's transform updates and they should not be done automatically. More...
 
virtual void SetMaxSize (const UnifiedVec2 &Max)
 Sets the maximum size this quad is allowed to have. More...
 
virtual void SetMinSize (const UnifiedVec2 &Min)
 Sets the minimum size this quad is allowed to have. More...
 
virtual void SetMousePassthrough (Boole Enable)
 Sets whether or not this quad should be skipped when determining if the mouse is hovered over this quad. More...
 
virtual void SetPositioningPolicy (const PositioningInfo &Policy)
 Sets the behavior to be used when this QuadRenderable is positioned. More...
 
virtual void SetSizingPolicy (const SizingInfo &Policy)
 Sets the behavior to be used when this QuadRenderable is sized. More...
 
virtual void SetUnifiedPosition (const UnifiedVec2 &Position)
 Sets the position this QuadRenderable will have within it's parent. More...
 
virtual void SetUnifiedSize (const UnifiedVec2 &Size)
 Sets the size this QuadRenderable will have within it's parent. More...
 
virtual void SetVerticalPositioningRules (const Whole Rules)
 Sets the behavior this quad will have when it is positioned automatically on the Y axis. More...
 
virtual void SetVerticalSizingRules (const Whole Rules)
 Sets the behavior this quad will have on the Y axis when it is resized. More...
 
virtual void UpdateChildDimensions ()
 Updates the dimensions of the children in this QuadRenderable. More...
 
virtual void UpdateChildOrder ()
 Updates the order of children in this QuadRenderable based on the ZOrder set on each child.
 
virtual void UpdateDimensions ()
 Updates the dimensions of this QuadRenderable based on the transform of it's parent. More...
 
- Public Member Functions inherited from Mezzanine::UI::Renderable
Boole _IsDirty () const
 Gets whether or not this renderable is dirty. More...
 
const StringGetName () const
 Gets the name of this renderable. More...
 
ScreenGetScreen () const
 Gets the parent screen of this renderable. More...
 
Boole IsScreen () const
 Gets whether or not this renderable is a Screen. More...
 
Boole IsWidget () const
 Gets whether or not this renderable is a Widget. More...
 
- Public Member Functions inherited from Mezzanine::EventPublisher
 EventPublisher ()
 Class constructor.
 
virtual ~EventPublisher ()
 Class destructor.
 
EventGetEvent (const String &EventName) const
 Gets an event in this publisher. More...
 
EventGetEventExcept (const String &EventName) const
 Gets an event in this publisher.

Exceptions
Thisversion differs from the non-except version in that if it fails to find the event specified it will throw a "II_IDENTITY_NOT_FOUND_EXCEPTION".
More...
 
Boole GetMuteEvents () const
 Gets whether or not event firings by this publisher will be suppressed. More...
 
void SetMuteEvents (const Boole Mute)
 Sets whether or not event firings by this publisher will be suppressed. More...
 
EventSubscriberSlotSubscribe (const String &EventName, EventSubscriber *Sub)
 Adds a subscriber to this event. More...
 
EventSubscriberSlotSubscribe (const String &EventName, FunctorEventSubscriber *Funct, Boole CleanUpAfter)
 Subscribes a functor object to this event. More...
 
EventSubscriberSlotSubscribe (const String &EventName, CFunctionSubscriberSlot::SubscriberFunction *CFunct)
 Subscribes a C-style function to this event. More...
 
EventSubscriberSlotSubscribe (const String &EventName, Scripting::iScript *SubScript)
 Subscribes a script to this event. More...
 
void Unsubscribe (EventSubscriber *Subscriber)
 Unsubscribes a single subscriber all events in this publisher. More...
 
void Unsubscribe (FunctorEventSubscriber *Funct)
 Unsubscribes a single subscriber all events in this publisher. More...
 
void Unsubscribe (CFunctionSubscriberSlot::SubscriberFunction *CFunct)
 Unsubscribes a single subscriber from all events in this publisher. More...
 
void Unsubscribe (Scripting::iScript *SubScript)
 Unsubscribes a single subscriber from all events in this publisher. More...
 
void Unsubscribe (EventSubscriberSlot *SubSlot)
 Unsubscribes a single subscriber from all events in this publisher. More...
 
void Unsubscribe (const String &EventName, EventSubscriber *Subscriber)
 Unsubscribes a single subscriber from the named event. More...
 
void Unsubscribe (const String &EventName, FunctorEventSubscriber *Funct)
 Unsubscribes a single subscriber from the named event. More...
 
void Unsubscribe (const String &EventName, CFunctionSubscriberSlot::SubscriberFunction *CFunct)
 Unsubscribes a single subscriber from the named event. More...
 
void Unsubscribe (const String &EventName, Scripting::iScript *SubScript)
 Unsubscribes a single subscriber from the named event. More...
 
void Unsubscribe (const String &EventName, EventSubscriberSlot *SubSlot)
 Unsubscribes a single subscriber from the named event. More...
 
Whole UnsubscribeAll ()
 Unsubscribes all subscribers from all events in this publisher. More...
 
Whole UnsubscribeAll (const String &EventName)
 Unsubscribes all subscribers from the named Event. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::UI::Widget
static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::UI::QuadRenderable
static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::UI::Renderable
static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 

Static Public Attributes

static const String TypeName = "ListBox"
 String containing the type name for this class: "ListBox".
 
- Static Public Attributes inherited from Mezzanine::UI::Widget
static const String EventFocusGained = "FocusGained"
 Event name for when this widget gains focus.
 
static const String EventFocusLocked = "FocusLocked"
 Event name for when the system locks focus on this widget.
 
static const String EventFocusLost = "FocusLost"
 Event name for when this widget loses focus.
 
static const String EventFocusUnlocked = "FocusUnlocked"
 Event name fow when the system removes the focus lock from this widget.
 
static const String EventMouseDragEnd = "MouseDragEnd"
 Event name for when the mouse stops dragging this widget.
 
static const String EventMouseDragStart = "MouseDragStart"
 Event name for when the mouse starts dragging this widget.
 
static const String EventMouseEnter = "MouseEnter"
 Event name for when the mouse enters this widget.
 
static const String EventMouseExit = "MouseExit"
 Event name for when the mouse leaves this widget.
 
static const String EventVisibilityHidden = "VisibilityHidden"
 Event name for when this widget is switched from being shown to being hidden.
 
static const String EventVisibilityShown = "VisibilityShown"
 Event name for when this widget is switched from being hidden to being shown.
 
static const String TypeName = "GenericWidget"
 String containing the type name for this class: "GenericWidget".
 

Protected Member Functions

virtual void ConstructListBox (const UI::ScrollbarStyle &Style)
 Convenience method for the construction of a ListBox. More...
 
virtual ListItemCreateListItem (const String &ItemName)
 Helper method that creates a basic ListItem with no TextLayers. More...
 
virtual Boole HandleInputImpl (const Input::MetaCode &Code)
 Consumes input for this widget's use. More...
 
- Protected Member Functions inherited from Mezzanine::UI::Widget
void ConstructWidget ()
 Contains all the common necessary startup initializations for this class. More...
 
virtual void HandleChildStateChangeImpl (Widget *Child, const UInt32 &OldState, const UInt32 &NewState)
 Handles the logic to execute when a child of this widget has it's state updated. More...
 
virtual void ProtoDeSerializeImpl (const XML::Node &SelfRoot)
 Implementation method for deseriailizing additional sets of data. More...
 
virtual void ProtoSerializeImpl (XML::Node &SelfRoot) const
 Implementation method for serializing additional sets of data. More...
 
- Protected Member Functions inherited from Mezzanine::UI::QuadRenderable
void AppendLayerVertices (std::vector< VertexData > &Vertices)
 Adds all the vertices belonging to all the layers of this renderable to the provided vector. More...
 
RenderLayerGroupCreateRenderLayerGroupNoCheck (const UInt16 ID)
 Creates a new RenderLayerGroup with the provided ID, without checking if it is unique. More...
 
void ResizeLayers (const Whole NewSize)
 Resizes the container for RenderLayers in this QuadRenderable. More...
 
- Protected Member Functions inherited from Mezzanine::UI::Renderable
 Renderable (Screen *Parent)
 Blank constructor. More...
 
 Renderable (const String &RendName, Screen *Parent)
 Class constructor. More...
 
virtual ~Renderable ()
 Class destructor.
 
- Protected Member Functions inherited from Mezzanine::EventPublisher
EventAddEvent (const String &EventName)
 Creates a new event this Publisher can fire. More...
 
void FireEvent (EventArgumentsPtr Args)
 Fires an event. More...
 
void RemoveAllEvents ()
 Removes all events in this Publisher. More...
 
void RemoveEvent (const String &EventName)
 Removes an existing event in this Publisher. More...
 
- Protected Member Functions inherited from Mezzanine::EventSubscriber
 EventSubscriber ()
 Class constructor.
 
virtual ~EventSubscriber ()
 Class destructor.
 

Protected Attributes

VerticalContainerListContainer
 A pointer to the vertical container storing all the list items. More...
 
Real ListItemCharScaling
 The amount of auto-scaling to be applied to all created list items. More...
 
TextLayer::ScalingMode ListItemCharScalingMode
 The auto-scaling mode that is to be applied to all created list items. More...
 
FontDataListItemFont
 Stores the default font that will be used by all ListItems generated by this ListBox. More...
 
VerticalScrollbarListScroll
 A pointer to the vertical scrollbar responsible for the visible list items. More...
 
ListItemOrdering Ordering
 Stores how new entries will be inserted with other elements in this ListBox. More...
 
- Protected Attributes inherited from Mezzanine::UI::Widget
WidgetHoveredSubWidget
 The child widget of this widget the mouse is over, if any. More...
 
UInt32 State
 UInt32 describing the current state of this widget. More...
 
StateLayerGroupMap StateGroupBindings
 Map containing all the RenderLayerGroups bound to specific widget states. More...
 
- Protected Attributes inherited from Mezzanine::UI::QuadRenderable
Rect ActDims
 The actual (pixel) position and size of this Quad on the screen it belongs to. More...
 
RenderLayerGroupActiveGroup
 This is a pointer to the group of RenderLayers currently being used for rendering. More...
 
Boole AllLayersDirty
 Determines whether or not this Quad needs all of it's layers refreshed. Usually after a transform update. More...
 
ChildContainer ChildWidgets
 This is a container storing all the children that belong to this Quad. More...
 
LayoutStrategyLayoutStrat
 This is a pointer to the strategy being used by this Quad to determine the positions and sizes of children during transform updates. More...
 
Boole ManualTransformUpdates
 Controls whether or not this Quad and it's children will recieve automatic transform updates. More...
 
Boole MousePassthrough
 Controls whether or not this Quad will be considered for mouse hover checks. More...
 
QuadRenderableParentQuad
 This is a pointer to the Quad that owns this Quad and is responsible for transform updates applied to this Quad. More...
 
PositioningInfo PositioningPolicy
 This stores all the information needed to determine the specific behaviors this Quad should have when it's position is being updated. More...
 
RenderLayerGroupContainer RenderLayerGroups
 This is a container storing all the RenderLayerGroup instances created by and belonging to this Quad. More...
 
RenderLayerContainer RenderLayers
 This is a container storing all the RenderLayer instances created by and belonging to this Quad. More...
 
SizingInfo SizingPolicy
 This stores all the information needed to determine the specific behaviors this Quad should have when it's size is being updated. More...
 
ScreenRenderDataVertexCache
 This is a pointer to the optional cache of vertex's belonging to this Quad and all of it's children. More...
 
UInt16 ZOrder
 This is the ZOrder of this Quad in relation to all other Quads in it's parent. More...
 
- Protected Attributes inherited from Mezzanine::UI::Renderable
Boole Dirty
 Stores whether this Renderables vertices need to be regenerated. More...
 
String Name
 The unique name of this Renderable. More...
 
ScreenParentScreen
 A pointer to the Screen that created this Renderable. More...
 
Boole Visible
 Stores whether this Renderable is to be rendered (also dependent on parent visibility). More...
 
- Protected Attributes inherited from Mezzanine::EventPublisher
EventContainer Events
 A container storing all the Events published by this class by name. More...
 
Boole MuteEvents
 Stores whether or not events will actually be fired when requested. More...
 

Detailed Description

This is a widget for displaying a list of captions in a box.

This class uses the base LayoutStrategy.

Remarks
ListItems owned by a ListBox are not direct children of the ListBox. Instead they are direct children of the VerticalContainer that is the child of the ListBox. There are convenience methods that allow light management of ListItems, but they are really just wrappers around similiar methods on the VerticalContainer.

Definition at line 63 of file listbox.h.

Member Enumeration Documentation

This enum is used to describe how new ListItems are inserted into the list.

Enumerator
LIO_TopInsert 

New entries will be inserted at the top of the list.

LIO_BottomInsert 

New entries will be inserted at the bottom of the list.

Definition at line 70 of file listbox.h.

Constructor & Destructor Documentation

Mezzanine::UI::ListBox::ListBox ( Screen Parent)

Blank constructor.

Parameters
ParentThe parent Screen that created this widget.

Definition at line 75 of file listbox.cpp.

Mezzanine::UI::ListBox::ListBox ( const String RendName,
const UI::ScrollbarStyle Style,
Screen Parent 
)

Standard initialization constructor.

Parameters
RendNameThe name to be given to this renderable.
StyleAn enum value representing how the scrollbar child of thie ListBox will be constructed. See UI::ScrollbarStyle enum for more info.
ParentThe parent Screen that created this widget.

Definition at line 83 of file listbox.cpp.

Mezzanine::UI::ListBox::ListBox ( const String RendName,
const UnifiedRect RendRect,
const UI::ScrollbarStyle Style,
Screen Parent 
)

Rect constructor.

Parameters
RendNameThe name to be given to this renderable.
RendRectThe rect describing this widget's transform relative to it's parent.
StyleAn enum value representing how the scrollbar child of thie ListBox will be constructed. See UI::ScrollbarStyle enum for more info.
ParentThe parent screen that created this renderable.

Definition at line 91 of file listbox.cpp.

Mezzanine::UI::ListBox::ListBox ( const XML::Node XMLNode,
Screen Parent 
)

XML constructor.

Parameters
XMLNodeThe node of the xml document to construct from.
ParentThe screen the created ListBox will belong to.

Definition at line 99 of file listbox.cpp.

Member Function Documentation

void Mezzanine::UI::ListBox::ConstructListBox ( const UI::ScrollbarStyle Style)
protectedvirtual

Convenience method for the construction of a ListBox.

Parameters
StyleAn enum value representing how the scrollbar child of thie ListBox will be constructed. See UI::ScrollbarStyle enum for more info.

Definition at line 124 of file listbox.cpp.

ListBox::ListItem * Mezzanine::UI::ListBox::CreateListItem ( const String ItemName)
protectedvirtual

Helper method that creates a basic ListItem with no TextLayers.

Parameters
ItemNameThe name to be given to the new ListItem.
Returns
Returns a pointer to the newly created ListItem.

Definition at line 142 of file listbox.cpp.

ListBox::ListItem * Mezzanine::UI::ListBox::CreateMultiLineListItem ( const String ItemName,
const String Text 
)
virtual

Convenience method that will create and add a ListItem with a multi-line text layer to this ListBox.

Note
The auto-created text layers ZOrder is 5. TextLine(s) in the ListItem are set to a centered vertical alignment. ListItems by default are sized to automatically fill the full X axis of it's container, and X+2 pixels in height, where the height is the space needed for all it's text lines. New ListItems are also automatically added as a child of this ListBox, so you don't need to add them to the ListBox yourself.
Parameters
ItemNameThe name to be given to the new ListItem.
TextThe text that is to be created and assigned to the new list item.
Returns
Returns a pointer to the newly created ListItem.

Definition at line 254 of file listbox.cpp.

ListBox::ListItem * Mezzanine::UI::ListBox::CreateSingleLineListItem ( const String ItemName,
const String Text 
)
virtual

Convenience method that will create and add a ListItem with a single line text layer to this ListBox.

Note
The auto-created text layers ZOrder is 5. TextLine(s) in the ListItem are set to a centered vertical alignment. ListItems by default are sized to automatically fill the full X axis of it's container, and X+2 pixels in height, where the height is the space needed for all it's text lines. New ListItems are also automatically added as a child of this ListBox, so you don't need to add them to the ListBox yourself.
Parameters
ItemNameThe name to be given to the new ListItem.
TextThe text that is to be created and assigned to the new list item.
Returns
Returns a pointer to the newly created ListItem.

Definition at line 236 of file listbox.cpp.

void Mezzanine::UI::ListBox::DestroyListItem ( ListItem ToBeDestroyed)
virtual

Destroys a ListItem owned by this ListBox.

Parameters
ToBeDestroyedA pointer to the ListItem to be destroyed.

Definition at line 278 of file listbox.cpp.

ListBox::ListItem * Mezzanine::UI::ListBox::GetLastSelectedListItem ( ) const
virtual

Gets the last ListItem that was selected/focused.

Returns
Returns a pointer to the last ListItem that was selected/focused.

Definition at line 290 of file listbox.cpp.

VerticalContainer * Mezzanine::UI::ListBox::GetListContainer ( ) const
virtual

Gets the ListItem container within this widget.

Returns
Returns a pointer to the VerticalContainer used to store the ListItems of this widget.

Definition at line 287 of file listbox.cpp.

ListBox::ListItem * Mezzanine::UI::ListBox::GetListItem ( const String Name) const
virtual

Gets a ListItem in this ListBox by name.

Parameters
NameThe name of the ListItem to retrieve.
Returns
Returns a pointer to the specified ListItem.

Definition at line 272 of file listbox.cpp.

FontData * Mezzanine::UI::ListBox::GetListItemFont ( ) const
virtual

Gets the font that will be used by ListItems in this ListBox.

Returns
Returns a pointer to the Font being used by all ListItems generated by this ListBox.

Definition at line 212 of file listbox.cpp.

ListBox::ListItemOrdering Mezzanine::UI::ListBox::GetListItemOrdering ( ) const
virtual

Gets how new entries will be inserted into the list.

Returns
Returns a ListItemOrdering enum value representing how new ListItems are being inserted into this ListBox.

Definition at line 230 of file listbox.cpp.

const SizingInfo & Mezzanine::UI::ListBox::GetListItemSize ( ) const
virtual

Gets the size to be given to children processed by this container if forced sizing is enabled.

Returns
Returns a const SizeInfo reference to the sizing given to children processed by this container if forced sizing is enabled.

Definition at line 171 of file listbox.cpp.

Whole Mezzanine::UI::ListBox::GetListItemSizeEnforcement ( ) const
virtual

Gets when the set list item sizing will be applied to any given list item.

Returns
Returns a bitmask describing when the list item sizing will be enforced by this container. See SizeEnforcement enum for more details.

Definition at line 177 of file listbox.cpp.

Real Mezzanine::UI::ListBox::GetListItemTextScalar ( ) const
virtual

Gets the relative scalar being used to automatically scale text in ListItems created by this ListBox.

Returns
Returns a Real representing the relative Y size to use when detmining how to uniformly scale text in ListItems.

Definition at line 224 of file listbox.cpp.

TextLayer::ScalingMode Mezzanine::UI::ListBox::GetListItemTextScalingMode ( ) const
virtual

Gets the automatic scaling mode being used by ListItems created by this ListBox.

Returns
Returns a ScalingMode enum value describing what the relative scaler is relative to, if auto-scaling is enabled at all.

Definition at line 221 of file listbox.cpp.

VerticalScrollbar * Mezzanine::UI::ListBox::GetListScroll ( ) const
virtual

Gets the Scrollbar within this widget.

Returns
Returns a pointer to the VerticalScrollbar used to scroll through the ListItems of this widget.

Definition at line 284 of file listbox.cpp.

Whole Mezzanine::UI::ListBox::GetNumListItems ( ) const
virtual

Gets the number of ListItems in this ListBox.

Returns
Returns a Whole representing the number of ListItems owned by this ListBox.

Definition at line 275 of file listbox.cpp.

const UnifiedDim & Mezzanine::UI::ListBox::GetScrollbarWidth ( ) const
virtual

Gets the Unified width of the child scrollbar in this ListBox.

Returns
Returns a const reference to the Unified dimension containing the width of the child scrollbar.

Definition at line 187 of file listbox.cpp.

String Mezzanine::UI::ListBox::GetSerializableName ( )
static

Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.

Returns
A string containing the name of this class.

Definition at line 368 of file listbox.cpp.

const String & Mezzanine::UI::ListBox::GetTypeName ( ) const
virtual

Gets the type of widget this is.

Returns
Returns a const String reference representing the type of widget this is.

Reimplemented from Mezzanine::UI::Widget.

Definition at line 198 of file listbox.cpp.

Boole Mezzanine::UI::ListBox::HandleInputImpl ( const Input::MetaCode Code)
protectedvirtual

Consumes input for this widget's use.

Parameters
CodeThe input to be processed.
Returns
Returns true if the input was handled, false otherwise.

Reimplemented from Mezzanine::UI::Widget.

Definition at line 116 of file listbox.cpp.

void Mezzanine::UI::ListBox::ProtoDeSerializeChildQuads ( const XML::Node SelfRoot)
virtual

Take the data stored in an XML Node and overwrite the ChildQuads of this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Reimplemented from Mezzanine::UI::QuadRenderable.

Definition at line 351 of file listbox.cpp.

void Mezzanine::UI::ListBox::ProtoDeSerializeProperties ( const XML::Node SelfRoot)
virtual

Take the data stored in an XML Node and overwrite the properties of this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Reimplemented from Mezzanine::UI::Widget.

Definition at line 319 of file listbox.cpp.

void Mezzanine::UI::ListBox::ProtoSerializeChildQuads ( XML::Node SelfRoot) const
virtual

Convert the child quads of this class to an XML::Node ready for serialization.

Parameters
SelfRootThe root node containing all the serialized data for this instance.

Reimplemented from Mezzanine::UI::QuadRenderable.

Definition at line 314 of file listbox.cpp.

void Mezzanine::UI::ListBox::ProtoSerializeProperties ( XML::Node SelfRoot) const
virtual

Convert the properties of this class to an XML::Node ready for serialization.

Parameters
SelfRootThe root node containing all the serialized data for this instance.

Reimplemented from Mezzanine::UI::Widget.

Definition at line 296 of file listbox.cpp.

void Mezzanine::UI::ListBox::SetListItemFont ( FontData Font)
virtual

Sets the font that will be used by ListItems in this ListBox.

Note
This method is not retroactive. ListItems that have been already created won't be altered, but new ListItems will have the specified font as their default font (which can be overridden via Markup).
Parameters
FontA pointer to the font that will be used by ListItems in this ListBox.

Definition at line 206 of file listbox.cpp.

void Mezzanine::UI::ListBox::SetListItemFont ( const String FontName)
virtual

Sets the font that will be used by ListItems in this ListBox.

Note
This method is not retroactive. ListItems that have been already created won't be altered, but new ListItems will have the specified font as their default font (which can be overridden via Markup).
Parameters
FontNameThe name of the Font to use when creating ListItems in this ListBox.

Definition at line 209 of file listbox.cpp.

void Mezzanine::UI::ListBox::SetListItemOrdering ( ListBox::ListItemOrdering  Order)
virtual

Sets how new entries will be inserted into the list.

Parameters
OrderA ListItemOrdering enum value expressing how this ListBox is to insert new entries.

Definition at line 227 of file listbox.cpp.

void Mezzanine::UI::ListBox::SetListItemSize ( const SizingInfo ForcedSize)
virtual

Sets the size to be given to children processed by this container if forced sizing is enabled.

Note
The sizing provided here works just like any other normal list item sizing does, with the relative parts being based on the the parent container (this).
Parameters
ForcedSizeA SizingInfo describing how all children should size themselves on dimension updates.

Definition at line 168 of file listbox.cpp.

void Mezzanine::UI::ListBox::SetListItemSizeEnforcement ( const Whole  Enforcement)
virtual

Sets when the set list item sizing will be applied to any given list item.

Parameters
EnforcementA bitmask containing when the list item sizing will be enforced by this container. See SizeEnforcement enum for more details.

Definition at line 174 of file listbox.cpp.

void Mezzanine::UI::ListBox::SetListItemSizing ( const SizingInfo ForcedSize,
const Whole  Enforcement 
)
virtual

Sets both the size and enforcement rules for forced list item sizing in this container.

Note
The sizing provided here works just like any other normal list item sizing does, with the relative parts being based on the the parent container (this).
Parameters
ForcedSizeA SizingInfo describing how all children should size themselves on dimension updates.
EnforcementA bitmask containing when the list item sizing will be enforced by this container. See SizeEnforcement enum for more details.

Definition at line 165 of file listbox.cpp.

void Mezzanine::UI::ListBox::SetListItemTextScale ( const TextLayer::ScalingMode  Mode,
const Real  Scalar 
)
virtual

Sets the mode and scaler of auto-scaling applied to ListItems created by this ListBox.

Remarks
There are a lot of considerations to be made with auto-scaling. Auto-scaling will adjust the size of the provided font automatically based on the scaling mode that is set, which really decides what the relative scalar provided for auto-scaling is relative to. If auto-scaling is relative to the screen, then the text will only change in size when the screen does. Parent and layer relative scaling are very similiar since layers get their dimensions from the parent widget they belong to. The difference comes from scaling applied to the layer itself. Parent relative scaling ignores the layer scaling, while layer relative factors it in.

In addition to the relative component to the scaling, manual scaling will also be applied after the auto-scaling is. Auto-scaling will be completely ignored if the custom size on a character is set.
Parameters
ModeA ScalingMode enum value describing what the provided scaler will be relative to.
ScalarThe relative value that will be used to determine the needed scaling to be applied to text in this layer.

Definition at line 215 of file listbox.cpp.

void Mezzanine::UI::ListBox::SetScrollbarWidth ( const UnifiedDim ScrollWidth)
virtual

Sets the Unified width of the child scrollbar in this ListBox.

Note
This defaults to UnifiedDim(0.08,0.0).
Parameters
ScrollWidthThe relative (to this) and absolute components of the width to be given the child scrollbar.
Todo:
Update for Autohide.

Definition at line 180 of file listbox.cpp.

void Mezzanine::UI::ListBox::UpdateDimensions ( const Rect OldSelfRect,
const Rect NewSelfRect 
)
virtual

Updates the dimensions of this QuadRenderable based on the transform of it's parent.

This function is called automatically by this objects parent when it changes in size or position, and should only need to be called manually if the positioning or sizing rules were updated manually.

Parameters
OldSelfRectThe previous dimensions of this quad prior to it's dimensions being updated.
NewSelfRectThe updated and current dimensions of this quad.
Todo:
Update for Autohide.

Reimplemented from Mezzanine::UI::QuadRenderable.

Definition at line 192 of file listbox.cpp.

Member Data Documentation

VerticalContainer* Mezzanine::UI::ListBox::ListContainer
protected

A pointer to the vertical container storing all the list items.

Definition at line 87 of file listbox.h.

Real Mezzanine::UI::ListBox::ListItemCharScaling
protected

The amount of auto-scaling to be applied to all created list items.

Definition at line 90 of file listbox.h.

TextLayer::ScalingMode Mezzanine::UI::ListBox::ListItemCharScalingMode
protected

The auto-scaling mode that is to be applied to all created list items.

Definition at line 93 of file listbox.h.

FontData* Mezzanine::UI::ListBox::ListItemFont
protected

Stores the default font that will be used by all ListItems generated by this ListBox.

Definition at line 81 of file listbox.h.

VerticalScrollbar* Mezzanine::UI::ListBox::ListScroll
protected

A pointer to the vertical scrollbar responsible for the visible list items.

Definition at line 84 of file listbox.h.

ListItemOrdering Mezzanine::UI::ListBox::Ordering
protected

Stores how new entries will be inserted with other elements in this ListBox.

Definition at line 96 of file listbox.h.


The documentation for this class was generated from the following files: