Is there an accepted OO pattern or methodology for how a GUI Builder should interact with GUI components?
Supposing you have a GUI (at its most basic, consisting of containers and components) and a GUI Builder that is allowed to make changes to the GUI in real-time, one would want them to be as isolated as possible from each other, right? (I.e., the GUI is independent of and knows nothing about the GUI Builder, and the GUI Builder has as little information about the GUI and its components as possible so as to remain flexible).
But then, how does a component tell the GUI Builder what properties it supports? And how does the GUI Builder query the values of those attributes and send updates back to the components?
This is mostly just a thought experiment, so any insights are appreciated!
Every widget needs to support an interface for getting at the widget options.
For example, the tk toolkit supports this. For any widget you can call the
configure
method to get a list of all the supported attributes and values.