End Google Ads 201810 - BS.net 01 --> Hi, I'm redesigning the GUI for the game Jagged Alliance 2, or at least having a go at it - I'm a bit stuck trying to figure out proper inheritance hierarchy and probably got some design concepts mixed up.

To the point - I've established that I'll need to start the hierarchy with a simple area abstract class, with the class interface allowing for positioning it on screen (and in containers, stacking - omitted in the graph), a container derivative for nesting/organizing elements, an element class (later - buttons and other widgets) and a text node (for text/options).

The problem begins when I need some of these elements to say, have a background or be interactive. I don't want build that functionality into every part (no point in tracking mouse activity over non-interactive text), nor do I want to end up with 30 classes where 10 would suffice (creating variants with mouse support/backgrounds for each). So I thought a decorator would be helpful, but now I don't know how exactly can I implement it in this case. In the decorator, do I need to delegate each interface call to the decorated object explicitly ?

the class graph[^]