diff options
author | crupest <crupest@outlook.com> | 2022-02-08 21:13:01 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-08 21:13:01 +0800 |
commit | fa1764d7cb77aa683c6049f915a46b981f9161f7 (patch) | |
tree | e5b54620d3b84f5391e995ab483647214152ca99 /src/theme_builder/components/StyleRuleEditor.h | |
parent | 74bb9cd27242b9320f99ff4d2b50c3051576cc14 (diff) | |
download | cru-fa1764d7cb77aa683c6049f915a46b981f9161f7.tar.gz cru-fa1764d7cb77aa683c6049f915a46b981f9161f7.tar.bz2 cru-fa1764d7cb77aa683c6049f915a46b981f9161f7.zip |
...
Diffstat (limited to 'src/theme_builder/components/StyleRuleEditor.h')
-rw-r--r-- | src/theme_builder/components/StyleRuleEditor.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/theme_builder/components/StyleRuleEditor.h b/src/theme_builder/components/StyleRuleEditor.h new file mode 100644 index 00000000..181ff0ef --- /dev/null +++ b/src/theme_builder/components/StyleRuleEditor.h @@ -0,0 +1,30 @@ +#pragma once +#include "cru/ui/components/Component.h" +#include "cru/ui/controls/Control.h" +#include "cru/ui/controls/FlexLayout.h" +#include "cru/ui/style/StyleRule.h" + +namespace cru::theme_builder { +class StyleRuleEditor : public ui::components::Component { + public: + StyleRuleEditor(); + + CRU_DELETE_COPY(StyleRuleEditor) + CRU_DELETE_MOVE(StyleRuleEditor) + + ~StyleRuleEditor() override; + + public: + ui::controls::Control* GetRootControl() override { return main_layout_; } + + void BindStyleRule(ui::style::StyleRule* rule); + + private: + void UpdateView(); + + private: + ui::controls::FlexLayout* main_layout_; + + ui::style::StyleRule* style_rule_; +}; +} // namespace cru::theme_builder |