rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Studio Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvStIEditor Class Reference

Inspector class. More...

#include <ivstudio/inspectors/genedt.h>

Inheritance diagram for IlvStIEditor:
IlvStNamedObject IlvStIEditorSet IlvStIMainEditor IlvStIPropertyEditorSet IlvStIDefaultEditorBuilder

List of all members.

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.
virtual IlBoolean connectHolder (IlvGraphicHolder *holder)
 Connects the specified holder with the editor.
virtual void empty ()
 Empties the editor.
IlvStIEditorfindEditor (const char *name)
 Searches an editor in the editors tree that are owned by this editor.
const IlvStIEditorfindEditor (const char *name) const
 Searches an editor in the editors tree that are owned by this editor.
virtual IlvStIPropertyAccessorgetAccessor () const
 Returns the accessor associated with the editor.
NotificationMode getNotificationMode () const
 Returns the notification mode of the editor.
IlvStIEditorgetOwner () const
 Returns the owner of the editor.
IlAnygetProperties (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.

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:
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.

Member Function Documentation

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

Adds a property to a properties list.

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

Parameters:
holder The holder.
Returns:
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.

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

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

Parameters:
name The 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:
name The properties array name.
count Contains 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:
name The 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 IlvStIEditorSet, IlvStIPropertyEditorSet, IlvStIDefaultEditorBuilder, IlvStIPropertiesEditor, and IlvStIMainEditor.

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 IlvStIEditorSet, IlvStIPropertyEditorSet, 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:
name The 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:
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.

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

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

Sets the owner of the editor.

Parameters:
editor The 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:
name The name of the properties.
property The property which replaces.
virtual void IlvStIEditor::setState ( State  state = Active,
IlBoolean  redraw = IlTrue 
) [virtual]

Sets the state of the editor.

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

Parameters:
visible If IlTrue the editor becomes visible.

Reimplemented in IlvStIEditorSet.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.