Composition vs Inheritance and GUI toolkits
Posted
by Anin Teger
on Stack Overflow
See other posts from Stack Overflow
or by Anin Teger
Published on 2010-06-15T04:26:01Z
Indexed on
2010/06/15
4:32 UTC
Read the original article
Hit count: 341
gui
|inheritance
It's said that composition is preferred over inheritance. Every single open source GUI toolkit however uses inheritance for the drawn widgets (windows, labels, frames, buttons, etc). I checked Qt, wxWidgets, and GTK+. Is there an example of a GUI toolkit (written in any language) that uses composition instead of inheritance to separate the various widgets?
© Stack Overflow or respective owner