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

An item in a UIToolBar. More...

#include <CeresEngine/UI/UIToolBar.hpp>

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

Public Member Functions

 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.
 

Public Attributes

Event< void()> didSelect
 An event triggered whenever the toolbar item is selected.
 

Private Attributes

String mItemIdentifier
 The receiver's identifier.
 
UIToolBarmToolBar = nullptr
 The toolbar that is using the receiver.
 
String mLabel
 The receiver's label.
 
String mToolTip
 The tooltip used when the receiver is displayed in the toolbar.
 
String mTitle
 The title of the toolbar item.
 
bool mBordered = true
 A Boolean value that determines whether the toolbar item has a bordered style.
 
bool mNavigational = false
 A Boolean value that indicates whether the item behaves as a navigation item in the toolbar.
 
bool mEnabled = true
 A Boolean value that indicates whether the receiver is enabled.
 
HTexture mTexture = nullptr
 The texture of the receiver.
 
RC< UIViewmView = nullptr
 The receiver's view.
 
RC< UIViewmActualView = nullptr
 A private field that holds the actual button view for the toolbar.
 

Friends

class UIToolBar
 

Detailed Description

An item in a UIToolBar.

Constructor & Destructor Documentation

◆ UIToolBarItem()

CeresEngine::UIToolBarItem::UIToolBarItem ( const String itemIdentifier)
explicit

Creates a new toolbar item with the given identifier.

Parameters
itemIdentifierThe identifier for the receiver. itemIdentifier is never seen by users and should not be localized.

◆ ~UIToolBarItem()

virtual CeresEngine::UIToolBarItem::~UIToolBarItem ( )
virtual

Member Function Documentation

◆ getItemIdentifier()

const String & CeresEngine::UIToolBarItem::getItemIdentifier ( ) const
inlinenoexcept

The receiver's identifier.

The identifier is used by the toolbar and its delegate to identify the kind of the toolbar item.

◆ getLabel()

const String & CeresEngine::UIToolBarItem::getLabel ( ) const
inlinenoexcept

The receiver's label.

◆ getTexture()

const HTexture & CeresEngine::UIToolBarItem::getTexture ( ) const
inlinenoexcept

Generates a hash for the provided type.

Type must have a std::hash specialization.

Template Parameters
Tthe type to be hashed
Parameters
vThe value to be hashed
Returns
The hashed value

◆ getTitle()

const String & CeresEngine::UIToolBarItem::getTitle ( ) const
inlinenoexcept

The title of the toolbar item.

◆ getToolBar()

UIToolBar * CeresEngine::UIToolBarItem::getToolBar ( ) const
inlinenoexcept

The toolbar that is using the receiver.

◆ getToolTip()

const String & CeresEngine::UIToolBarItem::getToolTip ( ) const
inlinenoexcept

The tooltip used when the receiver is displayed in the toolbar.

◆ getView()

UIView * CeresEngine::UIToolBarItem::getView ( ) const
inlinenoexcept

The receiver's view.

◆ isBordered()

bool CeresEngine::UIToolBarItem::isBordered ( ) const
inlinenoexcept

A Boolean value that determines whether the toolbar item has a bordered style.

◆ isEnabled()

bool CeresEngine::UIToolBarItem::isEnabled ( ) const
inlinenoexcept

A Boolean value that indicates whether the receiver is enabled.

◆ isNavigational()

bool CeresEngine::UIToolBarItem::isNavigational ( ) const
inlinenoexcept

A Boolean value that indicates whether the item behaves as a navigation item in the toolbar.

◆ setBordered()

void CeresEngine::UIToolBarItem::setBordered ( bool  bordered)

A Boolean value that determines whether the toolbar item has a bordered style.

◆ setEnabled()

void CeresEngine::UIToolBarItem::setEnabled ( bool  enabled)

A Boolean value that indicates whether the receiver is enabled.

◆ setLabel()

void CeresEngine::UIToolBarItem::setLabel ( const String label)

The receiver's label.

◆ setNavigational()

void CeresEngine::UIToolBarItem::setNavigational ( bool  navigational)

A Boolean value that indicates whether the item behaves as a navigation item in the toolbar.

◆ setTexture()

void CeresEngine::UIToolBarItem::setTexture ( const HTexture texture)

Generates a hash for the provided type.

Type must have a std::hash specialization.

Template Parameters
Tthe type to be hashed
Parameters
vThe value to be hashed
Returns
The hashed value

◆ setTitle()

void CeresEngine::UIToolBarItem::setTitle ( const String title)

The title of the toolbar item.

◆ setToolTip()

void CeresEngine::UIToolBarItem::setToolTip ( const String toolTip)

The tooltip used when the receiver is displayed in the toolbar.

◆ setView()

void CeresEngine::UIToolBarItem::setView ( UIView view)

The receiver's view.

Friends And Related Symbol Documentation

◆ UIToolBar

Member Data Documentation

◆ didSelect

Event<void()> CeresEngine::UIToolBarItem::didSelect

An event triggered whenever the toolbar item is selected.

◆ mActualView

RC<UIView> CeresEngine::UIToolBarItem::mActualView = nullptr
private

A private field that holds the actual button view for the toolbar.

◆ mBordered

bool CeresEngine::UIToolBarItem::mBordered = true
private

A Boolean value that determines whether the toolbar item has a bordered style.

◆ mEnabled

bool CeresEngine::UIToolBarItem::mEnabled = true
private

A Boolean value that indicates whether the receiver is enabled.

◆ mItemIdentifier

String CeresEngine::UIToolBarItem::mItemIdentifier
private

The receiver's identifier.

The identifier is used by the toolbar and its delegate to identify the kind of the toolbar item.

◆ mLabel

String CeresEngine::UIToolBarItem::mLabel
private

The receiver's label.

◆ mNavigational

bool CeresEngine::UIToolBarItem::mNavigational = false
private

A Boolean value that indicates whether the item behaves as a navigation item in the toolbar.

◆ mTexture

HTexture CeresEngine::UIToolBarItem::mTexture = nullptr
private

The texture of the receiver.

◆ mTitle

String CeresEngine::UIToolBarItem::mTitle
private

The title of the toolbar item.

◆ mToolBar

UIToolBar* CeresEngine::UIToolBarItem::mToolBar = nullptr
private

The toolbar that is using the receiver.

◆ mToolTip

String CeresEngine::UIToolBarItem::mToolTip
private

The tooltip used when the receiver is displayed in the toolbar.

◆ mView

RC<UIView> CeresEngine::UIToolBarItem::mView = nullptr
private

The receiver's view.


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