Wt::Button Class Reference

Button Class. More...

#include <button.h>

Inherits Wt::Widget.

Inherited by Wt::PushButton.

List of all members.

Public Member Functions

 Button (Widget *parent=0, const std::string &name="Button::anon", int wflags=0)
const std::string & text () const
virtual void setText (const std::string &text)
const Pixmappixmap () const
virtual void setPixmap (const Pixmap &pixmap)
void setSound (const Sound &click_snd=Sound())
bool isExclusiveToggle () const
ButtonGroupgroup () const
void animateClick ()

Public Attributes

sigc::signal< void > pressed
sigc::signal< void > canceled
sigc::signal< void > released
sigc::signal< void > clicked

Protected Member Functions

virtual bool hitButton (const Point &pos) const
virtual void draw (Painter *p, const Region &region)
 widget should be able to draw itself
virtual void drawButton (Painter *p)=0
virtual void drawButtonLabel (Painter *p)=0
virtual void mousePressEvent (MouseEvent *)
 event handling specialization
virtual void mouseReleaseEvent (MouseEvent *)
virtual void focusInEvent (FocusEvent *)
virtual void focusOutEvent (FocusEvent *)
virtual void keyPressEvent (KeyEvent *)
virtual void keyReleaseEvent (KeyEvent *)
virtual void enterEvent (Event *)
virtual void leaveEvent (Event *)
virtual void setButtonSize ()=0
void update ()
virtual void buttonPressEvent ()
virtual void buttonCancelEvent ()
virtual void buttonReleaseEvent ()
virtual void buttonClickEvent ()


Detailed Description

Button Class.


Constructor & Destructor Documentation

Wt::Button::Button ( Widget parent = 0,
const std::string &  name = "Button::anon",
int  wflags = 0 
)


Member Function Documentation

void Wt::Button::animateClick (  ) 

void Wt::Button::buttonCancelEvent (  )  [protected, virtual]

Reimplemented in Wt::PushButton, and Wt::ToggleButton.

void Wt::Button::buttonClickEvent (  )  [protected, virtual]

Reimplemented in Wt::PushButton, and Wt::ToggleButton.

void Wt::Button::buttonPressEvent (  )  [protected, virtual]

Reimplemented in Wt::PushButton, and Wt::ToggleButton.

void Wt::Button::buttonReleaseEvent (  )  [protected, virtual]

Reimplemented in Wt::PushButton, and Wt::ToggleButton.

void Wt::Button::draw ( Painter p,
const Region region 
) [protected, virtual]

widget should be able to draw itself

A clever widget can draw only the parts of it that are specified in the region argument. A not so clever widget can safely ignore the region argument and draw the entire widget area.

Keep in mind that double buffering is already implemented and you can't gain anything by reimplementing it again at this level.

Reimplemented from Wt::Widget.

void Wt::Button::drawButton ( Painter p  )  [protected, pure virtual]

Implemented in Wt::PushButton.

void Wt::Button::drawButtonLabel ( Painter p  )  [protected, pure virtual]

Implemented in Wt::PushButton.

void Wt::Button::enterEvent ( Event  )  [protected, virtual]

Reimplemented from Wt::Widget.

void Wt::Button::focusInEvent ( FocusEvent  )  [protected, virtual]

Reimplemented from Wt::Widget.

void Wt::Button::focusOutEvent ( FocusEvent  )  [protected, virtual]

Reimplemented from Wt::Widget.

ButtonGroup * Wt::Button::group (  )  const

bool Wt::Button::hitButton ( const Point pos  )  const [protected, virtual]

bool Wt::Button::isExclusiveToggle (  )  const

void Wt::Button::keyPressEvent ( KeyEvent  )  [protected, virtual]

Reimplemented from Wt::Widget.

void Wt::Button::keyReleaseEvent ( KeyEvent  )  [protected, virtual]

Reimplemented from Wt::Widget.

void Wt::Button::leaveEvent ( Event  )  [protected, virtual]

Reimplemented from Wt::Widget.

void Wt::Button::mousePressEvent ( MouseEvent  )  [protected, virtual]

event handling specialization

Reimplemented from Wt::Widget.

void Wt::Button::mouseReleaseEvent ( MouseEvent  )  [protected, virtual]

Reimplemented from Wt::Widget.

const Pixmap& Wt::Button::pixmap (  )  const [inline]

virtual void Wt::Button::setButtonSize (  )  [protected, pure virtual]

Implemented in Wt::PushButton.

void Wt::Button::setPixmap ( const Pixmap pixmap  )  [virtual]

void Wt::Button::setSound ( const Sound click_snd = Sound()  ) 

void Wt::Button::setText ( const std::string &  text  )  [virtual]

const std::string& Wt::Button::text (  )  const [inline]

void Wt::Button::update (  )  [protected]

Reimplemented from Wt::Widget.


Member Data Documentation

sigc::signal<void> Wt::Button::canceled

sigc::signal<void> Wt::Button::clicked

sigc::signal<void> Wt::Button::pressed

sigc::signal<void> Wt::Button::released


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

Generated Fri Jul 28 19:22:38 2006.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.