aboutsummaryrefslogtreecommitdiff
path: root/src/theme_builder/components/stylers/CursorStylerEditor.h
blob: 5c44381908a61ee946f96c2cebb12256cfcad065 (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
#pragma once
#include "../properties/SelectPropertyEditor.h"
#include "StylerEditor.h"

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

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

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

  IEvent<std::nullptr_t>* ChangeEvent() override { return &change_event_; }

 private:
  properties::SelectPropertyEditor cursor_select_;

  Event<std::nullptr_t> change_event_;
};
}  // namespace cru::theme_builder::components::stylers