summaryrefslogtreecommitdiff
path: root/src/gui/checkbox.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-16 21:53:10 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-16 21:53:10 +0000
commitf80bf2dfb4de682a56abe79b7b0e5e0459804b30 (patch)
treecc45a8a6dfa7abe41b9f13fabffbb6287513cf46 /src/gui/checkbox.h
parent6a25f872d6102058c8186398627abc5d84f2363a (diff)
downloadmana-client-f80bf2dfb4de682a56abe79b7b0e5e0459804b30.tar.gz
mana-client-f80bf2dfb4de682a56abe79b7b0e5e0459804b30.tar.bz2
mana-client-f80bf2dfb4de682a56abe79b7b0e5e0459804b30.tar.xz
mana-client-f80bf2dfb4de682a56abe79b7b0e5e0459804b30.zip
Made button, checkbox and radiobutton count their instances and only load their
resources once. Other widgets will follow later.
Diffstat (limited to 'src/gui/checkbox.h')
-rw-r--r--src/gui/checkbox.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gui/checkbox.h b/src/gui/checkbox.h
index 80612b71..947e6432 100644
--- a/src/gui/checkbox.h
+++ b/src/gui/checkbox.h
@@ -41,15 +41,21 @@ class CheckBox : public gcn::CheckBox {
CheckBox(const std::string& caption, bool marked = false);
/**
+ * Destructor.
+ */
+ ~CheckBox();
+
+ /**
* Draws the check box, not the caption.
*/
void drawBox(gcn::Graphics* graphics);
-
+
private:
- Image *checkBoxNormal;
- Image *checkBoxChecked;
- Image *checkBoxDisabled;
- Image *checkBoxDisabledChecked;
+ static int instances;
+ static Image *checkBoxNormal;
+ static Image *checkBoxChecked;
+ static Image *checkBoxDisabled;
+ static Image *checkBoxDisabledChecked;
};
#endif