SoXtComponent Class Reference
[Xt]

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

#include <Inventor/Xt/SoXtComponent.h>

Inheritance diagram for SoXtComponent:
SoStereoDialog SoXtColorEditor SoXtDirectionalLightEditor SoXtGLWidget SoXtMaterialEditor SoXtMaterialList SoXtPrintDialog SoXtSliderSetBase

List of all members.

Public Member Functions

virtual void show ()
virtual void hide ()
SbBool isVisible ()
SoWidget getWidget () const
SbBool isTopLevelShell () const
SoWidget getShellWidget () const
SoWidget getParentWidget () const
void setSize (const SbVec2s &size)
SbVec2s getSize ()
SbBool setFullScreen (const SbBool enable)
SbBool isFullScreen (void) const
void setFullScreenEnable (const SbBool enable)
SbBool isFullScreenEnable () const
Display * getDisplay ()
SoNONUNICODE void setTitle (const char *newTitle)
void setTitle (const SbString &newTitle)
SbString getTitle () const
SoNONUNICODE void setIconTitle (const char *newIconTitle)
void setIconTitle (const SbString &newIconTitle)
SbString getIconTitle () const
void setWindowCloseCallback (SoXtComponentCB *func, void *data=NULL)
SbString getWidgetName () const
SbString getClassName () const

Static Public Member Functions

static void displayHelp (const char *filename, UINT contextID)
static SoXtComponentgetComponent (SoWidget w)

Detailed Description

Abstract base class for all Open Inventor components.

Abstract base class from which all Open Inventor Xt components are derived. This class provides a basic C++ protocol for building and displaying Motif components. Components are used to encapsulate some function or task into a reusable package in the form of a Motif widget that can be used in any Open Inventor Xt program. See the Example section on how to build and use SoXtComponents.

EXAMPLE

RESOURCES

SEE ALSO

SoXt, SoXtRenderArea, SoXtViewer, SoXtMaterialEditor


Member Function Documentation

static void SoXtComponent::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 pointer to 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.

SbString SoXtComponent::getClassName (  )  const [inline]

Returns the class name.

The class name is predefined by each component.

static SoXtComponent* SoXtComponent::getComponent ( SoWidget  w  )  [static]

This returns the SoXtComponent for this widget.

If the widget does not match that of any Open Inventor component, then NULL is returned.

Display * SoXtComponent::getDisplay (  )  [inline]

Returns the X display associated with this components widget.

SbString SoXtComponent::getIconTitle (  )  const [inline]

Gets icon title.

SoWidget SoXtComponent::getParentWidget (  )  const [inline]

Returns the parent widget, be it a shell or not.

SoWidget SoXtComponent::getShellWidget (  )  const [inline]

Returns the shell widget (NULL if the shell hasn't been created by this component).

SbVec2s SoXtComponent::getSize (  ) 

Convenience routine on the widget.

Reimplemented in SoXtViewer.

SbString SoXtComponent::getTitle (  )  const [inline]

Gets window title.

SoWidget SoXtComponent::getWidget (  )  const [inline]

This returns the base widget for this component.

If the component created its own shell, this returns the topmost widget beneath the shell. Call getShellWidget() to obtain the shell.

SbString SoXtComponent::getWidgetName (  )  const [inline]

Returns the widget name.

The widget name is passed to the build method.

virtual void SoXtComponent::hide (  )  [virtual]

This hides the component.

Reimplemented in SoXtDirectionalLightEditor, SoXtMaterialEditor, and SoXtFullViewer.

SbBool SoXtComponent::isFullScreen ( void   )  const

Queries if the viewer is in fullscreen mode.

SbBool SoXtComponent::isFullScreenEnable (  )  const

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

SbBool SoXtComponent::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.

SbBool SoXtComponent::isVisible (  ) 

Returns TRUE if this component is mapped onto the screen.

For a component to be visible, its widget and the shell containing this widget 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()).

SbBool SoXtComponent::setFullScreen ( const SbBool  enable  ) 

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

void SoXtComponent::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.

void SoXtComponent::setIconTitle ( const SbString newIconTitle  ) 

Sets icon title.

The icon title can be set for topLevelShell components or components which are directly under a shell widget (i.e. components which have their own window).

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

Sets icon title.

The icon title can be set for topLevelShell components or components which are directly under a shell widget (i.e. components which have their own window).

Non Unicode List:
This function should not be used in a Unicode application.
void SoXtComponent::setSize ( const SbVec2s size  ) 

Convenience routine on the widget.

void SoXtComponent::setTitle ( const SbString newTitle  ) 

Sets window title.

The window title can be set for topLevelShell components or components which are directly under a shell widget (i.e. components which have their own window).

SoNONUNICODE void SoXtComponent::setTitle ( const char *  newTitle  ) 

Sets window title.

The window title can be set for topLevelShell components or components which are directly under a shell widget (i.e. components which have their own window).

Non Unicode List:
This function should not be used in a Unicode application.
void SoXtComponent::setWindowCloseCallback ( SoXtComponentCB 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 set to something other than NULL.

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.

virtual void SoXtComponent::show (  )  [virtual]

This shows the component.

Reimplemented in SoXtDirectionalLightEditor, SoXtMaterialEditor, and SoXtSliderSetBase.


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/