aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/Base.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-10 23:37:38 +0800
committercrupest <crupest@outlook.com>2022-02-10 23:37:38 +0800
commit382d42802221941e24e672743d03e7adcb544f94 (patch)
treecce2a16646c289f66270e61a0b0533764049ceaf /include/cru/ui/Base.h
parentf65d0502a9f0fc44be0dd79a5f3f31697bb3aad0 (diff)
downloadcru-382d42802221941e24e672743d03e7adcb544f94.tar.gz
cru-382d42802221941e24e672743d03e7adcb544f94.tar.bz2
cru-382d42802221941e24e672743d03e7adcb544f94.zip
...
Diffstat (limited to 'include/cru/ui/Base.h')
-rw-r--r--include/cru/ui/Base.h42
1 files changed, 1 insertions, 41 deletions
diff --git a/include/cru/ui/Base.h b/include/cru/ui/Base.h
index b16edbfc..4316fbbb 100644
--- a/include/cru/ui/Base.h
+++ b/include/cru/ui/Base.h
@@ -38,7 +38,6 @@ namespace colors = cru::platform::colors;
//-------------------- region: forward declaration --------------------
namespace controls {
-class Window;
class Control;
} // namespace controls
@@ -46,27 +45,9 @@ namespace host {
class WindowHost;
}
-namespace style {
-class StyleRuleSet;
-class StyleRuleSetBind;
-} // namespace style
-
//-------------------- region: basic types --------------------
enum class Direction { Horizontal, Vertical };
-
-namespace internal {
-constexpr int align_start = 0;
-constexpr int align_end = align_start + 1;
-constexpr int align_center = align_end + 1;
-constexpr int align_stretch = align_center + 1;
-} // namespace internal
-
-enum class Alignment {
- Start = internal::align_start,
- End = internal::align_end,
- Center = internal::align_center,
- Stretch = internal::align_stretch
-};
+enum class Alignment { Start, End, Center, Stretch };
struct CornerRadius {
constexpr CornerRadius()
@@ -107,25 +88,4 @@ inline bool operator!=(const CornerRadius& left, const CornerRadius& right) {
return !(left == right);
}
-class CanvasPaintEventArgs {
- public:
- CanvasPaintEventArgs(platform::graphics::IPainter* painter,
- const Size& paint_size)
- : painter_(painter), paint_size_(paint_size) {}
- CRU_DEFAULT_COPY(CanvasPaintEventArgs)
- CRU_DEFAULT_MOVE(CanvasPaintEventArgs)
- ~CanvasPaintEventArgs() = default;
-
- platform::graphics::IPainter* GetPainter() const { return painter_; }
- Size GetPaintSize() const { return paint_size_; }
-
- private:
- platform::graphics::IPainter* painter_;
- Size paint_size_;
-};
-
-struct StackChildLayoutData {
- std::optional<Alignment> horizontal;
- std::optional<Alignment> vertical;
-};
} // namespace cru::ui