11#include "sml/graphics_wrapper/renderer.h"
12#include "../../paint/insets.h"
22 virtual ~Skin() =
default;
32 virtual void prerenderControl();
34 virtual Component* getHitComponent(int32_t x, int32_t y);
35 virtual const Control* getControl()
const = 0;
36 virtual Control* getModifiableControl() = 0;
38 virtual int32_t computePrefHeight(int32_t width = -1)
const;
39 virtual int32_t computePrefWidth(int32_t height = -1)
const;
41 virtual int32_t computeMinHeight(int32_t width = -1)
const;
42 virtual int32_t computeMinWidth(int32_t height = -1)
const;
44 virtual int32_t computeMaxHeight(int32_t width = -1)
const;
45 virtual int32_t computeMaxWidth(int32_t height = -1)
const;
47 virtual void layoutChildren();
54 virtual void attach(C* control) = 0;
61 void setSkin(
Skin* skin);
64 Skin* m_Skin =
nullptr;
virtual void dispose()=0
Should be called by Control when this skin is replaced.