blob: 4a5fae4e1c92b48f4d095ec62455e0ed8fbd983c (
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 "../properties/CheckBoxPropertyEditor.h"
#include "ConditionEditor.h"
#include "cru/common/ClonablePtr.h"
#include "cru/ui/style/Condition.h"
namespace cru::theme_builder::components::conditions {
class CheckedConditionEditor : public ConditionEditor {
public:
CheckedConditionEditor();
~CheckedConditionEditor() override;
public:
ClonablePtr<ui::style::CheckedCondition> GetValue() const;
void SetValue(const ClonablePtr<ui::style::CheckedCondition>& value,
bool trigger_change = true);
ClonablePtr<ui::style::Condition> GetCondition() override {
return GetValue();
}
IEvent<std::nullptr_t>* ChangeEvent() { return &change_event_; }
private:
properties::CheckBoxPropertyEditor checked_check_box_;
Event<std::nullptr_t> change_event_;
};
} // namespace cru::theme_builder::components::conditions
|