Inkscape Wiki

draw freely
Download Now!
Open Source Scalable Vector Graphics Editor
 


Revision as of 18:46, 8 November 2006 by BryceHarrington (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

Starting a bit of scratch-pad for the new way of getting away from subclassing Dialog

Here's a rough plan

upload:Panels.png


Basically, instead of subclassing Dialog, we'd subclass panel instead. We'd have a class that keeps track of the control panels, and is in charge of viewing them. When you'd want the FillAndStroke control panel, for example, the manager would check to see if an instance is around. If not, it would create the panel and then plop it in the proper container. By default that could be the dumb Dialog class that only holds things, however it could easily put it in a different part of the UI. Swatches, for example, could go in a panel in the bottom of the window instead of popping up in a dialog, etc.


Panel implements the 'Dockable' interface. Anything that might hold one would implement the 'DockFillable' interface.

And... instead of a dialog holding a single item, a notebook could hold several panels in different tabs.