rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Studio Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvStIPropertyTreeEditor Class Reference

Inspector class. More...

#include <ivstudio/inspectors/listedt.h>

Inheritance diagram for IlvStIPropertyTreeEditor:
IlvStIPropertiesEditor

List of all members.

Public Member Functions

 IlvStIPropertyTreeEditor (IlvStIPropertyTreeAccessor *acc=0, const char *name=0)
 Initializes an instance of IlvStIPropertyTreeEditor.
virtual IlBoolean connectHolder (IlvGraphicHolder *)
 Connects the specified holder with the editor.
void declareGadgets (const char *treeName, const char *addAfterName=0, const char *removeName=0, const char *addChildName=0, const char *addBeforeName=0, const char *cleanName=0)
 Declares the gadgets name to be used by the editor.
virtual void empty ()
 Empties the editor.
IlvTreeGadget * getTreeGadget () const
 Returns the tree gadget used by the editor.
virtual void setState (State=Active, IlBoolean=IlTrue)
 Sets the state of the editor.

Protected Member Functions

virtual IlvGadgetItem * createGadgetItem (const IlvStIProperty *) const
 Creates a tree gadget item that corresponds to the property.
virtual void fillGadget ()
 Called when the editor is initialized to fill the gadget.
virtual void refreshSelection ()
 Rebuilds the selected gadget item.
virtual void treeItemSelected (IlvTreeGadgetItem *, const IlvStIProperty *property, const IlvStIProperty *parent)
 Called when the selection changes.

Detailed Description

Inspector class.

Library: ivstudio

This class defines a tree editor. It handles a number of gadgets that are used when editing a tree. These gadgets are the following:

The use of these various gadgets causes the methods of the class IlvStIPropertyTreeAccessor to be called.

See also:
IlvStIPropertyTreeAccessor

Constructor & Destructor Documentation

IlvStIPropertyTreeEditor::IlvStIPropertyTreeEditor ( IlvStIPropertyTreeAccessor acc = 0,
const char *  name = 0 
)

Initializes an instance of IlvStIPropertyTreeEditor.

Parameters:
acc The tree accessor.
name The editor name.

Member Function Documentation

virtual IlBoolean IlvStIPropertyTreeEditor::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 from IlvStIPropertiesEditor.

virtual IlvGadgetItem* IlvStIPropertyTreeEditor::createGadgetItem ( const IlvStIProperty  )  const [protected, virtual]

Creates a tree gadget item that corresponds to the property.

Parameters:
prop The property.
Returns:
The tree item gadget.
void IlvStIPropertyTreeEditor::declareGadgets ( const char *  treeName,
const char *  addAfterName = 0,
const char *  removeName = 0,
const char *  addChildName = 0,
const char *  addBeforeName = 0,
const char *  cleanName = 0 
)

Declares the gadgets name to be used by the editor.

Declares the names of the various gadgets to be used by the editor to modify the tree.

Parameters:
treeName The name of the tree gadget.
addAfterName The name of the button used to add an item.
removeName The name of the button used to remove an item.
addChildName The name of the button used to add a child tree item.
addBeforeName The name of the button used to insert an item.
cleanName The name of the button used to clean the list.
virtual void IlvStIPropertyTreeEditor::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 from IlvStIEditor.

virtual void IlvStIPropertyTreeEditor::fillGadget (  )  [protected, virtual]

Called when the editor is initialized to fill the gadget.

Is called when the editor is initialized to fill the list (or tree) gadget with items corresponding to the edited property list (or tree).

Implements IlvStIPropertiesEditor.

IlvTreeGadget* IlvStIPropertyTreeEditor::getTreeGadget (  )  const

Returns the tree gadget used by the editor.

Returns:
The tree gadget used by the editor.
virtual void IlvStIPropertyTreeEditor::refreshSelection (  )  [protected, virtual]

Rebuilds the selected gadget item.

Rebuilds the selected gadget item to reflect modifications made to the accessor.

Implements IlvStIPropertiesEditor.

virtual void IlvStIPropertyTreeEditor::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 from IlvStIPropertiesEditor.

virtual void IlvStIPropertyTreeEditor::treeItemSelected ( IlvTreeGadgetItem *  ,
const IlvStIProperty property,
const IlvStIProperty parent 
) [protected, virtual]

Called when the selection changes.

For example, this method can be redefined to disable the button used to delete an item when the root of the tree is selected.

Parameters:
item The tree gadget item that is selected.
property The property that corresponds to the tree gadget item.
parent The parent of the property that corresponds to the tree gadget item.
 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.