diff options
| author | crupest <crupest@outlook.com> | 2022-02-14 22:46:54 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-02-14 22:46:54 +0800 |
| commit | 6593a25baa01687b9462f792ce91bd46909df229 (patch) | |
| tree | e9ee5ae8d67ef68fdfccca7e07c7d4b26f20c1d7 /src/theme_builder/components/properties/PointPropertyEditor.h | |
| parent | 091c0419a254a28f80963193b36bf0a7f30d6590 (diff) | |
| download | cru-6593a25baa01687b9462f792ce91bd46909df229.tar.gz cru-6593a25baa01687b9462f792ce91bd46909df229.tar.bz2 cru-6593a25baa01687b9462f792ce91bd46909df229.zip | |
...
Diffstat (limited to 'src/theme_builder/components/properties/PointPropertyEditor.h')
| -rw-r--r-- | src/theme_builder/components/properties/PointPropertyEditor.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/theme_builder/components/properties/PointPropertyEditor.h b/src/theme_builder/components/properties/PointPropertyEditor.h index d1c84c33..e3f52925 100644 --- a/src/theme_builder/components/properties/PointPropertyEditor.h +++ b/src/theme_builder/components/properties/PointPropertyEditor.h @@ -7,6 +7,8 @@ namespace cru::theme_builder::components::properties { class PointPropertyEditor : public ui::components::Component { public: + using PropertyType = ui::Point; + PointPropertyEditor(); ~PointPropertyEditor() override; @@ -16,10 +18,10 @@ class PointPropertyEditor : public ui::components::Component { String GetLabel() const { return label_.GetText(); } void SetLabel(String label) { label_.SetText(std::move(label)); } - ui::Point GetPoint() const { return point_; } - void SetPoint(const ui::Point& point); + ui::Point GetValue() const { return point_; } + void SetValue(const ui::Point& point, bool trigger_change = true); - IEvent<ui::Point>* PointChangeEvent() { return &point_change_event_; } + IEvent<std::nullptr_t>* ChangeEvent() { return &change_event_; } private: static String ConvertPointToString(const ui::Point& point); @@ -32,6 +34,6 @@ class PointPropertyEditor : public ui::components::Component { ui::controls::TextBox text_; bool is_text_valid_; - Event<ui::Point> point_change_event_; + Event<std::nullptr_t> change_event_; }; } // namespace cru::theme_builder::components::properties |
