blob: c8bf3f32d1e6ac6e43975eceba37a2279d8d0ecb (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#pragma once
#include "SingleChildControl.h"
#include "../render/BorderRenderObject.h"
#include "IBorderControl.h"
namespace cru::ui::controls {
class CRU_UI_API Container
: public SingleChildControl<render::BorderRenderObject>,
public virtual IBorderControl {
static constexpr StringView kControlType = u"Container";
public:
Container();
CRU_DELETE_COPY(Container)
CRU_DELETE_MOVE(Container)
~Container() override;
public:
bool IsBorderEnabled() const {
return GetContainerRenderObject()->IsBorderEnabled();
}
void SetBorderEnabled(bool enabled) {
GetContainerRenderObject()->SetBorderEnabled(enabled);
}
std::shared_ptr<platform::graphics::IBrush> GetForegroundBrush() const {
return GetContainerRenderObject()->GetForegroundBrush();
}
void SetForegroundBrush(
const std::shared_ptr<platform::graphics::IBrush>& brush) {
GetContainerRenderObject()->SetForegroundBrush(brush);
}
std::shared_ptr<platform::graphics::IBrush> GetBackgroundBrush() const {
return GetContainerRenderObject()->GetBackgroundBrush();
}
void SetBackgroundBrush(
const std::shared_ptr<platform::graphics::IBrush>& brush) {
GetContainerRenderObject()->SetBackgroundBrush(brush);
}
void ApplyBorderStyle(const style::ApplyBorderStyleInfo& style) override {
GetContainerRenderObject()->ApplyBorderStyle(style);
}
public:
String GetControlType() const final { return kControlType.ToString(); }
};
} // namespace cru::ui::controls
|