aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/Control.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/controls/Control.h')
-rw-r--r--include/cru/ui/controls/Control.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/cru/ui/controls/Control.h b/include/cru/ui/controls/Control.h
index c52a53af..3b58222c 100644
--- a/include/cru/ui/controls/Control.h
+++ b/include/cru/ui/controls/Control.h
@@ -52,13 +52,25 @@ class CRU_UI_API Control : public Object {
public:
virtual render::RenderObject* GetRenderObject() const = 0;
- render::MeasureSize GetPreferredSize() {
+ virtual render::MeasureSize GetPreferredSize() const {
return GetRenderObject()->GetPreferredSize();
}
- void SetPreferredSize(const render::MeasureSize& size) {
+ virtual void SetPreferredSize(const render::MeasureSize& size) {
GetRenderObject()->SetPreferredSize(size);
}
+ virtual Thickness GetMargin() const { return GetRenderObject()->GetMargin(); }
+ virtual void SetMargin(const Thickness& margin) {
+ GetRenderObject()->SetMargin(margin);
+ }
+
+ virtual Thickness GetPadding() const {
+ return GetRenderObject()->GetPadding();
+ }
+ virtual void SetPadding(const Thickness& padding) {
+ GetRenderObject()->SetPadding(padding);
+ }
+
//*************** region: focus ***************
public:
bool HasFocus();