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

FX::FXRadioButton Class Reference

A radio button is a tri-state button. More...

#include <FXRadioButton.h>

Inheritance diagram for FX::FXRadioButton:

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

Public Member Functions

 FXRadioButton (FXComposite *p, const FXString &text, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=RADIOBUTTON_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 FXbool canFocus () const
virtual FXint getDefaultWidth ()
virtual FXint getDefaultHeight ()
void setCheck (FXbool s=TRUE)
FXbool getCheck () const
void setRadioButtonStyle (FXuint style)
FXuint getRadioButtonStyle () const
FXColor getRadioColor () const
void setRadioColor (FXColor clr)
FXColor getDiskColor () const
void setDiskColor (FXColor clr)
virtual void save (FXStream &store) const
virtual void load (FXStream &store)

Detailed Description

A radio button is a tri-state button.

Normally, it is either TRUE or FALSE; 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 radio button sets its state to TRUE and sends a SEL_COMMAND to its target, and the message data set to the state of the radio button, of the type FXbool. If the radio button is contained inside a group box, the other radio buttons in the group box will be set to FALSE and will send a message as well.

See also:


Constructor & Destructor Documentation

FX::FXRadioButton::FXRadioButton FXComposite p,
const FXString text,
FXObject tgt = NULL,
FXSelector  sel = 0,
FXuint  opts = RADIOBUTTON_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 radio button.


Member Function Documentation

virtual FXbool FX::FXRadioButton::canFocus  )  const [virtual]
 

Returns true because a radio button can receive focus.

Reimplemented from FX::FXWindow.

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

Get default width.

Reimplemented from FX::FXLabel.

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

Get default height.

Reimplemented from FX::FXLabel.

void FX::FXRadioButton::setCheck FXbool  s = TRUE  ) 
 

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

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

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

void FX::FXRadioButton::setRadioButtonStyle FXuint  style  ) 
 

Change radio button style.

FXuint FX::FXRadioButton::getRadioButtonStyle  )  const
 

Return current radio button style.

FXColor FX::FXRadioButton::getRadioColor  )  const [inline]
 

Get the radio ball color.

void FX::FXRadioButton::setRadioColor FXColor  clr  ) 
 

Set the radio ball color.

FXColor FX::FXRadioButton::getDiskColor  )  const [inline]
 

Get the radio disk color.

void FX::FXRadioButton::setDiskColor FXColor  clr  ) 
 

Set the radio disk color.

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

Save radio button to a stream.

Reimplemented from FX::FXLabel.

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

Load radio button from a stream.

Reimplemented from FX::FXLabel.

Copyright © 1997-2004 Jeroen van der Zijp