Wt examples
3.3.0
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
build
buildd
witty-3.3.0
examples
composer
Option.C
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
3
*
4
* See the LICENSE file for terms of use.
5
*/
6
7
#include <Wt/WText>
8
9
#include "
Option.h
"
10
#include "
OptionList.h
"
11
12
Option::Option
(
const
WString
& text,
WContainerWidget
*parent)
13
:
WContainerWidget
(parent),
14
sep_(0),
15
list_(0)
16
{
17
setInline
(
true
);
18
19
option_
=
new
WText
(text,
this
);
20
option_
->
setStyleClass
(
"option"
);
21
}
22
23
void
Option::setText
(
const
WString
& text)
24
{
25
option_
->setText(text);
26
}
27
28
void
Option::setOptionList
(
OptionList
*l)
29
{
30
list_
= l;
31
}
32
33
void
Option::addSeparator
()
34
{
35
sep_
=
new
WText
(
"|"
,
this
);
36
sep_
->
setStyleClass
(
"sep"
);
37
}
38
39
void
Option::hideSeparator
()
40
{
41
sep_
->hide();
42
}
43
44
void
Option::showSeparator
()
45
{
46
sep_
->show();
47
}
48
49
void
Option::setHidden
(
bool
hidden)
50
{
51
WContainerWidget::setHidden(hidden);
52
53
if
(
list_
)
54
list_
->
optionVisibilityChanged
(
this
, hidden);
55
}
Generated on Fri May 31 2013 for
the C++ Web Toolkit (Wt)
by
1.8.3.1