OpenWalnut  1.4.0
Public Types | Public Member Functions | Private Attributes
WCustomWidget Class Reference

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

#include <WCustomWidget.h>

List of all members.

Public Types

typedef boost::shared_ptr
< WCustomWidget
SPtr
 Abbreviation for a shared pointer on a instance of this class.
typedef boost::shared_ptr
< const WCustomWidget
ConstSPtr
 Abbreviation for a const shared pointer on a instance of this class.

Public Member Functions

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

Private Attributes

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

Detailed Description

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

Definition at line 64 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 75 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 70 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.

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 136 of file WCustomWidget.h.

Referenced by getTitle().


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