52# include <Inventor/Qt/SoQtComponent.h>
54# include <Inventor/Win/SoWinComponent.h>
57#ifndef _SO_XT_COMPONENT_H_
58#define _SO_XT_COMPONENT_H_
60#include <X11/Intrinsic.h>
61#include <Inventor/SbLinear.h>
62#include <Inventor/SbString.h>
63#include <Inventor/Gui/SoGuiComponent.h>
64#include <Inventor/Xt/SoXtDef.h>
72typedef void SoXtComponentVisibilityCB(
void* data,
SbBool b );
201 SoWidget
getShellWidget()
const {
return m_guiComponent->isTopLevelShell() ? parentWidget : NULL; }
254 SoNONUNICODE
void setTitle(
const char* newTitle );
269 return m_guiComponent->getTitle(); }
293 return m_guiComponent->getIconTitle(); }
306 { windowCloseFunc = func; windowCloseData = data; }
319 return m_guiComponent->getWidgetName(); }
326 return m_guiComponent->getClassName(); }
334 SoWidget baseWidget()
const {
return getWidget(); }
363 const char* name = NULL,
364 SbBool buildInsideParent = TRUE,
375 void setBaseWidget( SoWidget w );
379 void setClassName(
const SbString &n ) { m_guiComponent->setClassName( n ); }
387 virtual void windowCloseAction();
392 virtual void afterRealizeHook();
402 virtual SbString getDefaultWidgetName()
const;
403 virtual SbString getDefaultTitle()
const;
404 virtual SbString getDefaultIconTitle()
const;
419 void registerWidget( SoWidget w );
420 void unregisterWidget( SoWidget w );
426 void addVisibilityChangeCallback( SoXtComponentVisibilityCB* func,
void* userData = NULL );
427 void removeVisibilityChangeCallback( SoXtComponentVisibilityCB* func,
void* userData = NULL );
438 void openHelpCard(
const char* cardName );
441 static SbString getlabel(
unsigned int whatisit );
447 void constructorCommon( SoWidget parent,
const char* name,
SbBool buildInsideParent,
SbBool sync );
450 SbBool callWebBrowser(
const char* url )
const;
456 virtual void widgetDestroyed();
459 SoWidget parentWidget;
460 SoWidget _baseWidget;
465 SbBool ShellMapped, widgetMapped;
467 void checkForVisibilityChange();
474 void* windowCloseData;
475 static void windowCloseActionCB( SoWidget w,
SoXtComponent* v,
void* data );
479 static SbDict* widgetDictionary;
482 Dimension posX, posY, width, height;
483 int m_decorationHints;
494 return (_baseWidget != NULL ? XtDisplay(_baseWidget) : NULL);
Class for smart character strings.
Manages a list of callbacks and associated data.
Abstract base class for all Open Inventor components.
SbBool isFullScreen(void) const
Queries if the viewer is in fullscreen mode.
SbVec2s getSize()
Convenience routine on the widget.
void setSize(const SbVec2s &size)
Convenience routine on the widget.
SoWidget getShellWidget() const
Returns the shell widget (NULL if the shell hasn't been created by this component).
void setWindowCloseCallback(SoXtComponentCB *func, void *data=NULL)
Sets which callback to call when the user closes this component (double click in the upper left corne...
void SoXtComponentCB(void *data, SoXtComponent *v)
virtual void show()
This shows the component.
static SoXtComponent * getComponent(SoWidget w)
This returns the SoXtComponent for this widget.
void setFullScreenEnable(const SbBool enable)
Enables/disables fullscreen mode.
SbString getClassName() const
Returns the class name.
SbString getWidgetName() const
Returns the widget name.
SoNONUNICODE void setIconTitle(const char *newIconTitle)
Sets icon title.
SbString getTitle() const
Gets window title.
Display * getDisplay()
Returns the X display associated with this components widget.
static void displayHelp(const char *filename, UINT contextID)
Static method to display the specified topic of the specified help file.
SbBool isVisible()
Returns TRUE if this component is mapped onto the screen.
SoWidget getWidget() const
This returns the base widget for this component.
SbBool isFullScreenEnable() const
Queries if it is possible to put the viewer in fullscreen mode.
SoWidget getParentWidget() const
Returns the parent widget, be it a shell or not.
SoNONUNICODE void setTitle(const char *newTitle)
Sets window title.
SbBool isTopLevelShell() const
Returns TRUE if this component is a top level shell component (has its own window).
SbString getIconTitle() const
Gets icon title.
SbBool setFullScreen(const SbBool enable)
Switches the viewer into (or out of) fullscreen mode.
void setIconTitle(const SbString &newIconTitle)
Sets icon title.
virtual void hide()
This hides the component.
void setTitle(const SbString &newTitle)
Sets window title.