![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXToggleButton.h>
Public Member Functions | |
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) | |
virtual void | create () |
virtual void | detach () |
virtual FXbool | canFocus () const |
virtual FXint | getDefaultWidth () |
virtual FXint | getDefaultHeight () |
void | setAltText (const FXString &text) |
FXString | getAltText () const |
void | setAltIcon (FXIcon *ic) |
FXIcon * | getAltIcon () const |
void | setState (FXuchar s=TRUE, FXbool notify=false) |
FXuchar | getState () const |
void | setAltHelpText (const FXString &text) |
FXString | getAltHelpText () const |
void | setAltTipText (const FXString &text) |
FXString | getAltTipText () const |
void | setToggleStyle (FXuint style) |
FXuint | getToggleStyle () const |
virtual void | save (FXStream &store) const |
virtual void | load (FXStream &store) |
virtual | ~FXToggleButton () |
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 FXbool FX::FXToggleButton::canFocus | ( | ) | const [virtual] |
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.
FXuchar 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.
![]() |