title: Inherit from two abstract classes, where one of them also needs parts of the other base class
body: <p>This is more of a theoretical question without actual code example and I'm not sure if I am just overthinking this.  </p>
  
  <p>The whole thing is part of a GUI implemenation I am working on, where the GUI is represented as a tree structure consisting of <code>Leafs</code> and <code>Nodes</code> specializations which then have some special behavior like text content, an image or whatever which gets handled in its specific <code>render()</code> implementation.<br>
  However, my problem here is, that i would like to have a <code>Hover</code> functionality on some GUIs but that <code>Hover</code> functionality needs !some! of the basic GUI element functions, shown in the diagram, and now I can't wrap my head around how i connect these two parts into the final <code>Button</code> class. It has to inherit all the <code>Leaf</code> functionality plus the abstract <code>Hover</code> stuff.  </p>
  
  <p><a href="https://i.stack.imgur.com/UujGx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UujGx.png" alt="UML Diagram"></a></p>
  
  <p>Is there a way to make this work the way I am imagining it? Or do i have to give this <code>Hover</code> functionality to all GUIs and just implement a blank <code>onMouseEnter()</code>and <code>onMouseExit()</code> for the ones that don't use it?<br>
  The reason I would like to not give it to all GUIs is because the check if the mouse is hovering over the element is not for free. And not all elements have to be interactive.</p>
  
  <p><strong>A few notes:</strong><br>
  - <code>Hover</code> might also be inherited by a Node specialization<br>
  - The list of functions in <code>Hover</code> is complete<br>
  - <code>Leaf</code> and <code>Node</code> both implement some of the abstract functions from <code>Element</code> in different ways</p>
  
  <p><strong>If you can come up with a better title for this, feel free to suggest an edit</strong></p>