OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WOSGButtonLabel Class Reference

implements mouse interaction for a osgWidget label More...

#include <WOSGButtonLabel.h>

+ Inheritance diagram for WOSGButtonLabel:
+ Collaboration diagram for WOSGButtonLabel:

Public Member Functions

 WOSGButtonLabel (bool pushable)
 constructor More...
 
 ~WOSGButtonLabel ()
 destructor More...
 
virtual bool mousePush (double, double, const osgWidget::WindowManager *)
 function handles mouse click on label, the function was copied from an osg example, as everything in the osg it wasn't documented, so it's not entirely sure what the params are for and what they do More...
 
bool clicked ()
 getter for clicked flag, resets the flag to false More...
 
bool pushed ()
 getter for pushed flag More...
 
void setPushed (bool pushed)
 setter More...
 

Private Attributes

bool m_clicked
 if true the label has been clicked since it was last checked for More...
 
bool m_pushable
 button is pushable or not More...
 
bool m_pushed
 true if button is pushable and was clicked More...
 

Detailed Description

implements mouse interaction for a osgWidget label

Definition at line 35 of file WOSGButtonLabel.h.

Constructor & Destructor Documentation

◆ WOSGButtonLabel()

WOSGButtonLabel::WOSGButtonLabel ( bool  pushable)
explicit

constructor

Parameters
pushabledenotes if the button is pushable, i.e. keeps a pushed state or not

Definition at line 27 of file WOSGButtonLabel.cpp.

◆ ~WOSGButtonLabel()

WOSGButtonLabel::~WOSGButtonLabel ( )

destructor

Definition at line 41 of file WOSGButtonLabel.cpp.

Member Function Documentation

◆ clicked()

bool WOSGButtonLabel::clicked ( )
inline

getter for clicked flag, resets the flag to false

Returns
true if the label has been clicked

Definition at line 86 of file WOSGButtonLabel.h.

References m_clicked.

Referenced by WOSGButton::clicked().

+ Here is the caller graph for this function:

◆ mousePush()

bool WOSGButtonLabel::mousePush ( double  ,
double  ,
const osgWidget::WindowManager *   
)
virtual

function handles mouse click on label, the function was copied from an osg example, as everything in the osg it wasn't documented, so it's not entirely sure what the params are for and what they do

Returns
bool

Definition at line 45 of file WOSGButtonLabel.cpp.

References m_clicked, m_pushable, and m_pushed.

◆ pushed()

bool WOSGButtonLabel::pushed ( )
inline

getter for pushed flag

Returns
true if the button is pushed

Definition at line 93 of file WOSGButtonLabel.h.

References m_pushed.

Referenced by WOSGButton::pushed(), and setPushed().

+ Here is the caller graph for this function:

◆ setPushed()

void WOSGButtonLabel::setPushed ( bool  pushed)
inline

setter

Parameters
pushedif true the button is pushed

Definition at line 98 of file WOSGButtonLabel.h.

References m_pushed, and pushed().

Referenced by WOSGButton::setPushed().

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

Member Data Documentation

◆ m_clicked

bool WOSGButtonLabel::m_clicked
private

if true the label has been clicked since it was last checked for

Definition at line 79 of file WOSGButtonLabel.h.

Referenced by clicked(), and mousePush().

◆ m_pushable

bool WOSGButtonLabel::m_pushable
private

button is pushable or not

Definition at line 81 of file WOSGButtonLabel.h.

Referenced by mousePush().

◆ m_pushed

bool WOSGButtonLabel::m_pushed
private

true if button is pushable and was clicked

Definition at line 83 of file WOSGButtonLabel.h.

Referenced by mousePush(), pushed(), and setPushed().


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