MaxCustomControls::BaseCustomizationState Class Reference


Detailed Description

A base class which provides the basic implementation of ICustomizationState.Client's CustomizationState object should derive from this class.

Inheritance diagram for MaxCustomControls::BaseCustomizationState:
Inheritance graph
[legend]

List of all members.

Public Types

enum   BasePropertyKeys { StateName }
 

List of properties that this State class serializes.

More...

Public Member Functions

virtual bool  AddChild (ICustomizationState stateObject)
  Add a child customizationState object to the current object.
virtual ICustomizationState  GetChildByIndex (int index)
  Get the index-th child state object.
virtual ICustomizationState  GetChildByName (String name)
  Get the child state object by its state name.
virtual bool  RemoveChildByIndex (int index)
  Remove the index-th child state object.
virtual bool  RemoveChildByName (String name)
  Remove the child state object by its state name.
virtual bool  LoadProperties (Dictionary< String, String > aPropertySet)
  Given a dictionary mapping keyNames to properties, loads the properties into this CustomizationState object.
virtual Dictionary< String,
String > 
SaveProperties ()
  Create a dictionary mapping keyNames to properties, saves the properties into this dictionary.

Properties

virtual int  ChildrenCount [get]
  Get the count of child states.
virtual ICustomizationState  ParentState [get, set]
  Get or set the parent customizationState of current one.
virtual String  StateName [get, set]
  Get or set the name of the current ICustomizationState instance.

Member Enumeration Documentation

List of properties that this State class serializes.

Enumerator:
StateName 

Member Function Documentation

virtual bool MaxCustomControls::BaseCustomizationState::AddChild ( ICustomizationState  stateObject ) [inline, virtual]

Add a child customizationState object to the current object.

Parameters:
stateObject The child state object
Returns:
Return true if successful, false otherwise.

Implements MaxCustomControls::ICustomizationState.

virtual ICustomizationState MaxCustomControls::BaseCustomizationState::GetChildByIndex ( int  index ) [inline, virtual]

Get the index-th child state object.

Parameters:
index the child state's index
Returns:
If the index is valid, return the child state. null otherwise.

Implements MaxCustomControls::ICustomizationState.

virtual ICustomizationState MaxCustomControls::BaseCustomizationState::GetChildByName ( String  name ) [inline, virtual]

Get the child state object by its state name.

Client should use this method to get the correct child state object.

Parameters:
name the name of the child state object.
Returns:
If the name is valid, return the child state. null otherwise.

Implements MaxCustomControls::ICustomizationState.

virtual bool MaxCustomControls::BaseCustomizationState::RemoveChildByIndex ( int  index ) [inline, virtual]

Remove the index-th child state object.

Parameters:
index the index of the child state object.
Returns:
Return true if successful, false otherwise.

Implements MaxCustomControls::ICustomizationState.

virtual bool MaxCustomControls::BaseCustomizationState::RemoveChildByName ( String  name ) [inline, virtual]

Remove the child state object by its state name.

Parameters:
name the name of the child state object to be removed.
Returns:
Return true if successful, false otherwise.

Implements MaxCustomControls::ICustomizationState.

virtual bool MaxCustomControls::BaseCustomizationState::LoadProperties ( Dictionary< String, String >  aPropertySet ) [inline, virtual]

Given a dictionary mapping keyNames to properties, loads the properties into this CustomizationState object.

It is the client's responsibility to serialize and deserialize custom properties, since the Value type in the Dictionary is a String.

Parameters:
aPropertySet A dictionary mapping keyNames to properties.
Returns:
Return true if loading successfully; otherwise false.

Implements MaxCustomControls::ICustomizationState.

Reimplemented in MaxCustomControls::BaseMaterialControls::RichMaterialExplorerControlState, MaxCustomControls::ExplorerCustomizationState, MaxCustomControls::FormCustomizationState, MaxCustomControls::MaterialExplorerControls::MaterialExplorerCustomizationState, MaxCustomControls::MaterialExplorerControls::SceneMaterialExplorerState, MaxCustomControls::MaterialExplorerControls::SelectedMaterialExplorerState, and MaxCustomControls::SceneExplorerControls::SceneExplorerCustomizationState.

virtual Dictionary<String, String> MaxCustomControls::BaseCustomizationState::SaveProperties ( ) [inline, virtual]

Create a dictionary mapping keyNames to properties, saves the properties into this dictionary.

It is the client's responsibility to serialize and deserialize custom properties, since the Value type in the Dictionary is a String.

Returns:
Return a dictionary mapping keyNames to properties. If failed, return null.

Implements MaxCustomControls::ICustomizationState.

Reimplemented in MaxCustomControls::BaseMaterialControls::RichMaterialExplorerControlState, MaxCustomControls::ExplorerCustomizationState, MaxCustomControls::FormCustomizationState, MaxCustomControls::MaterialExplorerControls::MaterialExplorerCustomizationState, MaxCustomControls::MaterialExplorerControls::SceneMaterialExplorerState, MaxCustomControls::MaterialExplorerControls::SelectedMaterialExplorerState, and MaxCustomControls::SceneExplorerControls::SceneExplorerCustomizationState.


Property Documentation

virtual int MaxCustomControls::BaseCustomizationState::ChildrenCount [get]

Get the count of child states.

Implements MaxCustomControls::ICustomizationState.

virtual ICustomizationState MaxCustomControls::BaseCustomizationState::ParentState [get, set]

Get or set the parent customizationState of current one.

Implements MaxCustomControls::ICustomizationState.

virtual String MaxCustomControls::BaseCustomizationState::StateName [get, set]

Get or set the name of the current ICustomizationState instance.

the StateName should be unique among all sibling state objects.

Implements MaxCustomControls::ICustomizationState.


MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState
MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState MaxCustomControls::BaseCustomizationState