Rogue Wave Views
Studio Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvStInspectorPanel Class Reference

Inspector class. More...

#include <ivstudio/inspectors/insppnl.h>

Inheritance diagram for IlvStInspectorPanel:
IlvStIGraphicInspectorPanel IlvStIGadgetInspectorPanel

Public Member Functions

 IlvStInspectorPanel (IlvDisplay *display, const char *title, const char *filename=0, IlvSystemView transientFor=0, IlvStIAccessor::UpdateMode mode=IlvStIAccessor::OnApply)
 Initializes a new instance of IlvStInspectorPanel. More...
 
void addAccessor (IlvStIAccessor *acc)
 Adds the accessor to the main editor of the inspector panel. More...
 
void addEditor (IlvStIEditor *editor)
 Adds the editor to the list of editors. More...
 
IlvNotebookPage * addPage (const char *title, const char *filename, IlUShort idx=(IlUShort) -1, IlvBitmap *bitmap=0, IlBoolean transparent=IlTrue)
 Creates a notebook page. More...
 
virtual void applyChange (IlvGraphic *obj)
 Called to apply the modifications to the graphic object. More...
 
IlvStIPropertyAccessorbuildPropertyAccessor (const char *name)
 Creates an accessor to the property of the inspected object. More...
 
IlvStIAccessorfindAccessor (const char *name)
 Searches for the accessor in the tree of accessors. More...
 
const IlvStIAccessorfindAccessor (const char *name) const
 Searches for the accessor in the tree of accessors. More...
 
IlvStIEditorfindEditor (const char *name)
 Searches for an editor. More...
 
const IlvStIEditorfindEditor (const char *name) const
 Searches for an editor. More...
 
IlvNotebook * getGenericNotebook () const
 Returns the generic notebook of the inspector panel. More...
 
IlvStIInspectedObjectAccessorgetInspectedGraphicAccessor () const
 Returns the accessor to the inspected object. More...
 
IlvGraphicgetInspectedObject ()
 Returns the current inspected object. More...
 
IlvStIAccessor ** getInspectedObjectAccessors (IlUInt &count) const
 Returns the array of accessors to the inspected object. More...
 
IlvStIMainEditorgetMainEditor ()
 Returns the main editor. More...
 
const IlvStIMainEditorgetMainEditor () const
 Returns the main editor. More...
 
IlvGraphicgetPanelObject (const char *name) const
 Returns a graphic object in the inspector panel. More...
 
virtual void initFrom (IlvGraphic *obj)
 Called to initialize the editors with the graphic object. More...
 
virtual void initializeEditors ()
 Called to initialize the editors. More...
 
IlvStIEditorlink (const char *gadgetName, const IlSymbol *valueName, IlvStIEditor::NotificationMode mode=IlvStIEditor::AsOwner)
 Creates an editor which is associated with a gadget. More...
 
IlvStIEditorlink (const char *gadgetName, IlvStIPropertyAccessor *accessor, IlvStIEditor::NotificationMode mode=IlvStIEditor::AsOwner)
 Creates an editor which is associated with a gadget. More...
 
IlBoolean removeAccessor (IlvStIAccessor *acc)
 Removes the accessor from the main editor of the inspector panel. More...
 
IlBoolean removeEditor (const char *name)
 Removes an editor. More...
 
IlBoolean removeEditor (IlvStIEditor *editor)
 Removes an editor. More...
 
IlBoolean removePage (IlUShort idx)
 Removes a notebook page from the generic notebook. More...
 

Detailed Description

Inspector class.

Library: ivstudio

This class defines an inspector panel, which is used to inspect a graphic object. To that end, it handles a set of accessors and editors.

See also
IlvStIAccessor, IlvStIInspectedObjectAccessor, IlvStIMainEditor.

Constructor & Destructor Documentation

§ IlvStInspectorPanel()

IlvStInspectorPanel::IlvStInspectorPanel ( IlvDisplay display,
const char *  title,
const char *  filename = 0,
IlvSystemView  transientFor = 0,
IlvStIAccessor::UpdateMode  mode = IlvStIAccessor::OnApply 
)

