summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/checkbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-05 21:48:30 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-05 21:48:30 +0300
commit6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed (patch)
tree79a54d4c838c85df29b1b95702b71a95c43ceb5a /src/guichan/widgets/checkbox.cpp
parentd1bb1b375d657f0821ccfebf18fa1c3873314690 (diff)
downloadmanaplus-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.tar.gz
manaplus-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.tar.bz2
manaplus-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.tar.xz
manaplus-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.zip
Improve constructors in some classes.
Diffstat (limited to 'src/guichan/widgets/checkbox.cpp')
-rw-r--r--src/guichan/widgets/checkbox.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/guichan/widgets/checkbox.cpp b/src/guichan/widgets/checkbox.cpp
index fe0bfbee4..58710409b 100644
--- a/src/guichan/widgets/checkbox.cpp
+++ b/src/guichan/widgets/checkbox.cpp
@@ -58,19 +58,24 @@
namespace gcn
{
- CheckBox::CheckBox()
+ CheckBox::CheckBox() :
+ Widget(),
+ MouseListener(),
+ KeyListener(),
+ mSelected(false)
{
- setSelected(false);
-
setFocusable(true);
addMouseListener(this);
addKeyListener(this);
}
- CheckBox::CheckBox(const std::string &caption, bool selected)
+ CheckBox::CheckBox(const std::string &caption, bool selected) :
+ Widget(),
+ MouseListener(),
+ KeyListener(),
+ mSelected(selected)
{
setCaption(caption);
- setSelected(selected);
setFocusable(true);
addMouseListener(this);