Class to define a toggle button. More...
#include <Inventor/dialog/PoXtToggleButtonData.h>
Public Types | |
enum | State { ON, OFF } |
Public Member Functions | |
PoXtToggleButtonData (const SbString &label="", State state=OFF, const SbString &onString="", const SbString &offString="") | |
virtual | ~PoXtToggleButtonData () |
SoNONUNICODE void | setLabel (const char *label) |
void | setLabel (const SbString &label) |
SbString | getLabel () const |
SoNONUNICODE void | setString (State state, const char *str) |
void | setString (State state, const SbString &str) |
SbString | getString (State state) const |
void | setState (State state) |
State | getState () const |
virtual TypeXtElement | getType () const |
virtual PoXtElementData * | copy () const |
This element is composed of a string on the left, a toggle button in the center, and a string associated to the state of the toggle on the right. By default the text of the label, the two strings associated to the state of the toggle button are empty and the state of the toggle button is OFF.
PoXtToggleButtonData::PoXtToggleButtonData | ( | const SbString & | label = "" , |
|
State | state = OFF , |
|||
const SbString & | onString = "" , |
|||
const SbString & | offString = "" | |||
) |
Constructor.
virtual PoXtToggleButtonData::~PoXtToggleButtonData | ( | ) | [virtual] |
Destructor.
virtual PoXtElementData* PoXtToggleButtonData::copy | ( | ) | const [virtual] |
Creates and returns a new Xt element which is a copy of this Xt element.
Implements PoXtElementData.
SbString PoXtToggleButtonData::getLabel | ( | ) | const |
Gets the text of the label on the left of toggle button.
State PoXtToggleButtonData::getState | ( | ) | const |
Gets the state of the toggle button.
virtual TypeXtElement PoXtToggleButtonData::getType | ( | ) | const [virtual] |
Returns the type of the Xt element.
Reimplemented from PoXtElementData.
void PoXtToggleButtonData::setLabel | ( | const SbString & | label | ) |
Sets the text of the label on the left of toggle button.
SoNONUNICODE void PoXtToggleButtonData::setLabel | ( | const char * | label | ) |
Sets the text of the label on the left of toggle button.
void PoXtToggleButtonData::setState | ( | State | state | ) |
Sets the state of the toggle button.
Sets a string for the given state.
SoNONUNICODE void PoXtToggleButtonData::setString | ( | State | state, | |
const char * | str | |||
) |
Sets a string for the given state.