Rogue Wave Views Studio Package API Reference Guide |
Rogue Wave Views Documentation Home |
Inspector class. More...
#include <ivstudio/inspectors/insppnl.h>
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... | |
IlvStIPropertyAccessor * | buildPropertyAccessor (const char *name) |
Creates an accessor to the property of the inspected object. More... | |
IlvStIAccessor * | findAccessor (const char *name) |
Searches for the accessor in the tree of accessors. More... | |
const IlvStIAccessor * | findAccessor (const char *name) const |
Searches for the accessor in the tree of accessors. More... | |
IlvStIEditor * | findEditor (const char *name) |
Searches for an editor. More... | |
const IlvStIEditor * | findEditor (const char *name) const |
Searches for an editor. More... | |
IlvNotebook * | getGenericNotebook () const |
Returns the generic notebook of the inspector panel. More... | |
IlvStIInspectedObjectAccessor * | getInspectedGraphicAccessor () const |
Returns the accessor to the inspected object. More... | |
IlvGraphic * | getInspectedObject () |
Returns the current inspected object. More... | |
IlvStIAccessor ** | getInspectedObjectAccessors (IlUInt &count) const |
Returns the array of accessors to the inspected object. More... | |
IlvStIMainEditor & | getMainEditor () |
Returns the main editor. More... | |
const IlvStIMainEditor & | getMainEditor () const |
Returns the main editor. More... | |
IlvGraphic * | getPanelObject (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... | |
IlvStIEditor * | link (const char *gadgetName, const IlSymbol *valueName, IlvStIEditor::NotificationMode mode=IlvStIEditor::AsOwner) |
Creates an editor which is associated with a gadget. More... | |
IlvStIEditor * | link (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... | |
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.
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
.
display | The display used to create the inspector panel. |
title | The title of the inspector panel. |
filename | The path to the .ilv file that loads the inspector. |
transientFor | The view system for which the inspector is transient. |
mode | Specifies when the modifications are applied to the inspected object. By default, modifications are performed when the user presses the Apply button. |
void IlvStInspectorPanel::addAccessor | ( | IlvStIAccessor * | acc | ) |
Adds the accessor to the main editor of the inspector panel.
acc | The accessor. |
void IlvStInspectorPanel::addEditor | ( | IlvStIEditor * | editor | ) |
Adds the editor to the list of editors.
editor | The editor. |
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.
title | The page title. |
filename | The page file name. |
idx | The insertion position, if the value is -1 , the page is inserted at the end. |
bitmap | The page bitmap. |
transparent | Set this to IlFalse if you do not want bitmap transparency. |
|
virtual |
Called to apply the modifications to the graphic object.
obj | The graphic object. |
Reimplemented in IlvStIGadgetInspectorPanel, and IlvStIGraphicInspectorPanel.
IlvStIPropertyAccessor* IlvStInspectorPanel::buildPropertyAccessor | ( | const char * | name | ) |
Creates an accessor to the property of the inspected object.
name | The property name. |
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.
name | The accessor name. |
0
. 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.
name | The accessor name. |
0
. 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.
name | The editor name. |
0
. 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.
name | The editor name. |
0
. IlvNotebook* IlvStInspectorPanel::getGenericNotebook | ( | ) | const |
Returns the generic notebook of the inspector panel.
IlvStIInspectedObjectAccessor* IlvStInspectorPanel::getInspectedGraphicAccessor | ( | ) | const |
Returns the accessor to the inspected object.
IlvGraphic* IlvStInspectorPanel::getInspectedObject | ( | ) |
Returns the current inspected object.
IlvStIAccessor** IlvStInspectorPanel::getInspectedObjectAccessors | ( | IlUInt & | count | ) | const |
Returns the array of accessors to the inspected object.
The returned array must be deleted by the user.
count | Contains the accessor count. |
delete[]
in order to delete this array. IlvStIMainEditor& IlvStInspectorPanel::getMainEditor | ( | ) |
Returns the main editor.
This editor contains all other editors and accessors.
const IlvStIMainEditor& IlvStInspectorPanel::getMainEditor | ( | ) | const |
Returns the main editor.
This editor contains all other editors and accessors.
IlvGraphic* IlvStInspectorPanel::getPanelObject | ( | const char * | name | ) | const |
Returns a graphic object in the inspector panel.
name | The graphic object name. |
0
.
|
virtual |
Called to initialize the editors with the graphic object.
obj | The graphic object. |
Reimplemented in IlvStIGadgetInspectorPanel, and IlvStIGraphicInspectorPanel.
|
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.
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:
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.
gadgetName | The gadget name. |
valueName | The property name of the graphic object. |
mode | The notification mode of the editor. |
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:
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.
gadgetName | The gadget name. |
accessor | The accessor to access to graphic object. |
mode | The notification mode of the editor. |
IlBoolean IlvStInspectorPanel::removeAccessor | ( | IlvStIAccessor * | acc | ) |
Removes the accessor from the main editor of the inspector panel.
acc | The accessor. |
IlTrue
if successful, otherwise returns IlFalse
. IlBoolean IlvStInspectorPanel::removeEditor | ( | const char * | name | ) |
Removes an editor.
Removes the editor from the list of editors.
name | The editor name. |
IlTrue
if successful, otherwise returns IlFalse
. IlBoolean IlvStInspectorPanel::removeEditor | ( | IlvStIEditor * | editor | ) |
Removes an editor.
Removes the editor from the list of editors.
editor | The editor. |
IlTrue
if successful, otherwise returns IlFalse
. © 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.