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

 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)
virtual bool canFocus () const
virtual FXint getDefaultWidth ()
virtual FXint getDefaultHeight ()
void setCheck (FXbool state=TRUE, FXbool notify=FALSE)
FXbool getCheck () const
void setCheckButtonStyle (FXuint style)
FXuint getCheckButtonStyle () const
FXColor getBoxColor () const
void setBoxColor (FXColor clr)
FXColor getCheckColor () const
void setCheckColor (FXColor clr)
virtual void save (FXStream &store) const
virtual void load (FXStream &store)

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.

See also:


Constructor & Destructor Documentation

FX::FXCheckButton::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.


Member Function Documentation

virtual bool FX::FXCheckButton::canFocus  )  const [virtual]
 

Returns true because a check button can receive focus.

Reimplemented from FX::FXWindow.

virtual FXint FX::FXCheckButton::getDefaultWidth  )  [virtual]
 

Get default width.

Reimplemented from FX::FXLabel.

virtual FXint FX::FXCheckButton::getDefaultHeight  )  [virtual]
 

Get default height.

Reimplemented from FX::FXLabel.

void FX::FXCheckButton::setCheck FXbool  state = TRUE,
FXbool  notify = FALSE
 

Set check button state (TRUE, FALSE or MAYBE).

FXbool FX::FXCheckButton::getCheck  )  const [inline]
 

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

void FX::FXCheckButton::setCheckButtonStyle FXuint  style  ) 
 

Change check button style.

FXuint FX::FXCheckButton::getCheckButtonStyle  )  const
 

Return current check button style.

FXColor FX::FXCheckButton::getBoxColor  )  const [inline]
 

Get the box background color.

void FX::FXCheckButton::setBoxColor FXColor  clr  ) 
 

Set the box background color.

FXColor FX::FXCheckButton::getCheckColor  )  const [inline]
 

Get the box check color.

void FX::FXCheckButton::setCheckColor FXColor  clr  ) 
 

Set the box check color.

virtual void FX::FXCheckButton::save FXStream store  )  const [virtual]
 

Save check button to a stream.

Reimplemented from FX::FXLabel.

virtual void FX::FXCheckButton::load FXStream store  )  [virtual]
 

Load check button from a stream.

Reimplemented from FX::FXLabel.

Copyright © 1997-2005 Jeroen van der Zijp