Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXTriStateButton Class Reference

The tri-state button provides a three-state button, which toggles between the on and the off state each time it is pressed; programmatically, it may also be switched into the MAYBE state. More...

#include <FXTriStateButton.h>

Inheritance diagram for FX::FXTriStateButton:
FX::FXToggleButton FX::FXLabel FX::FXFrame FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject

List of all members.

Public Member Functions

long onPaint (FXObject *, FXSelector, void *)
long onUnknown (FXObject *, FXSelector, void *)
long onQueryHelp (FXObject *, FXSelector, void *)
long onQueryTip (FXObject *, FXSelector, void *)
 FXTriStateButton (FXComposite *p, const FXString &text1, const FXString &text2, const FXString &text3, FXIcon *icon1=NULL, FXIcon *icon2=NULL, FXIcon *icon3=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 tri-state toggle button with three text labels, and three icons, one for each state.
virtual void create ()
 Create server-side resources.
virtual void detach ()
 Detach server-side resources.
virtual FXint getDefaultWidth ()
 Get default width.
virtual FXint getDefaultHeight ()
 Get default height.
void setMaybeText (const FXString &text)
 Change maybe text shown when toggled.
FXString getMaybeText () const
 Return maybe text.
void setMaybeIcon (FXIcon *ic)
 Change maybe icon shown when toggled.
FXIcongetMaybeIcon () const
 Return maybe icon.
void setMaybeHelpText (const FXString &text)
 Change maybe help text shown when toggled.
FXString getMaybeHelpText () const
 Return maybe help text.
void setMaybeTipText (const FXString &text)
 Change maybe tip text shown when toggled.
FXString getMaybeTipText () const
 Return maybe tip text.
virtual void save (FXStream &store) const
 Save toggle button to a stream.
virtual void load (FXStream &store)
 Load toggle button from a stream.
virtual ~FXTriStateButton ()
 Destructor.

Protected Attributes

FXString maybelabel
FXIconmaybeicon
FXString maybetip
FXString maybehelp

Detailed Description

The tri-state button provides a three-state button, which toggles between the on and the off state each time it is pressed; programmatically, it may also be switched into the MAYBE state.

The MAYBE state is useful to signify an unknown state in the application data. Like the toggle button, it sends a SEL_COMMAND to its target, with the message data set to the current state of the toggle button, of the type FXbool.


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

Copyright © 1997-2011 Jeroen van der Zijp