Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoWinComponent Class Reference

VSG extension Abstract base class for all Open Inventor components. More...

#include <Inventor/Win/SoWinComponent.h>

+ Inheritance diagram for SoWinComponent:

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.
 
UINTgetDisplay ()
 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 SoWinComponentgetComponent (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
 

Detailed Description

VSG extension 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.

EXAMPLE

SEE ALSO

SoWin, SoWinRenderArea, SoWinViewer, SoWinMaterialEditor

Definition at line 113 of file SoWinComponent.h.

Constructor & Destructor Documentation

◆ ~SoWinComponent()

virtual SoWinComponent::~SoWinComponent ( )
virtual

Destructor.

Member Function Documentation

◆ displayHelp() [1/2]

SoDEPRECATED static SoNONUNICODE void SoWinComponent::displayHelp ( const char *  filename,
UINT  contextID 
)
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.

◆ displayHelp() [2/2]

static SoDEPRECATED void SoWinComponent::displayHelp ( const SbString filename,
UINT  contextID 
)
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.

◆ getClassName()

SbString SoWinComponent::getClassName ( ) const
inline

Returns the class name.

The class name is predefined by each component.

Definition at line 313 of file SoWinComponent.h.

◆ getComponent()

static SoWinComponent * SoWinComponent::getComponent ( SoWidget  w)
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.

◆ getDisplay()

UINT * SoWinComponent::getDisplay ( )
inline

Included for portability only.

Definition at line 233 of file SoWinComponent.h.

◆ getIconTitle()

SbString SoWinComponent::getIconTitle ( ) const
inline

Included for portability only.

Definition at line 273 of file SoWinComponent.h.

◆ getParentWidget()

SoWidget SoWinComponent::getParentWidget ( ) const
inline

Returns the parent window handle, be it a shell or not.

Definition at line 195 of file SoWinComponent.h.

◆ getShellWidget()

SoWidget SoWinComponent::getShellWidget ( ) const
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.

◆ getSize()

SbVec2s SoWinComponent::getSize ( )

Convenience routine on the window handle.

◆ getTitle()

SbString SoWinComponent::getTitle ( ) const
inline

Gets window title.

Definition at line 257 of file SoWinComponent.h.

◆ getWidget()

SoWidget SoWinComponent::getWidget ( ) const
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.

◆ getWidgetName()

SbString SoWinComponent::getWidgetName ( ) const
inline

Returns the window handle name.

The window handle name is passed to the build method.

Definition at line 307 of file SoWinComponent.h.

◆ hide()

virtual void SoWinComponent::hide ( )
virtual

This hides the component.

It calls the appropriate unrealize or unmanage routines.

Reimplemented in SoWinDirectionalLightEditor, SoWinMaterialEditor, and SoWinFullViewer.

◆ isFullScreen()

SbBool SoWinComponent::isFullScreen ( ) const

Queries if the viewer is in fullscreen mode.

◆ isFullScreenEnable()

SbBool SoWinComponent::isFullScreenEnable ( void  ) const

Queries if it is possible to put the viewer in fullscreen mode.

◆ isTopLevelShell()

SbBool SoWinComponent::isTopLevelShell ( ) const
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.

◆ isVisible()

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()).

◆ setFullScreen()

SbBool SoWinComponent::setFullScreen ( const SbBool  enable)

Switches the viewer into (or out of) fullscreen mode.

◆ setFullScreenEnable()

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.

◆ setIconTitle() [1/2]

SoNONUNICODE void SoWinComponent::setIconTitle ( const char *  newIconTitle)

Included for portability only.

Non Unicode: This function should not be used in a Unicode application.

◆ setIconTitle() [2/2]

void SoWinComponent::setIconTitle ( const SbString newIconTitle)

Included for portability only.

◆ setSize()

void SoWinComponent::setSize ( const SbVec2s size)

Convenience routine on the window handle.

◆ setTitle() [1/2]

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.

◆ setTitle() [2/2]

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).

◆ setWindowCloseCallback()

void SoWinComponent::setWindowCloseCallback ( SoWinComponentCB func,
void *  data = NULL 
)
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.

◆ show()

virtual void SoWinComponent::show ( )
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.

Friends And Related Symbol Documentation

◆ SoWinComponentP

friend class SoWinComponentP
friend

Definition at line 115 of file SoWinComponent.h.

Member Data Documentation

◆ helpContextID

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.

◆ helpContextString

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.

◆ helpFileName

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.


The documentation for this class was generated from the following file: