![]() |
Plasma Engine
2.0
|
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 | |
plDefaultContainerState (plObjectAccessorBase *pAccessor, const plArrayPtr< plPropertySelection > selection, const char *szProperty) | |
Constructor. Will collect the appropriate plDefaultStateProviders to query the states. | |
plColorGammaUB | GetBackgroundColor () const |
Returns the color of the top-most plDefaultStateProvider of the first element of the selection. | |
plString | GetStateProviderName () const |
Returns the name of the top-most plDefaultStateProvider of the first element of the selection. | |
bool | IsDefaultElement (plVariant index) const |
bool | IsDefaultContainer () const |
plStatus | RevertElement (plVariant index) |
plStatus | RevertContainer () |
plVariant | GetDefaultElement (plVariant index, plUInt32 uiSelectionIndex=0) const |
plVariant | GetDefaultContainer (plUInt32 uiSelectionIndex=0) const |
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).
plDefaultContainerState::plDefaultContainerState | ( | plObjectAccessorBase * | pAccessor, |
const plArrayPtr< plPropertySelection > | selection, | ||
const char * | szProperty ) |
Constructor. Will collect the appropriate plDefaultStateProviders to query the states.
pAccessor | Used to revert properties and query their current value. |
selection | For which objects the default state should be queried. If plPropertySelection::m_Index is set, IsDefaultElement and RevertElement will query the value under that index if the passed in index is invalid. |
szProperty | The name of the container for which default states should be queried. |
plColorGammaUB plDefaultContainerState::GetBackgroundColor | ( | ) | const |
Returns the color of the top-most plDefaultStateProvider of the first element of the selection.
plString plDefaultContainerState::GetStateProviderName | ( | ) | const |
Returns the name of the top-most plDefaultStateProvider of the first element of the selection.