XII Release 0.1.0
Loading...
Searching...
No Matches
xiiDefaultContainerState Class Reference

Object used to query and revert to the default state of all elements of a container of an object. More...

#include <DefaultState.h>

Public Member Functions

 xiiDefaultContainerState (xiiObjectAccessorBase *pAccessor, const xiiArrayPtr< xiiPropertySelection > selection, xiiStringView sProperty)
 Constructor. Will collect the appropriate xiiDefaultStateProviders to query the states.
 
xiiColorGammaUB GetBackgroundColor () const
 Returns the color of the top-most xiiDefaultStateProvider of the first element of the selection.
 
xiiString GetStateProviderName () const
 Returns the name of the top-most xiiDefaultStateProvider of the first element of the selection.
 
bool IsDefaultElement (xiiVariant index) const
 
bool IsDefaultContainer () const
 
xiiStatus RevertElement (xiiVariant index)
 
xiiStatus RevertContainer ()
 
xiiVariant GetDefaultElement (xiiVariant index, xiiUInt32 uiSelectionIndex=0) const
 
xiiVariant GetDefaultContainer (xiiUInt32 uiSelectionIndex=0) const
 

Detailed Description

Object used to query and revert to the default state of all elements of a container of an object.

This class should not be persisted in memory and just used on the stack to query all element states and then destroyed. It should also not be used across hierarchical changes of any kind (deleting objects etc).

Constructor & Destructor Documentation

◆ xiiDefaultContainerState()

xiiDefaultContainerState::xiiDefaultContainerState ( xiiObjectAccessorBase * pAccessor,
const xiiArrayPtr< xiiPropertySelection > selection,
xiiStringView sProperty )

Constructor. Will collect the appropriate xiiDefaultStateProviders to query the states.

Parameters
pAccessorUsed to revert properties and query their current value.
selectionFor which objects the default state should be queried. If xiiPropertySelection::m_Index is set, IsDefaultElement and RevertElement will query the value under that index if the passed in index is invalid.
sPropertyThe name of the container for which default states should be queried.

Member Function Documentation

◆ GetBackgroundColor()

xiiColorGammaUB xiiDefaultContainerState::GetBackgroundColor ( ) const

Returns the color of the top-most xiiDefaultStateProvider of the first element of the selection.

See also
xiiDefaultStateProvider::GetBackgroundColor

◆ GetStateProviderName()

xiiString xiiDefaultContainerState::GetStateProviderName ( ) const

Returns the name of the top-most xiiDefaultStateProvider of the first element of the selection.

See also
xiiDefaultStateProvider::GetStateProviderName

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