Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Inspector class. More...
#include <ivstudio/inspectors/genacces.h>
Public Types | |
enum | PropertyStatus { Uninitialized, Inaccessible, ReadWrite, ReadOnly } |
This enumeration type defines the status of the property stored in the object. This status is set when the accessor is initialized via the | |
Public Member Functions | |
virtual IlvStIError * | check () const |
Validates the accessor value. | |
virtual IlvStIError * | checkValue (const IlvStIProperty *prop) const |
Checks the value for a property. | |
virtual IlvStIProperty * | get () |
Returns the object's property. | |
IlvStIPrecondition * | getPrecondition () const |
Returns the precondition. | |
IlvStIPropertyAccessor * | getPreviewAccessor () const |
Returns the preview accessor. | |
PropertyStatus | getPropertyStatus () const |
Returns the status of the current stored property. | |
IlvStIValidator * | getValidator () const |
Returns the validator used by the checkValue method. | |
virtual IlBoolean | initialize () |
Called to initialize the accessor according to the inspected data. | |
virtual IlBoolean | isReadOnly () const |
Returns IlTrue if the current property is read-only. | |
virtual IlBoolean | isReadWrite () const |
Returns IlTrue if the current property has read and write access. | |
virtual void | set (const IlvStIProperty *prop, IlvStIEditor *editor) |
Sets the current property to the property. | |
void | setPrecondition (IlvStIPrecondition *precond) |
Sets the precondition. | |
void | setPreviewAccessor (IlvStIPropertyAccessor *accessor) |
Sets the preview accessor. | |
void | setValidator (IlvStIValidator *validator) |
Sets the validator to the accessor. | |
Protected Member Functions | |
IlvStIPropertyAccessor (const char *name=0, UpdateMode updateMode=NoUpdate, BuildMode buildMode=None) | |
Initializes an instance of IlvStIPropertyAccessor . | |
virtual void | applyValue (IlvStIProperty *prop) |
Called to change the property of the inspected object. | |
virtual IlvStIProperty * | copyProperty (const IlvStIProperty *property) |
Called to copy the property when the accessor is in copy mode. | |
virtual IlvStIProperty * | createDefaultProperty () const |
Called to create a default property. | |
virtual IlvStIProperty * | getOriginalValue () |
Called to retrieve the property from the inspected object. | |
virtual IlBoolean | getValidateOnApply () const |
Returns IlTrue if validation is performed. | |
Friends | |
class | IlvStICombinedAccessor |
Inspector class.
Library: ivstudio
This class accesses an object property. The get
method of this class fetches the property and stores it in an IlvStIProperty
object. This method is called by the initialize
method. The stored value is used by the dependent accessors and by the editors. Then, the apply
method assigns the new property to the inspected object.
When subtyping this class, you should redefine only the methods getOriginalValue
and applyValue
, which are used in the get
and apply
methods respectively.
A preview accessor can be set to the accessor. When the accessor is initialized, the preview accessor is also initialized with the same value. Likewise, when the accessor is set to a value, the preview accessor is assigned the same value. Using a preview accessor makes it possible to reflect changes to the accessor in another object, such as a graphic object in an inspector panel.
This enumeration type defines the status of the property stored in the object. This status is set when the accessor is initialized via the get
method.
IlvStIPropertyAccessor::IlvStIPropertyAccessor | ( | const char * | name = 0 , |
|
UpdateMode | updateMode = NoUpdate , |
|||
BuildMode | buildMode = None | |||
) | [protected] |
Initializes an instance of IlvStIPropertyAccessor
.
name | The accessor name. | |
updateMode | The update mode. | |
buildMode | The build mode. |
virtual void IlvStIPropertyAccessor::applyValue | ( | IlvStIProperty * | prop | ) | [protected, virtual] |
Called to change the property of the inspected object.
Is called by the apply
method to change the property of the inspected object. Because the apply
method performs internal operations, such as handling the building mode, we recommend that you redefine the applyValue
method instead of the apply
method.
prop | The new value. |
Reimplemented in IlvStIGraphicContainerAccessor, and IlvStIInspectedObjectAccessor.
virtual IlvStIError* IlvStIPropertyAccessor::check | ( | ) | const [virtual] |
Validates the accessor value.
0
.Reimplemented from IlvStIAccessor.
virtual IlvStIError* IlvStIPropertyAccessor::checkValue | ( | const IlvStIProperty * | prop | ) | const [virtual] |
Checks the value for a property.
Tests whether the property provided as the parameter is valid. If not, it generates an error. If a validator has been set, it is used by default. Otherwise, the method does nothing.
prop | The property. |
0
if no error occurs, otherwise returns an error. virtual IlvStIProperty* IlvStIPropertyAccessor::copyProperty | ( | const IlvStIProperty * | property | ) | [protected, virtual] |
Called to copy the property when the accessor is in copy mode.
Is called by the get
method to copy the property provided as the parameter when the accessor is in copy mode (see IlvStIAccessor::BuildMode
). By default, this function calls the copy
function of the property and returns the result.
property | The property. |
virtual IlvStIProperty* IlvStIPropertyAccessor::createDefaultProperty | ( | ) | const [protected, virtual] |
Called to create a default property.
Is called only when the create mode is set (see IlvStIAccessor::BuildMode
)
to create a default property when no property has been found in the inspected object.
Reimplemented in IlvStICombinedAccessor, and IlvStIPropertiesAccessor.
virtual IlvStIProperty* IlvStIPropertyAccessor::get | ( | ) | [virtual] |
Returns the object's property.
IlvStIProperty
object. Reimplemented in IlvStIPropertiesAccessor.
virtual IlvStIProperty* IlvStIPropertyAccessor::getOriginalValue | ( | ) | [protected, virtual] |
Called to retrieve the property from the inspected object.
Is called by the get
method to retrieve the property from the inspected object. Because the get
method performs internal operations, such as handling the building mode, we recommend that you redefine the getOriginalValue
method instead of the get
method.
Reimplemented in IlvStICombinedAccessor, IlvStIGraphicContainerAccessor, IlvStIInspectedObjectAccessor, and IlvStIPropertiesAccessor.
IlvStIPrecondition* IlvStIPropertyAccessor::getPrecondition | ( | ) | const |
Returns the precondition.
IlvStIPropertyAccessor* IlvStIPropertyAccessor::getPreviewAccessor | ( | ) | const |
Returns the preview accessor.
PropertyStatus IlvStIPropertyAccessor::getPropertyStatus | ( | ) | const |
Returns the status of the current stored property.
virtual IlBoolean IlvStIPropertyAccessor::getValidateOnApply | ( | ) | const [protected, virtual] |
Returns IlTrue
if validation is performed.
IlTrue
if validation is performed when apply
is called. If it returns IlFalse
, validation is performed as soon as the changes are made. IlvStIValidator* IlvStIPropertyAccessor::getValidator | ( | ) | const |
Returns the validator used by the checkValue
method.
checkValue
method virtual IlBoolean IlvStIPropertyAccessor::initialize | ( | ) | [virtual] |
Called to initialize the accessor according to the inspected data.
By default, this method only initializes all dependent accessors.
IlTrue
if successfull, otherwise return IlFalse
. Reimplemented from IlvStIAccessor.
Reimplemented in IlvStICombinedAccessor, and IlvStIPropertiesAccessor.
virtual IlBoolean IlvStIPropertyAccessor::isReadOnly | ( | ) | const [virtual] |
Returns IlTrue
if the current property is read-only.
IlTrue
if the current property is read-only. virtual IlBoolean IlvStIPropertyAccessor::isReadWrite | ( | ) | const [virtual] |
Returns IlTrue
if the current property has read and write access.
IlTrue
if the current property has read and write access. virtual void IlvStIPropertyAccessor::set | ( | const IlvStIProperty * | prop, | |
IlvStIEditor * | editor | |||
) | [virtual] |
Sets the current property to the property.
Sets the current property to the property provided as the parameter. The specified editor is the one that changed the property. All the editors that the accessor contains are reinitialized following this modification, except for the calling editor.
prop | The new property. | |
editor | The editor which must be not reinitialized. |
Reimplemented in IlvStICombinedAccessor, and IlvStIPropertiesAccessor.
void IlvStIPropertyAccessor::setPrecondition | ( | IlvStIPrecondition * | precond | ) |
Sets the precondition.
Sets the precondition used to test whether the object property can be accessed. If the precondition was already set, it is destroyed and replaced with the new one.
precond | The new precondition. |
void IlvStIPropertyAccessor::setPreviewAccessor | ( | IlvStIPropertyAccessor * | accessor | ) |
Sets the preview accessor.
accessor | The accessor which uses the current accessor like preview accessor. |
void IlvStIPropertyAccessor::setValidator | ( | IlvStIValidator * | validator | ) |
Sets the validator to the accessor.
validator | The validator to the accessor. |
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.