OpenWalnut  1.4.0
Public Member Functions | Private Attributes
WOSGButton Class Reference

Class implements an osgWidget::Box with a label that can be used as a button in the 3D scene. More...

#include <WOSGButton.h>

+ Inheritance diagram for WOSGButton:

List of all members.

Public Member Functions

 WOSGButton (std::string name, osgWidget::Box::BoxType type, bool resize_hint, bool pushable)
 constructor
virtual ~WOSGButton ()
 destructor
void setId (size_t id)
 setter for id
size_t getId ()
 getter
void setLabel (std::string label)
 setter
bool clicked ()
 getter
bool pushed ()
 getter
void setPushed (bool pushed)
 setter
void setBackgroundColor (const WColor &color)
 setter for the background color of the label

Private Attributes

WOSGButtonLabelm_label
 stores pointer to the label object
size_t m_id
 id

Detailed Description

Class implements an osgWidget::Box with a label that can be used as a button in the 3D scene.

Definition at line 41 of file WOSGButton.h.


Constructor & Destructor Documentation

WOSGButton::WOSGButton ( std::string  name,
osgWidget::Box::BoxType  type,
bool  resize_hint,
bool  pushable 
)

constructor

Parameters:
namename of the button, will also be displayed on the label
typetaken from the osgWidget::Box
resize_hint
pushabledenotes if the button is pushable, i.e. keeps a pushed state or not

Definition at line 31 of file WOSGButton.cpp.

References m_label.

WOSGButton::~WOSGButton ( ) [virtual]

destructor

Definition at line 43 of file WOSGButton.cpp.


Member Function Documentation

bool WOSGButton::clicked ( ) [inline]

getter

Returns:
true when button was clicked

Definition at line 111 of file WOSGButton.h.

References WOSGButtonLabel::clicked(), and m_label.

size_t WOSGButton::getId ( ) [inline]

getter

Returns:
id

Definition at line 126 of file WOSGButton.h.

References m_id.

bool WOSGButton::pushed ( ) [inline]

getter

Returns:
true when button was pushed

Definition at line 116 of file WOSGButton.h.

References m_label, and WOSGButtonLabel::pushed().

void WOSGButton::setBackgroundColor ( const WColor &  color)

setter for the background color of the label

Parameters:
colorthe color

Definition at line 57 of file WOSGButton.cpp.

References m_label.

void WOSGButton::setId ( size_t  id)

setter for id

Parameters:
id

Definition at line 52 of file WOSGButton.cpp.

References m_id.

void WOSGButton::setLabel ( std::string  label)

setter

Parameters:
label

Definition at line 47 of file WOSGButton.cpp.

References m_label.

void WOSGButton::setPushed ( bool  pushed) [inline]

setter

Parameters:
pushedif true the button is pushed

Definition at line 121 of file WOSGButton.h.

References m_label, and WOSGButtonLabel::setPushed().


Member Data Documentation

id

Definition at line 108 of file WOSGButton.h.

Referenced by getId(), and setId().

stores pointer to the label object

Definition at line 106 of file WOSGButton.h.

Referenced by clicked(), pushed(), setBackgroundColor(), setLabel(), setPushed(), and WOSGButton().


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