Go to the documentation of this file.
6 #include <Wt/WCssDecorationStyle.h>
7 #include <Wt/WContainerWidget.h>
20 icon1Clicked(nullptr),
23 auto impl = cpp14::make_unique<WContainerWidget>();
WImage * icon1_
First icon.
IconPair(const std::string icon1URI, const std::string icon2URI, bool clickIsSwitch=true)
Construct a two-state icon widget.
WStatelessSlot * implementStateless(void(T::*method)())
void undoShowIcon2()
Undo function for prelearning showIcon2()
WImage * icon2_
Second icon.
int previousState_
Undo state for prelearning stateless showIcon1() and showIcon2() slots.
EventSignal< WMouseEvent > * icon1Clicked
Signal emitted when clicked while in state 0 (icon 1 is shown).
void setState(int num)
Set which icon should be visible.
Wt::Signals::connection connect(F function)
void showIcon2()
Set state to 1 (show icon 2).
void showIcon1()
Set state to 0 (show icon 1).
int state() const
Get the current state.
void undoShowIcon1()
Undo function for prelearning showIcon1()
EventSignal< WMouseEvent > * icon2Clicked
Signal emitted when clicked while in state 1 (icon 2 is shown).
Generated on Thu Mar 26 2020 for the
C++ Web Toolkit (Wt) by
1.8.17