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

FX::FXCheckButton Class Reference

A Check Button is a tri-state button. More...

#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 Member Functions

long onPaint (FXObject *, FXSelector, void *)
long onUpdate (FXObject *, FXSelector, void *)
long onEnter (FXObject *, FXSelector, void *)
long onLeave (FXObject *, FXSelector, void *)
long onFocusIn (FXObject *, FXSelector, void *)
long onFocusOut (FXObject *, FXSelector, void *)
long onUngrabbed (FXObject *, FXSelector, void *)
long onLeftBtnPress (FXObject *, FXSelector, void *)
long onLeftBtnRelease (FXObject *, FXSelector, void *)
long onKeyPress (FXObject *, FXSelector, void *)
long onKeyRelease (FXObject *, FXSelector, void *)
long onHotKeyPress (FXObject *, FXSelector, void *)
long onHotKeyRelease (FXObject *, FXSelector, void *)
long onCheck (FXObject *, FXSelector, void *)
long onUncheck (FXObject *, FXSelector, void *)
long onUnknown (FXObject *, FXSelector, void *)
long onCmdSetValue (FXObject *, FXSelector, void *)
long onCmdSetIntValue (FXObject *, FXSelector, void *)
long onCmdGetIntValue (FXObject *, FXSelector, void *)
 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 (FXuchar state=TRUE, FXbool notify=false)
 Set check button state (TRUE, FALSE or MAYBE)
FXuchar 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.
FXColor getCheckColor () const
 Get the box check color.
void setCheckColor (FXColor clr)
 Set the box check color.
virtual void save (FXStream &store) const
 Save check button to a stream.
virtual void load (FXStream &store)
 Load check button from a stream.

Protected Attributes

FXColor checkColor
FXColor boxColor
FXuchar check
FXuchar oldcheck

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. The option CHECKBUTTON_AUTOGRAY (CHECKBUTTON_AUTOHIDE) causes the button to be grayed out (hidden) if its handler does not respond to the SEL_UPDATE message. With the CHECKBUTTON_PLUS option, the Check Button will draw a + or - sign instead of a check. You can use this to make collapsable panels, by hooking up a Check Button to a layout manager via the ID_TOGGLE_SHOWN message. This will give a similar visual element as collapsing folders in a Tree List.


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

Copyright © 1997-2011 Jeroen van der Zijp