Initializes a new instance of IlvStInspectorPanel.

Parameters
displayThe display used to create the inspector panel.
titleThe title of the inspector panel.
filenameThe path to the .ilv file that loads the inspector.
transientForThe view system for which the inspector is transient.
modeSpecifies when the modifications are applied to the inspected object. By default, modifications are performed when the user presses the Apply button.

Member Function Documentation

§ addAccessor()

void IlvStInspectorPanel::addAccessor ( IlvStIAccessor acc)

Adds the accessor to the main editor of the inspector panel.

Parameters
accThe accessor.

§ addEditor()

void IlvStInspectorPanel::addEditor ( IlvStIEditor editor)

Adds the editor to the list of editors.

Parameters
editorThe editor.

§ addPage()

IlvNotebookPage* IlvStInspectorPanel::addPage ( const char *  title,
const char *  filename,
IlUShort  idx = (IlUShort) -1,
IlvBitmap bitmap = 0,
IlBoolean  transparent = IlTrue 
)

Creates a notebook page.

Creates a notebook page with the specified title, file name, bitmap, and transparency setting. The new page is added to a generic notebook at the position indicated.

Parameters
titleThe page title.
filenameThe page file name.
idxThe insertion position, if the value is -1, the page is inserted at the end.
bitmapThe page bitmap.
transparentSet this to IlFalse if you do not want bitmap transparency.
Returns
The created page.

§ applyChange()

virtual void IlvStInspectorPanel::applyChange ( IlvGraphic obj)
virtual

Called to apply the modifications to the graphic object.

Parameters
objThe graphic object.

Reimplemented in IlvStIGadgetInspectorPanel, and IlvStIGraphicInspectorPanel.

§ buildPropertyAccessor()

IlvStIPropertyAccessor* IlvStInspectorPanel::buildPropertyAccessor ( const char *  name)

Creates an accessor to the property of the inspected object.

Parameters
nameThe property name.
Returns
The accessor to the property.

§ findAccessor() [1/2]

IlvStIAccessor* IlvStInspectorPanel::findAccessor ( const char *  name)

Searches for the accessor in the tree of accessors.

Searches for the accessor in the tree of accessors that are owned by the inspector.

Parameters
nameThe accessor name.
Returns
The accessor if found, otherwise returns 0.

§ findAccessor() [2/2]

const IlvStIAccessor* IlvStInspectorPanel::findAccessor ( const char *  name) const

Searches for the accessor in the tree of accessors.

Searches for the accessor in the tree of accessors that are owned by the inspector.

Parameters
nameThe accessor name.
Returns
The accessor if found, otherwise returns 0.

§ findEditor() [1/2]

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

Searches for an editor.

Searches for the editor in the tree of editors that are owned by the inspector.

Parameters
nameThe editor name.
Returns
The editor if found, otherwise returns 0.

§ findEditor() [2/2]

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

Searches for an editor.

Searches for the editor in the tree of editors that are owned by the inspector.

Parameters
nameThe editor name.
Returns
The editor if found, otherwise returns 0.

§ getGenericNotebook()

IlvNotebook* IlvStInspectorPanel::getGenericNotebook ( ) const

Returns the generic notebook of the inspector panel.

Returns
The generic notebook of the inspector panel.

§ getInspectedGraphicAccessor()

IlvStIInspectedObjectAccessor* IlvStInspectorPanel::getInspectedGraphicAccessor ( ) const

Returns the accessor to the inspected object.

Returns
The accessor to the inspected object.

§ getInspectedObject()

IlvGraphic* IlvStInspectorPanel::getInspectedObject ( )

Returns the current inspected object.

Returns
The current inspected object.

§ getInspectedObjectAccessors()

IlvStIAccessor** IlvStInspectorPanel::getInspectedObjectAccessors ( IlUInt count) const

Returns the array of accessors to the inspected object.

The returned array must be deleted by the user.

Parameters
countContains the accessor count.
Returns
The array of accessors. The returned array should be deleted when no longer used. You must call delete[] in order to delete this array.

§ getMainEditor() [1/2]

