diff options
author | crupest <crupest@outlook.com> | 2022-02-14 00:28:51 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-14 00:28:51 +0800 |
commit | 091c0419a254a28f80963193b36bf0a7f30d6590 (patch) | |
tree | d47e7726569023c5f8492d81042ad7ade09cb9dc /include/cru/ui | |
parent | 308cdd54083dde627be738820f798ad25e73c300 (diff) | |
download | cru-091c0419a254a28f80963193b36bf0a7f30d6590.tar.gz cru-091c0419a254a28f80963193b36bf0a7f30d6590.tar.bz2 cru-091c0419a254a28f80963193b36bf0a7f30d6590.zip |
...
Diffstat (limited to 'include/cru/ui')
-rw-r--r-- | include/cru/ui/controls/CheckBox.h | 6 | ||||
-rw-r--r-- | include/cru/ui/style/Styler.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/cru/ui/controls/CheckBox.h b/include/cru/ui/controls/CheckBox.h index 1c81b284..19908389 100644 --- a/include/cru/ui/controls/CheckBox.h +++ b/include/cru/ui/controls/CheckBox.h @@ -12,9 +12,13 @@ class CRU_UI_API CheckBox : public NoChildControl, public virtual ICheckableControl, public virtual IClickableControl { public: + static constexpr StringView kControlType = u"CheckBox"; + CheckBox(); ~CheckBox() override; + String GetControlType() const override { return kControlType.ToString(); } + render::RenderObject* GetRenderObject() const override { return container_render_object_.get(); } @@ -27,7 +31,7 @@ class CRU_UI_API CheckBox : public NoChildControl, void ApplyBorderStyle(const style::ApplyBorderStyleInfo& style) override; - helper::ClickState GetClickState() const { + helper::ClickState GetClickState() override { return click_detector_.GetState(); } diff --git a/include/cru/ui/style/Styler.h b/include/cru/ui/style/Styler.h index 4d812643..d6cbc760 100644 --- a/include/cru/ui/style/Styler.h +++ b/include/cru/ui/style/Styler.h @@ -60,6 +60,8 @@ class CRU_UI_API BorderStyler : public Styler { void Apply(controls::Control* control) const override; + ApplyBorderStyleInfo GetBorderStyle() const { return style_; } + BorderStyler* Clone() const override { return new BorderStyler(style_); } private: |