Wt::Ext::AbstractButton Class Reference
[Ext widgets]

Abstract base class for a button or menu item. More...

#include <Wt/Ext/AbstractButton>

Inheritance diagram for Wt::Ext::AbstractButton:

Inheritance graph
[legend]

List of all members.

Public Member Functions

void setText (const WString &text)
 Set the item text.
const WStringtext () const
 Get the item text.
void setIcon (const std::string &path)
 Set the item icon path.
const std::string & icon () const
 Get the item icon path.
void setCheckable (bool how)
 Set if the item is checkable.
bool isCheckable () const
 Return if the item is checkable.
void setMenu (Menu *menu)
 Set a menu that popups up when the item is activated.
void setChecked (bool how)
 Change the checked state.
bool isChecked () const
 Get the checked state.
void configureToolTip (ToolTipConfig *config)
 Configure the tool tip associated with this item.
virtual void refresh ()
 Refresh the widget.

Public Attributes

JSignal activated
 Signal emitted when a item gets activated.
JSignal< bool > toggled
 Signal emitted when a item gets toggled.


Detailed Description

Abstract base class for a button or menu item.

See also:
Button, MenuItem

Member Function Documentation

void Wt::Ext::AbstractButton::setChecked ( bool  how  ) 

Change the checked state.

This is only used when the isCheckable() == true.

See also:
setCheckable(bool), isCheckable()

void Wt::Ext::AbstractButton::configureToolTip ( ToolTipConfig config  ) 

Configure the tool tip associated with this item.

If the config has no parent, then ownership is transferred to this widget.

void Wt::Ext::AbstractButton::refresh (  )  [virtual]

Refresh the widget.

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

The widget must actualize its contents in response.

Reimplemented from Wt::WWebWidget.


Member Data Documentation

Signal emitted when a item gets activated.

This signal is emitted for non-checkable items (for who isCheckable() == false), when the user activates the item (by clicking it).

See also:
setCheckable(bool), isCheckable()

Signal emitted when a item gets toggled.

This signal is emitted for checkable items (for who isCheckable() == false), when the user changed toggles the item state. The new state is passed as a parameter value.

See also:
setCheckable(bool), isCheckable()


Generated on Fri Sep 12 17:01:15 2008 for Wt by doxygen 1.5.6