aboutsummaryrefslogtreecommitdiff
path: root/src/ThemeBuilder/components/stylers/MarginStylerEditor.h
blob: 9de6f1a22ef46ffda255d56b31da76e5a4f8cf3b (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
#pragma once
#include "../properties/ThicknessPropertyEditor.h"
#include "StylerEditor.h"
#include "cru/common/ClonablePtr.h"
#include "cru/ui/style/Styler.h"

namespace cru::theme_builder::components::stylers {
class MarginStylerEditor : public StylerEditor {
 public:
  MarginStylerEditor();
  ~MarginStylerEditor() override;

  ClonablePtr<ui::style::MarginStyler> GetValue();
  void SetValue(ui::style::MarginStyler* styler, bool trigger_change = true);
  void SetValue(const ClonablePtr<ui::style::MarginStyler>& styler,
                bool trigger_change = true) {
    SetValue(styler.get(), trigger_change);
  }

  ClonablePtr<ui::style::Styler> GetStyler() override { return GetValue(); }

 private:
  properties::ThicknessPropertyEditor thickness_editor_;
};
}  // namespace cru::theme_builder::components::stylers