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

FX::FXCheckButton Class Reference

#include <FXCheckButton.h>

Inheritance diagram for FX::FXCheckButton:

FX::FXLabel FX::FXFrame FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject List of all members.

Public Methods

 FXCheckButton (FXComposite *p, const FXString &text, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=CHECKBUTTON_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 new check button.

virtual FXbool canFocus () const
 Returns true because a check button can receive focus.

virtual FXint getDefaultWidth ()
 Get default width.

virtual FXint getDefaultHeight ()
 Get default height.

void setCheck (FXbool state=TRUE)
 Set check button state (TRUE, FALSE or MAYBE).

FXbool getCheck () const
 Get check button state (TRUE, FALSE or MAYBE).

void setCheckButtonStyle (FXuint style)
 Change check button style.

FXuint getCheckButtonStyle () const
 Return current check button style.

FXColor getBoxColor () const
 Get the box background color.

void setBoxColor (FXColor clr)
 Set the box background color.

virtual void save (FXStream &store) const
 Save check button to a stream.

virtual void load (FXStream &store)
 Load check button from a stream.


Detailed Description

A check button is a tri-state button. Normally, it is either TRUE or FALSE, and toggles between TRUE or FALSE whenever it is pressed. A third state MAYBE may be set to indicate that no selection has been made yet by the user, or that the state is ambiguous. When pressed, the check button sends a SEL_COMMAND to its target, and the message data represents the state of the check button.

See also: