cee::vis::ViewerUIFramework Class Referenceabstract

A base class used for integrating Ceetron Desktop Components with a UI Toolkit. More...

Public Member Functions

 ViewerUIFramework (OpenGLContextGroup *contextGroup)
 Constructs a Viewer. More...
 
- Public Member Functions inherited from cee::vis::Viewer
 Viewer ()
 Constructs an empty viewer. More...
 

Protected Member Functions

virtual void doRequestRedraw ()=0
 Requests a redraw of the 3D window in the UI toolkit. More...
 
virtual void doRequestImmediateRedraw ()=0
 Requests an immediate redraw of the 3D window in the UI toolkit. More...
 
virtual bool doMakeCurrent ()=0
 Sets the OpenGL Context of the Viewer current. More...
 
virtual bool doIsCurrent ()=0
 Returns true if the OpenGL context in the Viewer is current. More...
 
virtual unsigned int doGetDefaultFramebufferObject ()=0
 Returns the default framebuffer object for the current surface. More...
 
bool initializeComponentInternalOpenGL ()
 Does internal initialization of this viewer. More...
 
void shutdownComponentInternalOpenGL ()
 Prepares the viewer for deletion. More...
 
OpenGLInfo openGLInfo () const
 Returns the openGL info for current framework. More...
 
Inheritance diagram for cee::vis::ViewerUIFramework:
cee::vis::Viewer

Detailed Description

A base class used for integrating Ceetron Desktop Components with a UI Toolkit.

This class describes the minimum implementation needed to integrate Ceetron Desktop Components into a UI framework. Ready to use PlatformIntegration classes are provided for Qt, wxWidgets and Win32. These can be useful to look at when creating a Viewer for your Toolkit. The Qt Viewers are described here: Using Ceetron Desktop Components with Qt.

To create your own Viewer, you need to derive from this class and implement the three pure virtual methods below. This is the only requirement to get Ceetron Desktop Components to work with your UI toolkit.

  • doRequestRedraw(): Here you need to redraw the window, usually by posting a update/redraw/refresh message.
  • doRequestImmediateRedraw(): Here you need to redraw the window now, not just post a update/redraw/refresh message.
  • doMakeCurrent(): Here you need to make the OpenGL context current.
  • doIsCurrent(): Here you need to return true if the OpenGL context of this viewer is current, and false if not.

Please contact Support if you need assistance in using Ceetron Desktop Components with your UI toolkit on your platform(s).

Constructor & Destructor Documentation

cee::vis::ViewerUIFramework::ViewerUIFramework ( OpenGLContextGroup contextGroup)

Constructs a Viewer.

You need to provide a OpenGLContextGroup. This is created using the VisualizationComponent::createOpenGLContextGroup() method. See one of the Minimal example programs for a demonstration on how to do this.

Member Function Documentation

cee::vis::ViewerUIFramework::doGetDefaultFramebufferObject ( )
protectedpure virtual

Returns the default framebuffer object for the current surface.

cee::vis::ViewerUIFramework::doIsCurrent ( )
protectedpure virtual

Returns true if the OpenGL context in the Viewer is current.

cee::vis::ViewerUIFramework::doMakeCurrent ( )
protectedpure virtual

Sets the OpenGL Context of the Viewer current.

cee::vis::ViewerUIFramework::doRequestImmediateRedraw ( )
protectedpure virtual

Requests an immediate redraw of the 3D window in the UI toolkit.

cee::vis::ViewerUIFramework::doRequestRedraw ( )
protectedpure virtual

Requests a redraw of the 3D window in the UI toolkit.

bool cee::vis::ViewerUIFramework::initializeComponentInternalOpenGL ( )
protected

Does internal initialization of this viewer.

It is safe to call this function multiple times, successive calls will do nothing if the viewer is already initialized.

Warning
The OpenGL context associated with this viewer must be the current context before calling this function.
OpenGLInfo cee::vis::ViewerUIFramework::openGLInfo ( ) const
protected

Returns the openGL info for current framework.

void cee::vis::ViewerUIFramework::shutdownComponentInternalOpenGL ( )
protected

Prepares the viewer for deletion.

Prepares the viewer for deletion by shutting down and possibly cleaning up backing OpenGL structures and resources.

Warning
Since calling this function may trigger freeing of OpenGL resources, the OpenGL context associated with this viewer must be current when calling this function.
After calling this function the viewer is no longer usable and should be deleted.