Wt::WIconPair Class Reference

A pair of icons, which show one at a time, and represents a binary state.. More...

Inherits Wt::WCompositeWidget.

Inheritance diagram for Wt::WIconPair:

Inheritance graph
[legend]
List of all members.

Public Slots

void showIcon1 ()
 Set state to 0 (show icon 1).
void showIcon2 ()
 Set state to 1 (show icon 2).

Public Member Functions

 WIconPair (const std::string icon1URI, const std::string icon2URI, bool clickIsSwitch=true, WContainerWidget *parent=0)
 Construct an icon pair from the two icons.
void setState (int num)
 Set the state, which determines the visible icon.
int state () const
 Get the current state.
WImageicon1 () const
 Get the first icon image.
WImageicon2 () const
 Get the second icon image.

Public Attributes

EventSignal< WMouseEvent > & icon1Clicked
 Signal emitted when clicked while in state 0 (icon 1 is shown).
EventSignal< WMouseEvent > & icon2Clicked
 Signal emitted when clicked while in state 1 (icon 2 is shown).

Detailed Description

A pair of icons, which show one at a time, and represents a binary state..

This widget manages two images, only one of which is shown at a single time, which reflects the current 'state'.

The widget may react to click events, by changing state.


Constructor & Destructor Documentation

Wt::WIconPair::WIconPair ( const std::string  icon1URI,
const std::string  icon2URI,
bool  clickIsSwitch = true,
WContainerWidget parent = 0 
)

Construct an icon pair from the two icons.

The constructor takes the URI of the two icons. When clickIsSwitch is set true, clicking on the icon will switch state.


Member Function Documentation

void Wt::WIconPair::setState ( int  num  ) 

Set the state, which determines the visible icon.

The first icon has number 0, and the second icon has number 1.

See also:
state()

int Wt::WIconPair::state (  )  const

Get the current state.

See also:
setState()


The documentation for this class was generated from the following files:
Generated on Sun Jul 1 19:37:18 2007 for Wt by doxygen 1.4.7