OpenWalnut
1.5.0dev
|
Class implements an osgWidget::Box with a label that can be used as a button in the 3D scene. More...
#include <WOSGButton.h>
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 | |
WOSGButtonLabel * | m_label |
stores pointer to the label object More... | |
size_t | m_id |
id More... | |
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.
WOSGButton::WOSGButton | ( | std::string | name, |
osgWidget::Box::BoxType | type, | ||
bool | resize_hint, | ||
bool | pushable | ||
) |
constructor
name | name of the button, will also be displayed on the label |
type | taken from the osgWidget::Box |
resize_hint | |
pushable | denotes if the button is pushable, i.e. keeps a pushed state or not |
Definition at line 31 of file WOSGButton.cpp.
References m_label.
|
virtual |
destructor
Definition at line 43 of file WOSGButton.cpp.
|
inline |
getter
Definition at line 111 of file WOSGButton.h.
References WOSGButtonLabel::clicked(), and m_label.
|
inline |
|
inline |
getter
Definition at line 116 of file WOSGButton.h.
References m_label, and WOSGButtonLabel::pushed().
Referenced by setPushed().
void WOSGButton::setBackgroundColor | ( | const WColor & | color | ) |
setter for the background color of the label
color | the color |
Definition at line 57 of file WOSGButton.cpp.
References m_label.
void WOSGButton::setId | ( | size_t | id | ) |
void WOSGButton::setLabel | ( | std::string | label | ) |
|
inline |
setter
pushed | if true the button is pushed |
Definition at line 121 of file WOSGButton.h.
References m_label, pushed(), and WOSGButtonLabel::setPushed().
|
private |
|
private |
stores pointer to the label object
Definition at line 106 of file WOSGButton.h.
Referenced by clicked(), pushed(), setBackgroundColor(), setLabel(), setPushed(), and WOSGButton().