Abstract base class for all Open Inventor components. More...
#include <Inventor/Win/SoWinComponent.h>
Public Member Functions | |
virtual void | show () |
This shows the component. | |
virtual void | hide () |
This hides the component. | |
SbBool | isVisible () |
Returns TRUE if this component is mapped onto the screen. | |
SoWidget | getWidget () const |
This returns the base window handle for this component. | |
SbBool | isTopLevelShell () const |
Returns TRUE if this component is a top level shell component (has its own window). | |
SoWidget | getShellWidget () const |
Returns the shell window handle (NULL if the shell hasn't been created by this component). | |
SoWidget | getParentWidget () const |
Returns the parent window handle, be it a shell or not. | |
void | setSize (const SbVec2s &size) |
Convenience routine on the window handle. | |
SbVec2s | getSize () |
Convenience routine on the window handle. | |
SbBool | setFullScreen (const SbBool enable) |
Switches the viewer into (or out of) fullscreen mode. | |
SbBool | isFullScreen () const |
Queries if the viewer is in fullscreen mode. | |
void | setFullScreenEnable (const SbBool enable) |
Enables/disables fullscreen mode. | |
SbBool | isFullScreenEnable (void) const |
Queries if it is possible to put the viewer in fullscreen mode. | |
UINT * | getDisplay () |
Included for portability only. | |
SoNONUNICODE void | setTitle (const char *newTitle) |
Sets window title. | |
void | setTitle (const SbString &newTitle) |
Sets window title. | |
SbString | getTitle () const |
Gets window title. | |
SoNONUNICODE void | setIconTitle (const char *newIconTitle) |
Included for portability only. | |
void | setIconTitle (const SbString &newIconTitle) |
Included for portability only. | |
SbString | getIconTitle () const |
Included for portability only. | |
void | setWindowCloseCallback (SoWinComponentCB *func, void *data=NULL) |
Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is specified. | |
SbString | getWidgetName () const |
Returns the window handle name. | |
SbString | getClassName () const |
Returns the class name. | |
virtual | ~SoWinComponent () |
Destructor. | |
Static Public Member Functions | |
SoDEPRECATED static SoNONUNICODE void | displayHelp (const char *filename, UINT contextID) |
Static method to display the specified topic of the specified help file. | |
static SoDEPRECATED void | displayHelp (const SbString &filename, UINT contextID) |
Static method to display the specified topic of the specified help file. | |
static SoWinComponent * | getComponent (SoWidget w) |
Returns the SoWinComponent for this window handle. | |
Public Attributes | |
SbString | helpFileName |
Name of help file to open when the viewer Help button is pressed. | |
UINT | helpContextID |
The context ID of the help topic to open when the viewer Help button is pressed. | |
SbString | helpContextString |
The TopicID of the help topic to open when the viewer Help button is pressed. | |
Friends | |
class | SoWinComponentP |
Abstract base class for all Open Inventor components.
Abstract base class from which all Open Inventor Windows components are derived. This class provides a basic C++ protocol for building and displaying Windows components. Components are used to encapsulate some function or task into a reusable package in the form of a Windows window handle that can be used in any Open Inventor Windows program. See the Example section on how to build and use SoWinComponents.
SoWin, SoWinRenderArea, SoWinViewer, SoWinMaterialEditor
Definition at line 113 of file SoWinComponent.h.
|
virtual |
Destructor.
|
static |
Static method to display the specified topic of the specified help file.
This method can be used when the help file needs to be displayed from a user's application but the viewer is not available. For example, in an MFC application where the method used to display the help file is not in the View class. Only a compiled HTML help file (.chm) can be displayed with this method.
Non Unicode: This function should not be used in a Unicode application.
|
static |
Static method to display the specified topic of the specified help file.
This method can be used when the help file needs to be displayed from a user's application but the viewer is not available. For example, in an MFC application where the method used to display the help file is not in the View class. Only a compiled HTML help file (.chm) can be displayed with this method.
|
inline |
Returns the class name.
The class name is predefined by each component.
Definition at line 313 of file SoWinComponent.h.
|
static |
Returns the SoWinComponent for this window handle.
If the window handle does not match that of any Open Inventor component, then NULL is returned.
|
inline |
Included for portability only.
Definition at line 233 of file SoWinComponent.h.
|
inline |
Included for portability only.
Definition at line 273 of file SoWinComponent.h.
|
inline |
Returns the parent window handle, be it a shell or not.
Definition at line 195 of file SoWinComponent.h.
|
inline |
Returns the shell window handle (NULL if the shell hasn't been created by this component).
Definition at line 190 of file SoWinComponent.h.
SbVec2s SoWinComponent::getSize | ( | ) |
Convenience routine on the window handle.
|
inline |
Gets window title.
Definition at line 257 of file SoWinComponent.h.
|
inline |
This returns the base window handle for this component.
If the component created its own shell, this returns the topmost window handle beneath the shell. Call getShellWidget() to obtain the shell.
Definition at line 177 of file SoWinComponent.h.
|
inline |
Returns the window handle name.
The window handle name is passed to the build method.
Definition at line 307 of file SoWinComponent.h.
|
virtual |
This hides the component.
It calls the appropriate unrealize or unmanage routines.
Reimplemented in SoWinDirectionalLightEditor, SoWinMaterialEditor, and SoWinFullViewer.
SbBool SoWinComponent::isFullScreen | ( | ) | const |
Queries if the viewer is in fullscreen mode.
SbBool SoWinComponent::isFullScreenEnable | ( | void | ) | const |
Queries if it is possible to put the viewer in fullscreen mode.
|
inline |
Returns TRUE if this component is a top level shell component (has its own window).
Subclasses may use this to decide if they are allowed to resize themselves.
Definition at line 184 of file SoWinComponent.h.
SbBool SoWinComponent::isVisible | ( | ) |
Returns TRUE if this component is mapped onto the screen.
For a component to be visible, its window handle and the shell containing this window handle must be mapped (which is FALSE when the component is iconified).
Subclasses should call this routine before redrawing anything and in any sensor trigger methods. Calling this will check the current visibility (which is really cheap) and invoke the visibility changed callbacks if the state changes (see addVisibilityChangeCallback()).
Switches the viewer into (or out of) fullscreen mode.
void SoWinComponent::setFullScreenEnable | ( | const SbBool | enable | ) |
Enables/disables fullscreen mode.
If fullscreen mode is disabled, it is not possible to activate fullscreen mode with the right mouse button popup menu.
SoNONUNICODE void SoWinComponent::setIconTitle | ( | const char * | newIconTitle | ) |
Included for portability only.
Non Unicode: This function should not be used in a Unicode application.
void SoWinComponent::setIconTitle | ( | const SbString & | newIconTitle | ) |
Included for portability only.
void SoWinComponent::setSize | ( | const SbVec2s & | size | ) |
Convenience routine on the window handle.
SoNONUNICODE void SoWinComponent::setTitle | ( | const char * | newTitle | ) |
Sets window title.
The window title can be set for topLevelShell components or components which are directly under a shell window handle (i.e. components which have their own window).
Non Unicode: This function should not be used in a Unicode application.
void SoWinComponent::setTitle | ( | const SbString & | newTitle | ) |
Sets window title.
The window title can be set for topLevelShell components or components which are directly under a shell window handle (i.e. components which have their own window).
|
inline |
Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is specified.
A pointer to this class will be passed as the callback data.
Note: this callback is supplied because the user may wish to delete this component when it is closed.
Definition at line 294 of file SoWinComponent.h.
|
virtual |
This shows the component.
If this is a topLevelShell component, then show() will Realize and Map the window, else it will simply Manage the widget. In addition, show() will also pop the component window to the top and de-iconify if necessary, to make sure the component is visible by the user.
Reimplemented in SoWinDirectionalLightEditor, and SoWinMaterialEditor.
|
friend |
Definition at line 115 of file SoWinComponent.h.
UINT SoWinComponent::helpContextID |
The context ID of the help topic to open when the viewer Help button is pressed.
Definition at line 325 of file SoWinComponent.h.
SbString SoWinComponent::helpContextString |
The TopicID of the help topic to open when the viewer Help button is pressed.
Definition at line 331 of file SoWinComponent.h.
SbString SoWinComponent::helpFileName |
Name of help file to open when the viewer Help button is pressed.
Note: Only a compiled HTML help file (.chm) can be displayed with this method.
Definition at line 319 of file SoWinComponent.h.