I was thinking about this issue for a while and my idea is to make "_margin" a private member of IDrawable (similar to "_background_color"). But this will cause some problems.
A lot of methods, such as OnClicked(...) and GetMinimal...(...), have to be able to determine widget's margin, so I suggest, to use similar trick to the one, Rafał did with Draw(...) - make those functions non-virtual public methods of IDrawable and specify something like OnClickedNoMargin(...) and GetMinimal...NoMargin(...) (analogous to Redraw(...)), which will ignore widget's margin completely.
However, I'm not sure if this is the right way to do it. Otherwise, I can just specify public "getter" method GetMargin(), which, obviously, would be called by OnClicked(...) and GetMinimal...(...), but approach is completely different to the "_background_color"-one.
I was thinking about this issue for a while and my idea is to make "_margin" a private member of IDrawable (similar to "_background_ color") . But this will cause some problems.
A lot of methods, such as OnClicked(...) and GetMinimal...(...), have to be able to determine widget's margin, so I suggest, to use similar trick to the one, Rafał did with Draw(...) - make those functions non-virtual public methods of IDrawable and specify something like OnClickedNoMarg in(...) and GetMinimal. ..NoMargin( ...) (analogous to Redraw(...)), which will ignore widget's margin completely.
However, I'm not sure if this is the right way to do it. Otherwise, I can just specify public "getter" method GetMargin(), which, obviously, would be called by OnClicked(...) and GetMinimal...(...), but approach is completely different to the "_background_ color"- one.
What do you think about it?