![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXToggleButton.h>
The toggle button provides a two-state button, which toggles between the on and the off state each time it is pressed.
For each state, the toggle button has a unique icon and text label. When pressed, the button widget sends a SEL_COMMAND to its target, with the message data set to the current state of the toggle button, of the type FXbool.
See also:
FX::FXToggleButton::FXToggleButton | ( | FXComposite * | p, |
const FXString & | text1, | ||
const FXString & | text2, | ||
FXIcon * | icon1 = NULL , |
||
FXIcon * | icon2 = NULL , |
||
FXObject * | tgt = NULL , |
||
FXSelector | sel = 0 , |
||
FXuint | opts = TOGGLEBUTTON_NORMAL , |
||
FXint | x = 0 , |
||
FXint | y = 0 , |
||
FXint | w = 0 , |
||
FXint | h = 0 , |
||
FXint | pl = DEFAULT_PAD , |
||
FXint | pr = DEFAULT_PAD , |
||
FXint | pt = DEFAULT_PAD , |
||
FXint | pb = DEFAULT_PAD |
||
) |
Construct toggle button with two text labels, and two icons, one for each state.
virtual FX::FXToggleButton::~FXToggleButton | ( | ) | [virtual] |
Destructor.
virtual void FX::FXToggleButton::create | ( | ) | [virtual] |
Create server-side resources.
Reimplemented from FX::FXLabel.
Reimplemented in FX::FXTriStateButton.
virtual void FX::FXToggleButton::detach | ( | ) | [virtual] |
Detach server-side resources.
Reimplemented from FX::FXLabel.
Reimplemented in FX::FXTriStateButton.
virtual bool FX::FXToggleButton::canFocus | ( | ) | const [virtual] |
Returns true because a toggle button can receive focus.
Reimplemented from FX::FXWindow.
virtual FXint FX::FXToggleButton::getDefaultWidth | ( | ) | [virtual] |
virtual FXint FX::FXToggleButton::getDefaultHeight | ( | ) | [virtual] |
void FX::FXToggleButton::setAltText | ( | const FXString & | text | ) |
Change alternate text shown when toggled.
FXString FX::FXToggleButton::getAltText | ( | ) | const [inline] |
Return alternate text.
void FX::FXToggleButton::setAltIcon | ( | FXIcon * | ic | ) |
Change alternate icon shown when toggled.
FXIcon* FX::FXToggleButton::getAltIcon | ( | ) | const [inline] |
Return alternate icon.
void FX::FXToggleButton::setState | ( | FXbool | s = TRUE , |
FXbool | notify = FALSE |
||
) |
Change toggled state.
FXbool FX::FXToggleButton::getState | ( | ) | const [inline] |
return toggled state
void FX::FXToggleButton::setAltHelpText | ( | const FXString & | text | ) |
Change alternate help text shown when toggled.
FXString FX::FXToggleButton::getAltHelpText | ( | ) | const [inline] |
Return alternate help text.
void FX::FXToggleButton::setAltTipText | ( | const FXString & | text | ) |
Change alternate tip text shown when toggled.
FXString FX::FXToggleButton::getAltTipText | ( | ) | const [inline] |
Return alternate tip text.
void FX::FXToggleButton::setToggleStyle | ( | FXuint | style | ) |
Set the toggle button style flags.
FXuint FX::FXToggleButton::getToggleStyle | ( | ) | const |
Get the toggle button style flags.
virtual void FX::FXToggleButton::save | ( | FXStream & | store | ) | const [virtual] |
Save toggle button to a stream.
Reimplemented from FX::FXLabel.
Reimplemented in FX::FXTriStateButton.
virtual void FX::FXToggleButton::load | ( | FXStream & | store | ) | [virtual] |
Load toggle button from a stream.
Reimplemented from FX::FXLabel.
Reimplemented in FX::FXTriStateButton.
![]() |