Rogue Wave Views Studio Package API Reference Guide |
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. More... | |
Public Member Functions | |
void | addProperty (const IlSymbol *name, IlAny property) |
Adds a property to a properties list. More... | |
virtual IlBoolean | connectHolder (IlvGraphicHolder *holder) |
Connects the specified holder with the editor. More... | |
virtual void | empty () |
Empties the editor. More... | |
const IlvStIEditor * | findEditor (const char *name) const |
Searches an editor in the editors tree that are owned by this editor. More... | |
IlvStIEditor * | findEditor (const char *name) |
Searches an editor in the editors tree that are owned by this editor. More... | |
virtual IlvStIPropertyAccessor * | getAccessor () const |
Returns the accessor associated with the editor. More... | |
NotificationMode | getNotificationMode () const |
Returns the notification mode of the editor. More... | |
IlvStIEditor * | getOwner () const |
Returns the owner of the editor. More... | |
IlAny * | getProperties (const IlSymbol *name, IlUInt &count) const |
Returns an array of properties. More... | |
IlAny | getProperty (const IlSymbol *name) const |
Returns a property. More... | |
virtual IlBoolean | initialize ()=0 |
Initializes the editor. More... | |
virtual IlBoolean | isModified () const |
Returns IlTrue if the editor is modified. More... | |
virtual IlBoolean | isVisible () const |
Returns the editor visibility. More... | |
IlBoolean | removeProperties (const IlSymbol *name) |
Removes some properties. More... | |
virtual void | setFocus (IlBoolean focus=IlTrue) |
Sets the focus on the editor. More... | |
virtual void | setModified (IlBoolean modified=IlTrue) |
Sets the modification state of the editor. More... | |
void | setNotificationMode (NotificationMode mode) |
Sets the notification mode of the editor. More... | |
void | setOwner (IlvStIEditor *editor) |
Sets the owner of the editor. More... | |
void | setProperty (const IlSymbol *name, IlAny property) |
Replaces all the properties by another property. More... | |
virtual void | setState (State state=Active, IlBoolean redraw=IlTrue) |
Sets the state of the editor. More... | |
virtual void | setVisible (IlBoolean visible=IlTrue) |
Sets the editor as visible. More... | |
Public Member Functions inherited from IlvStNamedObject | |
const char * | getName () const |
Returns the name of the object. More... | |
virtual void | setName (const char *name) |
Sets the name of the object. More... | |
Protected Member Functions | |
IlvStIEditor (const char *name=0, NotificationMode mode=AsOwner) | |
Constructor from a name and a notification mode. More... | |
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:
initialize()
method). apply()
method). The apply()
method is invoked only for editors that are not attached to accessors, which are referred to as stand-alone editors. connectHolder()
method). For example, a gadget editor finds the gadget inside the holder and adds a callback to it. IlvStIAccessor
, IlvStIEditorSet
. This enumeration type specifies when the editor notifies an accessor about a user modification.
Enumerator | |
---|---|
AsOwner | The mode is that of the owner editor (see |
Default | The accessor is notified if a relevant modification occurs. For a text field editor, for example, a relevant modification is the loss of the focus. |
Immediate | The accessor is notified as soon as the user modifies the editor. For a text field editor, for example, pressing a key triggers notification. |
enum IlvStIEditor::State |
|
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 |
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 IlvStIDefaultEditorBuilder, IlvStIEditorSet, IlvStIPropertyTreeEditor, IlvStIPropertyListEditor, IlvStIMainEditor, and IlvStIPropertiesEditor.
|
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, IlvStIPropertyTreeEditor, and IlvStIPropertyListEditor.
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
. IlvStIEditor* IlvStIEditor::findEditor | ( | const char * | name | ) |
Searches an editor in the editors tree that are owned by this editor.
name | The editor name. |
0
.
|
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 it is, 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. |
|
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 IlvStIDefaultEditorBuilder, IlvStIPropertyEditorSet, IlvStIEditorSet, IlvStIMainEditor, and IlvStIPropertiesEditor.
|
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 IlvStIPropertyEditorSet, IlvStIEditorSet, and IlvStIMainEditor.
|
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. 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.
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 IlvStIMainEditor, and IlvStIPropertiesEditor.
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, IlvStIPropertyTreeEditor, and IlvStIPropertiesEditor.
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 2017, 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.