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

FX::FXButton Class Reference

A button provides a push button, with optional icon and/or text label. More...

#include <FXButton.h>

Inheritance diagram for FX::FXButton:

FX::FXLabel FX::FXFrame FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject FX::FXMDIDeleteButton FX::FXMDIMaximizeButton FX::FXMDIMinimizeButton FX::FXMDIRestoreButton FX::FXPicker List of all members.

Public Member Functions

 FXButton (FXComposite *p, const FXString &text, FXIcon *ic=NULL, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=BUTTON_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 void setFocus ()
virtual void killFocus ()
virtual void setDefault (FXbool enable=TRUE)
void setState (FXuint s)
FXuint getState () const
void setButtonStyle (FXuint style)
FXuint getButtonStyle () const

Detailed Description

A button provides a push button, with optional icon and/or text label.

When pressed, the button widget sends a SEL_COMMAND to its target.

See also:

Constructor & Destructor Documentation

FX::FXButton::FXButton FXComposite p,
const FXString text,
FXIcon ic = NULL,
FXObject tgt = NULL,
FXSelector  sel = 0,
FXuint  opts = BUTTON_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,

Construct button with text and icon.

Member Function Documentation

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

Returns true because a button can receive focus.

Reimplemented from FX::FXWindow.

virtual void FX::FXButton::setFocus  )  [virtual]

Move the focus to this window.

Reimplemented from FX::FXWindow.

virtual void FX::FXButton::killFocus  )  [virtual]

Remove the focus from this window.

Reimplemented from FX::FXWindow.

virtual void FX::FXButton::setDefault FXbool  enable = TRUE  )  [virtual]

Set as default button.

Reimplemented from FX::FXWindow.

void FX::FXButton::setState FXuint  s  ) 

Set the button state.

FXuint FX::FXButton::getState  )  const [inline]

Get the button state.

void FX::FXButton::setButtonStyle FXuint  style  ) 

Set the button style flags.

FXuint FX::FXButton::getButtonStyle  )  const

Get the button style flags.

Copyright © 1997-2004 Jeroen van der Zijp