rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Studio Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Types | Public Member Functions | Protected Member Functions
IlvStIEditor Class Referenceabstract

Inspector class. More...

#include <ivstudio/inspectors/genedt.h>

Inheritance diagram for IlvStIEditor:
IlvStNamedObject IlvStIEditorSet IlvStIMainEditor IlvStIPropertyEditorSet IlvStIDefaultEditorBuilder

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 State flags correspond to the sensitivity and activity flags of the associated gadget. 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 IlvStIEditorfindEditor (const char *name) const
 Searches an editor in the editors tree that are owned by this editor. More...
 
IlvStIEditorfindEditor (const char *name)
 Searches an editor in the editors tree that are owned by this editor. More...
 
virtual IlvStIPropertyAccessorgetAccessor () const
 Returns the accessor associated with the editor. More...
 
NotificationMode getNotificationMode () const
 Returns the notification mode of the editor. More...
 
IlvStIEditorgetOwner () const
 Returns the owner of the editor. More...
 
IlAnygetProperties (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...
 

Detailed Description

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:

See Also
IlvStIAccessor, IlvStIEditorSet.

Member Enumeration Documentation

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 getOwner). If there is no owner, the notification mode is set to Default.

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.

This enumeration type defines the editor state. As far as gadget editors are concerned, the State flags correspond to the sensitivity and activity flags of the associated gadget.

Enumerator
Active 

The editor is active.

Unactive 

The editor is unactive.

Unsensitive 

The editor is unsensitive.

Constructor & Destructor Documentation

IlvStIEditor::IlvStIEditor ( const char *  name = 0,
NotificationMode  mode = AsOwner 
)
protected

Constructor from a name and a notification mode.

Parameters
nameThe name editor. Using this name, an inspector can retrieve an editor and set the focus to this editor.
modeThe notification mode of the editor.

Member Function Documentation

void IlvStIEditor::addProperty ( const IlSymbol name,
IlAny  property 
)

Adds a property to a properties list.

Parameters
nameThe properties list name.
propertyThe 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.

Parameters
holderThe holder.
Returns
IlTrue if the operation succeeds otherwise returns IlFalse.

Reimplemented in IlvStIDefaultEditorBuilder, IlvStIEditorSet, IlvStIPropertyTreeEditor, IlvStIPropertyListEditor, IlvStIMainEditor, and IlvStIPropertiesEditor.

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, IlvStIPropertyTreeEditor, and IlvStIPropertyListEditor.

const IlvStIEditor* IlvStIEditor::findEditor ( const char *  name) const

Searches an editor in the editors tree that are owned by this editor.

Parameters
nameThe editor name.
Returns
The editor with the specified name if the editor is found, otherwise returns 0.
IlvStIEditor* IlvStIEditor::findEditor ( const char *  name)

Searches an editor in the editors tree that are owned by this editor.

Parameters
nameThe editor name.
Returns
The editor with the specified name if the editor is found, otherwise returns 0.
virtual IlvStIPropertyAccessor* IlvStIEditor::getAccessor ( ) const
virtual

Returns the accessor associated with the editor.

Returns
The accessor associated with the editor, if any. By default, it returns 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.

Returns
The notification mode of the editor.
IlvStIEditor* IlvStIEditor::getOwner ( ) const

Returns the owner of the editor.

Returns
The owner of the editor, however it returns 0 if the editor is not owned.
IlAny* IlvStIEditor::getProperties ( const IlSymbol name,
IlUInt count 
) const

Returns an array of properties.

Parameters
nameThe properties array name.
countContains the property count.
Returns
An array of properties whose name is specified as the argument.
IlAny IlvStIEditor::getProperty ( const IlSymbol name) const

Returns a property.

Parameters
nameThe property name.
Returns
Returns the property whose name is specified as the argument. If there are several properties, the first one is returned.
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.

Returns
IlTrue if the operation succeeds otherwise returns IlFalse.

Implemented in IlvStIDefaultEditorBuilder, IlvStIPropertyEditorSet, IlvStIEditorSet, IlvStIMainEditor, and IlvStIPropertiesEditor.

virtual IlBoolean IlvStIEditor::isModified ( ) const
virtual

Returns IlTrue if the editor is modified.

Returns
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 IlBoolean IlvStIEditor::isVisible ( ) const
virtual

Returns the editor visibility.

Returns
IlTrue if the editor is visible, IlFalse otherwise. For example, a gadget editor returns the visible state of the associated gadget.

Reimplemented in IlvStIEditorSet.

IlBoolean IlvStIEditor::removeProperties ( const IlSymbol name)

Removes some properties.

Parameters
nameThe properties name.
Returns
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.

Parameters
focusIf 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.

Parameters
modifiedThe new modification state of the editor.

Reimplemented in IlvStIMainEditor, and IlvStIPropertiesEditor.

void IlvStIEditor::setNotificationMode ( NotificationMode  mode)

Sets the notification mode of the editor.

Parameters
modeThe new notification mode of the editor.
void IlvStIEditor::setOwner ( IlvStIEditor editor)

Sets the owner of the editor.

Parameters
editorThe owner of the editor.
void IlvStIEditor::setProperty ( const IlSymbol name,
IlAny  property 
)

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.

Parameters
nameThe name of the properties.
propertyThe property which replaces.
virtual void IlvStIEditor::setState ( State  state = Active,
IlBoolean  redraw = IlTrue 
)
virtual

Sets the state of the editor.

Parameters
stateThe new state.
redrawIf IlTrue, the editor will be redrawn.

Reimplemented in IlvStIEditorSet, IlvStIPropertyTreeEditor, and IlvStIPropertiesEditor.

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.

Parameters
visibleIf 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.