OpenWalnut  1.4.0
Public Types | Public Member Functions | Private Attributes | List of all members
WCustomWidget Class Referenceabstract

Custom widget which is created by a module to display custom information. More...

#include <WCustomWidget.h>

Public Types

typedef boost::shared_ptr< WCustomWidgetSPtr
 Abbreviation for a shared pointer on a instance of this class. More...
 
typedef boost::shared_ptr< const WCustomWidgetConstSPtr
 Abbreviation for a const shared pointer on a instance of this class. More...
 

Public Member Functions

 WCustomWidget (std::string title)
 Constructor. More...
 
virtual ~WCustomWidget ()
 Destructor. More...
 
virtual osg::ref_ptr< WGEGroupNodegetScene () const =0
 Get the scene which is displayed. More...
 
virtual boost::shared_ptr< WGEViewergetViewer () const =0
 Get the viewer which is used. More...
 
virtual std::string getTitle () const
 Get the title of the widget. More...
 
virtual size_t height () const =0
 Returns the height of the viewport of the camera. More...
 
virtual size_t width () const =0
 Returns the width of the viewport of the camera. More...
 
virtual void addEventHandler (osgGA::GUIEventHandler *handler)=0
 Adds an event handler to the widget's view. More...
 

Private Attributes

std::string m_title
 The widget's title string. More...
 

Detailed Description

Custom widget which is created by a module to display custom information.

Definition at line 66 of file WCustomWidget.h.

Member Typedef Documentation

typedef boost::shared_ptr< const WCustomWidget > WCustomWidget::ConstSPtr

Abbreviation for a const shared pointer on a instance of this class.

Definition at line 77 of file WCustomWidget.h.

typedef boost::shared_ptr< WCustomWidget > WCustomWidget::SPtr

Abbreviation for a shared pointer on a instance of this class.

Definition at line 72 of file WCustomWidget.h.

Constructor & Destructor Documentation

WCustomWidget::WCustomWidget ( std::string  title)
explicit

Constructor.

Create a custom widget instance.

Parameters
titlethe title of the widget

Definition at line 29 of file WCustomWidget.cpp.

WCustomWidget::~WCustomWidget ( )
virtual

Destructor.

Definition at line 34 of file WCustomWidget.cpp.

Member Function Documentation

virtual void WCustomWidget::addEventHandler ( osgGA::GUIEventHandler *  handler)
pure virtual

Adds an event handler to the widget's view.

Parameters
handlerPointer to the handler.
virtual osg::ref_ptr< WGEGroupNode > WCustomWidget::getScene ( ) const
pure virtual

Get the scene which is displayed.

Returns
the scene as osg::ref_ptr
std::string WCustomWidget::getTitle ( ) const
virtual

Get the title of the widget.

Returns
title as string

Definition at line 38 of file WCustomWidget.cpp.

References m_title.

virtual boost::shared_ptr< WGEViewer > WCustomWidget::getViewer ( ) const
pure virtual

Get the viewer which is used.

Returns
the viewer as boost::shard_ptr
virtual size_t WCustomWidget::height ( ) const
pure virtual

Returns the height of the viewport of the camera.

Returns
Height in pixels.
virtual size_t WCustomWidget::width ( ) const
pure virtual

Returns the width of the viewport of the camera.

Returns
Width in pixels.

Member Data Documentation

std::string WCustomWidget::m_title
private

The widget's title string.

Definition at line 138 of file WCustomWidget.h.

Referenced by getTitle().


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