IlvStIMainEditor& IlvStInspectorPanel::getMainEditor ( )

Returns the main editor.

This editor contains all other editors and accessors.

Returns
A reference to the main editor.

§ getMainEditor() [2/2]

const IlvStIMainEditor& IlvStInspectorPanel::getMainEditor ( ) const

Returns the main editor.

This editor contains all other editors and accessors.

Returns
A reference to the main editor.

§ getPanelObject()

IlvGraphic* IlvStInspectorPanel::getPanelObject ( const char *  name) const

Returns a graphic object in the inspector panel.

Parameters
nameThe graphic object name.
Returns
The graphic object if found, otherwise returns 0.

§ initFrom()

virtual void IlvStInspectorPanel::initFrom ( IlvGraphic obj)
virtual

Called to initialize the editors with the graphic object.

Parameters
objThe graphic object.

Reimplemented in IlvStIGadgetInspectorPanel, and IlvStIGraphicInspectorPanel.

§ initializeEditors()

virtual void IlvStInspectorPanel::initializeEditors ( )
virtual

Called to initialize the editors.

Adds or removes notebook pages from the inspector panel and creates all the editors and accessors of the inspector panel. Pages should be added to the inspector panel before adding the editors that are associated with the gadgets in these pages.

Reimplemented in IlvStIGadgetInspectorPanel, and IlvStIGraphicInspectorPanel.

§ link() [1/2]

IlvStIEditor* IlvStInspectorPanel::link ( const char *  gadgetName,
const IlSymbol valueName,
IlvStIEditor::NotificationMode  mode = IlvStIEditor::AsOwner 
)

Creates an editor which is associated with a gadget.

Creates an editor with the notification mode specified and associates it with a gadget. It also creates an accessor that accesses the property of the graphic object, and adds the created editor to the created accessor. For example, to link a toggle gadget named "toggle" to the frame property of a button returned by an accessor, use the following code:

link("toggle", accessor, IlvButton::_viewFrame);

The toggle is initialized with the value of the _viewFrame property of the object. When the toggle is modified, it notifies the accessor of this change automatically.

Parameters
gadgetNameThe gadget name.
valueNameThe property name of the graphic object.
modeThe notification mode of the editor.
Returns
The created editor.

§ link() [2/2]

IlvStIEditor* IlvStInspectorPanel::link ( const char *  gadgetName,
IlvStIPropertyAccessor accessor,
IlvStIEditor::NotificationMode  mode = IlvStIEditor::AsOwner 
)

Creates an editor which is associated with a gadget.

Creates an editor with the notification mode specified and associates it with the gadget. Then it adds the created editor to the specified accessor. For example, to link a text field gadget named "textField" to an object name returned by an accessor, use the following code:

link("textField", accessor);

The text field is initialized with the value returned by the accessor. When the text field is modified, it notifies the accessor of this change automatically.

Parameters
gadgetNameThe gadget name.
accessorThe accessor to access to graphic object.
modeThe notification mode of the editor.
Returns
The created editor.

§ removeAccessor()

IlBoolean IlvStInspectorPanel::removeAccessor ( IlvStIAccessor acc)

Removes the accessor from the main editor of the inspector panel.

Parameters
accThe accessor.
Returns
IlTrue if successful, otherwise returns IlFalse.

§ removeEditor() [1/2]

IlBoolean IlvStInspectorPanel::removeEditor ( const char *  name)

Removes an editor.

Removes the editor from the list of editors.

Parameters
nameThe editor name.
Returns
IlTrue if successful, otherwise returns IlFalse.

§ removeEditor() [2/2]

IlBoolean IlvStInspectorPanel::removeEditor ( IlvStIEditor editor)

Removes an editor.

Removes the editor from the list of editors.

Parameters
editorThe editor.
Returns
IlTrue if successful, otherwise returns IlFalse.

§ removePage()

IlBoolean IlvStInspectorPanel::removePage ( IlUShort  idx)

Removes a notebook page from the generic notebook.

Parameters
idxThe position of the notebook page.
Returns
IlTrue if successful, otherwise returns IlFalse.

© Copyright 2018, 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.