aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/controls')
-rw-r--r--src/ui/controls/CheckBox.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ui/controls/CheckBox.cpp b/src/ui/controls/CheckBox.cpp
new file mode 100644
index 00000000..ab8af2e8
--- /dev/null
+++ b/src/ui/controls/CheckBox.cpp
@@ -0,0 +1,21 @@
+#include "cru/ui/controls/CheckBox.h"
+#include "cru/ui/render/BorderRenderObject.h"
+
+namespace cru::ui::controls {
+CheckBox::CheckBox()
+ : container_render_object_(new render::BorderRenderObject()) {
+ container_render_object_->SetAttachedControl(this);
+}
+
+CheckBox::~CheckBox() {}
+
+void CheckBox::SetChecked(bool checked) {
+ if (checked == checked_) return;
+ checked_ = checked;
+ checked_change_event_.Raise(checked);
+}
+
+void CheckBox::ApplyBorderStyle(const style::ApplyBorderStyleInfo& style) {
+ container_render_object_->ApplyBorderStyle(style);
+}
+} // namespace cru::ui::controls