blob: 412174a882f28844a741a92f731d340361ed6180 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include "../Editor.h"
#include "../LabeledMixin.h"
#include "cru/ui/controls/FlexLayout.h"
#include "cru/ui/controls/TextBox.h"
#include "cru/ui/render/MeasureRequirement.h"
namespace cru::theme_builder::components::properties {
class MeasureLengthPropertyEditor : public Editor, public LabeledMixin {
public:
using PropertyType = ui::render::MeasureLength;
MeasureLengthPropertyEditor();
~MeasureLengthPropertyEditor() override;
public:
ui::controls::Control* GetRootControl() override { return &container_; }
PropertyType GetValue() { return measure_length_; }
void SetValue(const PropertyType& value, bool trigger_change = true);
private:
PropertyType measure_length_;
ui::controls::FlexLayout container_;
ui::controls::TextBox text_;
bool is_text_valid_;
};
} // namespace cru::theme_builder::components::properties
|