Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Inspector class. More...
#include <ivstudio/inspectors/genedt.h>
Public Types | |
enum | NotificationMode { AsOwner, Default, Immediate } |
This enumeration type specifies when the editor notifies an accessor about a user modification. More... | |
enum | State { Active, Unactive, Unsensitive } |
This enumeration type defines the editor state. As far as gadget editors are concerned, the | |
Public Member Functions | |
void | addProperty (const IlSymbol *name, IlAny property) |
Adds a property to a properties list. | |
virtual IlBoolean | connectHolder (IlvGraphicHolder *holder) |
Connects the specified holder with the editor. | |
virtual void | empty () |
Empties the editor. | |
IlvStIEditor * | findEditor (const char *name) |
Searches an editor in the editors tree that are owned by this editor. | |
const IlvStIEditor * | findEditor (const char *name) const |
Searches an editor in the editors tree that are owned by this editor. | |
virtual IlvStIPropertyAccessor * | getAccessor () const |
Returns the accessor associated with the editor. | |
NotificationMode | getNotificationMode () const |
Returns the notification mode of the editor. | |
IlvStIEditor * | getOwner () const |
Returns the owner of the editor. | |
IlAny * | getProperties (const IlSymbol *name, IlUInt &count) const |
Returns an array of properties. | |
IlAny | getProperty (const IlSymbol *name) const |
Returns a property. | |
virtual IlBoolean | initialize ()=0 |
Initializes the editor. | |
virtual IlBoolean | isModified () const |
Returns IlTrue if the editor is modified. | |
virtual IlBoolean | isVisible () const |
Returns the editor visibility. | |
IlBoolean | removeProperties (const IlSymbol *name) |
Removes some properties. | |
virtual void | setFocus (IlBoolean focus=IlTrue) |
Sets the focus on the editor. | |
virtual void | setModified (IlBoolean modified=IlTrue) |
Sets the modification state of the editor. | |
void | setNotificationMode (NotificationMode mode) |
Sets the notification mode of the editor. | |
void | setOwner (IlvStIEditor *editor) |
Sets the owner of the editor. | |
void | setProperty (const IlSymbol *name, IlAny property) |
Replaces all the properties by another property. | |
virtual void | setState (State state=Active, IlBoolean redraw=IlTrue) |
Sets the state of the editor. | |
virtual void | setVisible (IlBoolean visible=IlTrue) |
Sets the editor as visible. | |
Protected Member Functions | |
IlvStIEditor (const char *name=0, NotificationMode mode=AsOwner) | |
Constructor from a name and a notification mode. |
Inspector class.
Library: ivstudio
Accessors use IlvStIEditor
objects to edit their values. Generally, an editor interfaces with a gadget (see IlvStIDefaultEditorBuilder
).
From a functional point of view, an editor has three behaviors:
It initializes itself (via the initialize
method).
It applies modifications that have been made to the editor (via the apply
method). The apply
method is invoked only for editors that are not attached to accessors, which are referred to as stand-alone editors.
It connects to a holder (via the connectHolder
method). For example, a gadget editor finds the gadget inside the holder and adds a callback to it.
This enumeration type specifies when the editor notifies an accessor about a user modification.
enum IlvStIEditor::State |
IlvStIEditor::IlvStIEditor | ( | const char * | name = 0 , |
|
NotificationMode | mode = AsOwner | |||
) | [protected] |
Constructor from a name and a notification mode.
name | The name editor. Using this name, an inspector can retrieve an editor and set the focus to this editor. | |
mode | The notification mode of the editor. |
Adds a property to a properties list.
name | The properties list name. | |
property | The new property. |
virtual IlBoolean IlvStIEditor::connectHolder | ( | IlvGraphicHolder * | holder | ) | [virtual] |
Connects the specified holder with the editor.
Connects the specified holder with the editor. For example, a gadget editor finds the gadget inside the holder and adds a callback to it.
holder | The holder. |
IlTrue
if the operation succeeds otherwise returns IlFalse
. Reimplemented in IlvStIEditorSet, IlvStIDefaultEditorBuilder, IlvStIPropertiesEditor, IlvStIPropertyListEditor, IlvStIPropertyTreeEditor, and IlvStIMainEditor.
virtual void IlvStIEditor::empty | ( | ) | [virtual] |
Empties the editor.
It is called when the editor cannot be initialized with a value. For example, in the case of a list editor, the list is cleared.
Reimplemented in IlvStIEditorSet, IlvStIPropertyListEditor, and IlvStIPropertyTreeEditor.
IlvStIEditor* IlvStIEditor::findEditor | ( | const char * | name | ) |
Searches an editor in the editors tree that are owned by this editor.
name | The editor name. |
0
. const IlvStIEditor* IlvStIEditor::findEditor | ( | const char * | name | ) | const |
Searches an editor in the editors tree that are owned by this editor.
name | The editor name. |
0
. virtual IlvStIPropertyAccessor* IlvStIEditor::getAccessor | ( | ) | const [virtual] |
Returns the accessor associated with the editor.
0
. When the editor is added to the inspector panel, this latter calls this method to know whether the editor is associated with an accessor. If yes, the editor is initialized via the associated accessor. Otherwise, the stand-alone editor is initialized by the inspector panel and its apply
method is invoked to apply the changes. Reimplemented in IlvStIPropertyEditorSet.
NotificationMode IlvStIEditor::getNotificationMode | ( | ) | const |
Returns the notification mode of the editor.
IlvStIEditor* IlvStIEditor::getOwner | ( | ) | const |
Returns the owner of the editor.
0
if the editor is not owned. Returns an array of properties.
name | The properties array name. | |
count | Contains the property count. |
Returns a property.
name | The property name. |
virtual IlBoolean IlvStIEditor::initialize | ( | ) | [pure virtual] |
Initializes the editor.
In the case of gadget editors, this method gets an initialization value from the accessor and sets this value to the gadget.
IlTrue
if the operation succeeds otherwise returns IlFalse
. Implemented in IlvStIEditorSet, IlvStIPropertyEditorSet, IlvStIDefaultEditorBuilder, IlvStIPropertiesEditor, and IlvStIMainEditor.
virtual IlBoolean IlvStIEditor::isModified | ( | ) | const [virtual] |
Returns IlTrue
if the editor is modified.
IlTrue
if the editor is modified, IlFalse
otherwise. By default, it returns the modification state of the associated accessor. Reimplemented in IlvStIEditorSet, IlvStIPropertyEditorSet, and IlvStIMainEditor.
virtual IlBoolean IlvStIEditor::isVisible | ( | ) | const [virtual] |
Returns the editor visibility.
IlTrue
if the editor is visible, IlFalse
otherwise. For example, a gadget editor returns the visible state of the associated gadget. Reimplemented in IlvStIEditorSet.
Removes some properties.
name | The properties name. |
IlTrue
if one or more properties have been removed. virtual void IlvStIEditor::setFocus | ( | IlBoolean | focus = IlTrue |
) | [virtual] |
Sets the focus on the editor.
Sets the focus on the editor. For example, a gadget editor will set the focus on the associated gadget.
focus | If IlTrue the editor get the focus. |
Reimplemented in IlvStIEditorSet.
virtual void IlvStIEditor::setModified | ( | IlBoolean | modified = IlTrue |
) | [virtual] |
Sets the modification state of the editor.
Sets the modification state of the editor. By default, it sets the modification state of the associated accessor.
modified | The new modification state of the editor. |
Reimplemented in IlvStIPropertiesEditor, and IlvStIMainEditor.
void IlvStIEditor::setNotificationMode | ( | NotificationMode | mode | ) |
Sets the notification mode of the editor.
mode | The new notification mode of the editor. |
void IlvStIEditor::setOwner | ( | IlvStIEditor * | editor | ) |
Sets the owner of the editor.
editor | The owner of the editor. |
Replaces all the properties by another property.
Replaces all the properties whose name is specified. If there is no property with the specified name, the method adds it.
name | The name of the properties. | |
property | The property which replaces. |
Sets the state of the editor.
state | The new state. | |
redraw | If IlTrue , the editor will be redrawn. |
Reimplemented in IlvStIEditorSet, IlvStIPropertiesEditor, and IlvStIPropertyTreeEditor.
virtual void IlvStIEditor::setVisible | ( | IlBoolean | visible = IlTrue |
) | [virtual] |
Sets the editor as visible.
Sets the editor as visible. For example, a gadget editor will set the associated gadget as visible.
visible | If IlTrue the editor becomes visible. |
Reimplemented in IlvStIEditorSet.
© 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.