blob: 10b169b1a89e7a8a6df2e99b1604fd58d15d25f8 (
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
30
31
32
|
#pragma once
#include "../Base.hpp"
#include "ApplyBorderStyleInfo.hpp"
#include "cru/common/Base.hpp"
#include "cru/common/ClonablePtr.hpp"
#include <memory>
namespace cru::ui::style {
class Styler : public Object {
public:
virtual void Apply(controls::Control* control) const = 0;
virtual Styler* Clone() const = 0;
};
class BorderStyler : public Styler {
public:
static ClonablePtr<BorderStyler> Create(ApplyBorderStyleInfo style) {
return ClonablePtr<BorderStyler>(new BorderStyler(std::move(style)));
}
explicit BorderStyler(ApplyBorderStyleInfo style);
void Apply(controls::Control* control) const override;
BorderStyler* Clone() const override { return new BorderStyler(style_); }
private:
ApplyBorderStyleInfo style_;
};
} // namespace cru::ui::style
|