Wt examples
3.3.0
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
build
buildd
witty-3.3.0
examples
treelist
IconPair.h
Go to the documentation of this file.
1
// This may look like C code, but it's really -*- C++ -*-
2
/*
3
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
4
*
5
* See the LICENSE file for terms of use.
6
*/
7
#ifndef ICONPAIR_H_
8
#define ICONPAIR_H_
9
10
#include <Wt/WCompositeWidget>
11
12
namespace
Wt {
13
class
WImage;
14
}
15
20
34
class
IconPair
:
public
Wt::WCompositeWidget
35
{
36
public
:
42
IconPair
(
const
std::string icon1URI,
const
std::string icon2URI,
43
bool
clickIsSwitch =
true
,
Wt::WContainerWidget
*parent = 0);
44
51
void
setState
(
int
num);
52
57
int
state
()
const
;
58
61
Wt::WImage
*
icon1
()
const
{
return
icon1_
; }
62
65
Wt::WImage
*
icon2
()
const
{
return
icon2_
; }
66
69
void
showIcon1
();
70
73
void
showIcon2
();
74
75
private
:
76
Wt::WContainerWidget
*
impl_
;
77
79
Wt::WImage
*
icon1_
;
80
82
Wt::WImage
*
icon2_
;
83
84
public
:
88
Wt::EventSignal<Wt::WMouseEvent>
&
icon1Clicked
;
89
93
Wt::EventSignal<Wt::WMouseEvent>
&
icon2Clicked
;
94
95
private
:
97
int
previousState_
;
98
100
void
undoShowIcon1
();
101
103
void
undoShowIcon2
();
104
};
105
108
#endif // ICONPAIR_H_
Generated on Fri May 31 2013 for
the C++ Web Toolkit (Wt)
by
1.8.3.1