-
Notifications
You must be signed in to change notification settings - Fork 388
Expand file tree
/
Copy pathWCheckBox.C
More file actions
43 lines (35 loc) · 839 Bytes
/
WCheckBox.C
File metadata and controls
43 lines (35 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#include "Wt/WCheckBox"
#include "DomElement.h"
namespace Wt {
WCheckBox::WCheckBox(WContainerWidget *parent)
: WAbstractToggleButton(parent)
{
setFormObject(true);
}
WCheckBox::WCheckBox(const WString& text, WContainerWidget *parent)
: WAbstractToggleButton(text, parent)
{
setFormObject(true);
}
WCheckBox::WCheckBox(bool withLabel, const WString& text,
WContainerWidget *parent)
: WAbstractToggleButton(withLabel, text, parent)
{
setFormObject(true);
}
void WCheckBox::updateDom(DomElement& element, bool all)
{
if (all)
element.setAttribute("type", "checkbox");
WAbstractToggleButton::updateDom(element, all);
}
DomElementType WCheckBox::domElementType() const
{
return DomElement_INPUT;
}
}