I was just thinking this: at the moment the LookAndFeel class is divided in sections that contain the callbacsk pertaining the drawing/painting of all the different widgets. Wouldn’t it be more convenient to have those sections divided in a collection of simpler classes instead, each pertaining the painting of a single widget?
Instead of a monolithic LookAndFeel class, we’d have classes like PopupMenuLookAndFeel, SliderLookAndFeel, ButtonLookAndFeel and so on. This would pretty much resemble the (clever) way Listeners are implemented now. In fact, it would even be possible for each widget class to contain its LookAndFeel, e.g. Slider::LookAndFeel, TextEditor::LookAndFeel and so on.
Each Component’s setLookAndFeel() method would take as an argument a pointer to the LookAndFeel specific for that component, and it still would be possible to have a single class that consistently describes the look and feel of a whole application: subclassing the look and feels for all the widgets used in the UI will do the trick, similarly to how one can have a single object handle events from multiple widgets by subclassing their listeners.
Just my 2 cents. What do you think about this?