blob: 756bd2aff116039edb5e02dd44186723e7d4ddfa (
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
|
#include "CheckedConditionEditor.h"
#include "cru/common/ClonablePtr.h"
#include "cru/ui/style/Condition.h"
namespace cru::theme_builder::components::conditions {
CheckedConditionEditor::CheckedConditionEditor() {
GetContainer()->AddChild(checked_check_box_.GetRootControl());
checked_check_box_.ChangeEvent()->AddSpyOnlyHandler(
[this] { change_event_.Raise(nullptr); });
}
CheckedConditionEditor::~CheckedConditionEditor() {}
ClonablePtr<ui::style::CheckedCondition> CheckedConditionEditor::GetValue()
const {
return ui::style::CheckedCondition::Create(checked_check_box_.GetValue());
}
void CheckedConditionEditor::SetValue(ui::style::CheckedCondition* value,
bool trigger_change) {
checked_check_box_.SetValue(value->IsChecked(), trigger_change);
}
} // namespace cru::theme_builder::components::conditions
|