|
http://www.sim.no http://www.coin3d.org |
#include <Inventor/Xt/viewers/SoXtFullViewer.h>
Inheritance diagram for SoXtFullViewer:

The SoXtFullViewer is an abstract viewer class which extends it's superclass (the basic SoXtViewer class) with two major user interface additions:.
The user interface features listed above are the common parts of the user interfaces of the SoXtFullViewer's non-abstract subclasses.
For "real" application programs, the viewers / components from this class onwards and further down in the inheritance hierarchy is usually not all that interesting, as they enforces too much extra user interface cruft not compatible with the look and feel of the other parts of the application user interface. So most "real" applications will use either the SoXtViewer or the SoXtRenderArea as their base-level component, and then inherit one of these down into one's own "proper" viewer classes.
The non-abstract subclasses of the SoXtFullViewer class are viewer components often used as a test-bed for prototyping / rapid application development when doing quick testing of scenes, stand-alone 3D-models, animation techniques, etc etc.
Public Types | |
| BUILD_NONE = 0x00 | |
| BUILD_DECORATION = 0x01 | |
| BUILD_POPUP = 0x02 | |
| BUILD_ALL = (BUILD_DECORATION | BUILD_POPUP) | |
| enum | BuildFlag { BUILD_NONE = 0x00, BUILD_DECORATION = 0x01, BUILD_POPUP = 0x02, BUILD_ALL = (BUILD_DECORATION | BUILD_POPUP) } |
Public Member Functions | |
| void | setDecoration (const SbBool on) |
| SbBool | isDecoration (void) const |
| void | setPopupMenuEnabled (const SbBool on) |
| SbBool | isPopupMenuEnabled (void) const |
| Widget | getAppPushButtonParent (void) const |
| void | addAppPushButton (Widget newButton) |
| void | insertAppPushButton (Widget newButton, int index) |
| void | removeAppPushButton (Widget oldButton) |
| int | findAppPushButton (Widget oldButton) const |
| int | lengthAppPushButton (void) const |
| Widget | getRenderAreaWidget (void) const |
| virtual void | setViewing (SbBool on) |
| virtual void | setComponentCursor (const SoXtCursor &cursor) |
Protected Member Functions | |
| SoXtFullViewer (Widget parent, const char *name, SbBool embed, BuildFlag flag, Type type, SbBool build) | |
| ~SoXtFullViewer () | |
| virtual void | sizeChanged (const SbVec2s &size) |
| Widget | buildWidget (Widget parent) |
| virtual void | buildDecoration (Widget parent) |
| virtual Widget | buildLeftTrim (Widget parent) |
| virtual Widget | buildBottomTrim (Widget parent) |
| virtual Widget | buildRightTrim (Widget parent) |
| Widget | buildAppButtons (Widget parent) |
| Widget | buildViewerButtons (Widget parent) |
| virtual void | createViewerButtons (Widget parent, SbPList *buttonlist) |
| virtual void | buildPopupMenu (void) |
| virtual void | setPopupMenuString (const char *title) |
| virtual void | openPopupMenu (const SbVec2s position) |
| virtual void | leftWheelStart (void) |
| virtual void | leftWheelMotion (float) |
| virtual void | leftWheelFinish (void) |
| float | getLeftWheelValue (void) const |
| void | setLeftWheelValue (const float value) |
| virtual void | bottomWheelStart (void) |
| virtual void | bottomWheelMotion (float) |
| virtual void | bottomWheelFinish (void) |
| float | getBottomWheelValue (void) const |
| void | setBottomWheelValue (const float value) |
| virtual void | rightWheelStart (void) |
| virtual void | rightWheelMotion (float) |
| virtual void | rightWheelFinish (void) |
| float | getRightWheelValue (void) const |
| void | setRightWheelValue (const float value) |
| void | setLeftWheelString (const char *const name) |
| Widget | getLeftWheelLabelWidget (void) const |
| void | setBottomWheelString (const char *const name) |
| Widget | getBottomWheelLabelWidget (void) const |
| void | setRightWheelString (const char *const name) |
| Widget | getRightWheelLabelWidget (void) const |
| virtual SbBool | processSoEvent (const SoEvent *const event) |
| Widget | buildFunctionsSubmenu (Widget popup) |
| Widget | buildDrawStyleSubmenu (Widget popup) |
Protected Attributes | |
| Widget | leftWheel |
| Widget | rightWheel |
| Widget | bottomWheel |
| Widget | leftDecoration |
| Widget | rightDecoration |
| Widget | bottomDecoration |
| Widget | leftWheelLabel |
| char * | leftWheelStr |
| float | leftWheelVal |
| Widget | rightWheelLabel |
| char * | rightWheelStr |
| float | rightWheelVal |
| Widget | bottomWheelLabel |
| char * | bottomWheelStr |
| float | bottomWheelVal |
| SoXtPopupMenu * | prefmenu |
| char * | popupTitle |
| SbBool | popupEnabled |
| SbPList * | viewerButtonWidgets |
Friends | |
| class | SoGuiFullViewerP |
| class | SoXtFullViewerP |
Valid values for the constructor argument that decides how much of the user interface features to set up. The enum values are bitflags that can be OR'ed together.
| BUILD_NONE | Do not add any of the user interface components. |
| BUILD_DECORATION | Only build and set up the decorations around the OpenGL canvas. |
| BUILD_POPUP | Only build the popup menu. (Activated with the right mousebutton.) |
| BUILD_ALL | Build all user interface components of the SoXtFullViewer. |
| SoXtFullViewer::SoXtFullViewer | ( | Widget | parent, | |
| const char * | name, | |||
| SbBool | embed, | |||
| BuildFlag | flags, | |||
| Type | type, | |||
| SbBool | build | |||
| ) | [protected] |
Constructor.
| SoXtFullViewer::~SoXtFullViewer | ( | ) | [protected] |
The destructor.
| void SoXtFullViewer::setDecoration | ( | const SbBool | enable | ) |
This method sets whether the decorations should be shown or not.
| SbBool SoXtFullViewer::isDecoration | ( | void | ) | const |
This method returns whether the decorations are shown or not.
| void SoXtFullViewer::setPopupMenuEnabled | ( | const SbBool | enable | ) |
This method sets whether the popup menu should be enabled or not.
| SbBool SoXtFullViewer::isPopupMenuEnabled | ( | void | ) | const |
This method returns whether the popup menu is enabled or not.
| Widget SoXtFullViewer::getAppPushButtonParent | ( | void | ) | const |
Return value is either NULL or a widget of type xmFormWidgetClass (Xm/Form.h)
AppPushButtons are on the left decoration.
| void SoXtFullViewer::addAppPushButton | ( | Widget | newButton | ) |
Not implemented.
Each button will be set to 30x30 pixels, and they will appear on the left viewer decoration.
| void SoXtFullViewer::insertAppPushButton | ( | Widget | newButton, | |
| int | index | |||
| ) |
FIXME: write doc
| void SoXtFullViewer::removeAppPushButton | ( | Widget | oldButton | ) |
FIXME: write doc
| int SoXtFullViewer::findAppPushButton | ( | Widget | oldButton | ) | const |
FIXME: write doc
| int SoXtFullViewer::lengthAppPushButton | ( | void | ) | const |
FIXME: write doc
| Widget SoXtFullViewer::getRenderAreaWidget | ( | void | ) | const |
FIXME: write doc
| void SoXtFullViewer::setViewing | ( | SbBool | on | ) | [virtual] |
Set view mode.
If the view mode is on, user events will be caught and used to influence the camera position / orientation. If view mode is off, all events in the viewer canvas (like for instance keypresses or mouseclicks and -movements) will be passed along to the scene graph.
Default is to have the view mode active.
Reimplemented from SoXtViewer.
Reimplemented in SoXtPlaneViewer, SoXtExaminerViewer, and SoXtFlyViewer.
| void SoXtFullViewer::setComponentCursor | ( | const SoXtCursor & | cursor | ) | [virtual] |
Sets the cursor for this component.
Reimplemented from SoXtComponent.
| void SoXtFullViewer::sizeChanged | ( | const SbVec2s & | size | ) | [protected, virtual] |
Called internally from within the SoXt library when the widget embedded in a component changes it size, which is usually triggered by end-user interaction.
This method is then invoked to notify the component that the size has changed. It is called from the top and all the way down to the bottom, the size being adjusted to take into account extra decorations having been added at each level in the component class hierarchy.
Reimplemented from SoXtViewer.
| Widget SoXtFullViewer::buildWidget | ( | Widget | parent | ) | [protected] |
This method builds the component contents in the given parent widget. For subclasses adding new user interface items, this method is typically overridden in the following manner:
Widget MyOwnViewer::buildWidget(Widget parent)
{
Widget superw = <superclass>::buildWidget(parent);
// [then move superw within MyOwnViewer framework and add own
// user interface components]
}
Reimplemented from SoXtRenderArea.
Reimplemented in SoXtPlaneViewer.
| void SoXtFullViewer::buildDecoration | ( | Widget | parent | ) | [protected, virtual] |
FIXME: write doc
| Widget SoXtFullViewer::buildLeftTrim | ( | Widget | parent | ) | [protected, virtual] |
This method creates the left decoration form.
Return value is a Motif widget of the xmFormWidgetClass type. The left decoration is 30 pixels wide.
| Widget SoXtFullViewer::buildBottomTrim | ( | Widget | parent | ) | [protected, virtual] |
This method created the bottom decoration form.
Return value is a Motif widget of the xmFormWidgetClass type. It is 30 pixels high.
| Widget SoXtFullViewer::buildRightTrim | ( | Widget | parent | ) | [protected, virtual] |
This method creates the right decoration form.
Returned value is a Motif widget of the xmFormWidgetClass type. The form is 30 pixels wide.
| Widget SoXtFullViewer::buildAppButtons | ( | Widget | parent | ) | [protected] |
Build the application specified button row (if any buttons were set up).
| Widget SoXtFullViewer::buildViewerButtons | ( | Widget | parent | ) | [protected] |
FIXME: write doc
| void SoXtFullViewer::createViewerButtons | ( | Widget | parent, | |
| SbPList * | buttonlist | |||
| ) | [protected, virtual] |
Set up the viewer buttons with pixmaps and event connections.
One important note if you want to override this method to add your own buttons to the list (in the explanation below, it is assumed that you know how virtual function table pointers are handled by C++):
createViewerButtons() is called (indirectly) from the constructors of the viewer classes. This means that you need to delay it's invocation until your own subclass's constructor is run, because otherwise your re-implementation won't have been added to the internal virtual function table yet.
Delaying a superclass viewer from building it's decorations is done by passing build==FALSE as the last argument of the protected constructors. You will then have to explicitly trigger the building in your own constructor.
Here's a minimal example that shows the steps needed to be able to override createViewerButtons() from SoXtExaminerViewer:
class MyExaminerViewer : public SoXtExaminerViewer { public: MyExaminerViewer(Widget parent); protected: virtual void createViewerButtons(Widget parent, SbPList * buttonlist); }; MyExaminerViewer::MyExaminerViewer(Widget parent) : SoXtExaminerViewer(parent, NULL, TRUE, SoXtFullViewer::BUILD_ALL, SoXtFullViewer::BROWSER, // build == FALSE, to delay creation of decorations FALSE) { // Explicitly trigger the construction of viewer decorations. Widget widget = this->buildWidget(this->getParentWidget()); this->setBaseWidget(widget); } void MyExaminerViewer::createViewerButtons(Widget parent, SbPList * buttonlist) { SoXtExaminerViewer::createViewerButtons(parent, buttonlist); // [now add your own button(s) to the buttonlist] }
Reimplemented in SoXtPlaneViewer, and SoXtExaminerViewer.
| void SoXtFullViewer::buildPopupMenu | ( | void | ) | [protected, virtual] |
FIXME: write doc
| void SoXtFullViewer::setPopupMenuString | ( | const char * | name | ) | [protected, virtual] |
Set title of popup menu.
| void SoXtFullViewer::openPopupMenu | ( | const SbVec2s | position | ) | [protected, virtual] |
FIXME: write doc
| void SoXtFullViewer::leftWheelStart | ( | void | ) | [protected, virtual] |
Called when the user start to drag the thumbwheel in the left frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented in SoXtPlaneViewer.
| void SoXtFullViewer::leftWheelMotion | ( | float | value | ) | [protected, virtual] |
Called repeatedly as the user drags the thumbwheel in the left frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented in SoXtPlaneViewer, SoXtExaminerViewer, and SoXtConstrainedViewer.
| void SoXtFullViewer::leftWheelFinish | ( | void | ) | [protected, virtual] |
Called as the user let go of the thumbwheel in the left frame after a drag operation. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented in SoXtPlaneViewer.
| float SoXtFullViewer::getLeftWheelValue | ( | void | ) | const [protected] |
| void SoXtFullViewer::setLeftWheelValue | ( | const float | value | ) | [protected] |
Set a new value for the left thumbwheel.
| void SoXtFullViewer::bottomWheelStart | ( | void | ) | [protected, virtual] |
Called when the user start to drag the thumbwheel in the bottom frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented in SoXtPlaneViewer.
| void SoXtFullViewer::bottomWheelMotion | ( | float | value | ) | [protected, virtual] |
Called repeatedly as the user drags the thumbwheel in the bottom frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented in SoXtPlaneViewer, SoXtExaminerViewer, and SoXtConstrainedViewer.
| void SoXtFullViewer::bottomWheelFinish | ( | void | ) | [protected, virtual] |
Called as the user let go of the thumbwheel in the bottom frame after a drag operation. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented in SoXtPlaneViewer.
| float SoXtFullViewer::getBottomWheelValue | ( | void | ) | const [protected] |
| void SoXtFullViewer::setBottomWheelValue | ( | const float | value | ) | [protected] |
Set a new value for the bottom thumbwheel.
| void SoXtFullViewer::rightWheelStart | ( | void | ) | [protected, virtual] |
Called when the user start to drag the thumbwheel in the right frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented in SoXtPlaneViewer.
| void SoXtFullViewer::rightWheelMotion | ( | float | value | ) | [protected, virtual] |
Called repeatedly as the user drags the thumbwheel in the right frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented in SoXtPlaneViewer, SoXtExaminerViewer, and SoXtFlyViewer.
| void SoXtFullViewer::rightWheelFinish | ( | void | ) | [protected, virtual] |
Called as the user let go of the thumbwheel in the right frame after a drag operation. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented in SoXtPlaneViewer.
| float SoXtFullViewer::getRightWheelValue | ( | void | ) | const [protected] |
| void SoXtFullViewer::setRightWheelValue | ( | const float | value | ) | [protected] |
Set a new value for the right thumbwheel.
| void SoXtFullViewer::setLeftWheelString | ( | const char *const | string | ) | [protected] |
This method sets the label text displayed below the thumb wheel on the left decoration.
| Widget SoXtFullViewer::getLeftWheelLabelWidget | ( | void | ) | const [protected] |
This method returns the native widget for the label below the left thumb wheel.
| void SoXtFullViewer::setBottomWheelString | ( | const char *const | string | ) | [protected] |
This method sets the label text that is displayed to the left og the bottom decoration thumb wheel.
| Widget SoXtFullViewer::getBottomWheelLabelWidget | ( | void | ) | const [protected] |
This method returns the native widget for the label beside the bottom thumb wheel.
| void SoXtFullViewer::setRightWheelString | ( | const char *const | string | ) | [protected] |
This method sets the label text that is displayed under the right decoration thumb wheel.
| Widget SoXtFullViewer::getRightWheelLabelWidget | ( | void | ) | const [protected] |
This method returns the native widget for the label below the right thumb wheel.
| SbBool SoXtFullViewer::processSoEvent | ( | const SoEvent *const | event | ) | [protected, virtual] |
Toolkit-native events are attempted converted to Coin-generic events in the SoXtRenderArea::processEvent() method. If this succeeds, they are forwarded to this method.
This is a virtual method, and is overridden in it's subclasses to catch events of particular interest to the viewer classes, for instance.
Return TRUE iff the event was processed. If not it should be passed on further up in the inheritance hierarchy by the caller. This last point is extremely important to take note of if you are expanding the toolkit with your own viewer class.
This method is not part of the original SGI InventorXt API. Note that you can still override the toolkit-native processEvent() method instead of this "generic" method.
Reimplemented from SoXtViewer.
Reimplemented in SoXtPlaneViewer, SoXtExaminerViewer, and SoXtFlyViewer.
| Widget SoXtFullViewer::buildFunctionsSubmenu | ( | Widget | popup | ) | [protected] |
FIXME: write doc
| Widget SoXtFullViewer::buildDrawStyleSubmenu | ( | Widget | popup | ) | [protected] |
FIXME: write doc
Widget SoXtFullViewer::leftWheel [protected] |
The widget for the left thumb wheel.
Widget SoXtFullViewer::rightWheel [protected] |
The widget for the right thumb wheel.
Widget SoXtFullViewer::bottomWheel [protected] |
The widget for the bottom thumb wheel.
Widget SoXtFullViewer::leftDecoration [protected] |
The root widget for the left-side decorations.
Widget SoXtFullViewer::rightDecoration [protected] |
The root widget for the right-side decorations.
Widget SoXtFullViewer::bottomDecoration [protected] |
The root widget for the bottom decorations.
Widget SoXtFullViewer::leftWheelLabel [protected] |
The widget for the label below the left thumb wheel.
char * SoXtFullViewer::leftWheelStr [protected] |
The string used in the label under the left thumb wheel.
float SoXtFullViewer::leftWheelVal [protected] |
The value of the left thumb wheel. Do not set directly, use access method.
Widget SoXtFullViewer::rightWheelLabel [protected] |
The widget for the label below the right thumb wheel.
char * SoXtFullViewer::rightWheelStr [protected] |
The string used in the label below the right thumb wheel.
float SoXtFullViewer::rightWheelVal [protected] |
The value of the right thumb wheel. Do not set directly, use access method.
Widget SoXtFullViewer::bottomWheelLabel [protected] |
The widget for the label besides the bottom thumb wheel.
char * SoXtFullViewer::bottomWheelStr [protected] |
The string used in the label besides the bottom thumb wheel.
float SoXtFullViewer::bottomWheelVal [protected] |
The value of the bottom thumb wheel. Do not set directly, use access method.
SoXtPopupMenu * SoXtFullViewer::prefmenu [protected] |
The popup menu manager object.
char * SoXtFullViewer::popupTitle [protected] |
The title for the popup menu,
SbBool SoXtFullViewer::popupEnabled [protected] |
Whether the popup menu is enabled or not.
SbPList * SoXtFullViewer::viewerButtonWidgets [protected] |
The list of button widgets for the right viewer decoration.
Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.
Generated on Tue Dec 2 23:15:46 2008 for SoXt by Doxygen. 1.4.7