CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::UIToolBarItemGroup Class Reference

A group of subitems in a toolbar item. More...

#include <CeresEngine/UI/UIToolBar.hpp>

Inheritance diagram for CeresEngine::UIToolBarItemGroup:
CeresEngine::UIToolBarItem

Public Member Functions

 UIToolBarItemGroup (const String &itemIdentifier, const Vector< SPtr< UIToolBarItem > > &subItems)
 Creates a new toolbar group item with the given identifier.
 
 ~UIToolBarItemGroup () override
 
const Vector< SPtr< UIToolBarItem > > & getSubItems () const noexcept
 The subitems for the receiver.
 
void getSubItems (const Vector< SPtr< UIToolBarItem > > &subItems)
 The subitems for the receiver.
 
- Public Member Functions inherited from CeresEngine::UIToolBarItem
 UIToolBarItem (const String &itemIdentifier)
 Creates a new toolbar item with the given identifier.
 
virtual ~UIToolBarItem ()
 
const StringgetItemIdentifier () const noexcept
 The receiver's identifier.
 
UIToolBargetToolBar () const noexcept
 The toolbar that is using the receiver.
 
const StringgetLabel () const noexcept
 The receiver's label.
 
void setLabel (const String &label)
 The receiver's label.
 
const StringgetToolTip () const noexcept
 The tooltip used when the receiver is displayed in the toolbar.
 
void setToolTip (const String &toolTip)
 The tooltip used when the receiver is displayed in the toolbar.
 
const StringgetTitle () const noexcept
 The title of the toolbar item.
 
void setTitle (const String &title)
 The title of the toolbar item.
 
bool isBordered () const noexcept
 A Boolean value that determines whether the toolbar item has a bordered style.
 
void setBordered (bool bordered)
 A Boolean value that determines whether the toolbar item has a bordered style.
 
bool isNavigational () const noexcept
 A Boolean value that indicates whether the item behaves as a navigation item in the toolbar.
 
void setNavigational (bool navigational)
 A Boolean value that indicates whether the item behaves as a navigation item in the toolbar.
 
bool isEnabled () const noexcept
 A Boolean value that indicates whether the receiver is enabled.
 
void setEnabled (bool enabled)
 A Boolean value that indicates whether the receiver is enabled.
 
const HTexturegetTexture () const noexcept
 Generates a hash for the provided type.
 
void setTexture (const HTexture &texture)
 Generates a hash for the provided type.
 
UIViewgetView () const noexcept
 The receiver's view.
 
void setView (UIView *view)
 The receiver's view.
 

Private Attributes

Vector< SPtr< UIToolBarItem > > mSubItems
 The subitems for the receiver.
 

Additional Inherited Members

- Public Attributes inherited from CeresEngine::UIToolBarItem
Event< void()> didSelect
 An event triggered whenever the toolbar item is selected.
 

Detailed Description

A group of subitems in a toolbar item.

In an UIToolBarItemGroup, the views and labels of the subitems are used, but the parent's attributes take precedence.

To configure an instance of UIToolBarItemGroup, you first create the individual toolbar items that will be the subitems and then put them in a grouped item.

Constructor & Destructor Documentation

◆ UIToolBarItemGroup()

CeresEngine::UIToolBarItemGroup::UIToolBarItemGroup ( const String itemIdentifier,
const Vector< SPtr< UIToolBarItem > > &  subItems 
)

Creates a new toolbar group item with the given identifier.

Parameters
itemIdentifierThe identifier for the receiver. itemIdentifier is never seen by users and should not be localized.
subItemsThe initial subitems to be added to the group.

◆ ~UIToolBarItemGroup()

CeresEngine::UIToolBarItemGroup::~UIToolBarItemGroup ( )
override

Member Function Documentation

◆ getSubItems() [1/2]

const Vector< SPtr< UIToolBarItem > > & CeresEngine::UIToolBarItemGroup::getSubItems ( ) const
inlinenoexcept

The subitems for the receiver.

By default, an UIToolBarItemGroup instance has an empty array of subitems.

◆ getSubItems() [2/2]

void CeresEngine::UIToolBarItemGroup::getSubItems ( const Vector< SPtr< UIToolBarItem > > &  subItems)

The subitems for the receiver.

By default, an UIToolBarItemGroup instance has an empty array of subitems.

Member Data Documentation

◆ mSubItems

Vector<SPtr<UIToolBarItem> > CeresEngine::UIToolBarItemGroup::mSubItems
private

The subitems for the receiver.

By default, an UIToolBarItemGroup instance has an empty array of subitems.


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