OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
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:
+ Collaboration diagram for WOSGButton:

Public Member Functions

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

Private Attributes

WOSGButtonLabelm_label
 stores pointer to the label object More...
 
size_t m_id
 id More...
 

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::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::~WOSGButton ( )
virtual

destructor

Definition at line 43 of file WOSGButton.cpp.

Member Function Documentation

◆ clicked()

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.

+ Here is the call graph for this function:

◆ getId()

size_t WOSGButton::getId ( )
inline

getter

Returns
id

Definition at line 126 of file WOSGButton.h.

References m_id.

◆ pushed()

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().

Referenced by setPushed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBackgroundColor()

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.

◆ setId()

void WOSGButton::setId ( size_t  id)

setter for id

Parameters
id

Definition at line 52 of file WOSGButton.cpp.

References m_id.

◆ setLabel()

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

setter

Parameters
label

Definition at line 47 of file WOSGButton.cpp.

References m_label.

◆ setPushed()

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, pushed(), and WOSGButtonLabel::setPushed().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_id

size_t WOSGButton::m_id
private

id

Definition at line 108 of file WOSGButton.h.

Referenced by getId(), and setId().

◆ m_label

WOSGButtonLabel* WOSGButton::m_label
private

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: