Libpanels should have a way of handling "Profiles"
I'd like to add a "profile" mode to my app, crossword-editor
, which uses libpanel.
Some background: When editing a crossword there are four distinct phases to the process: creating the grid, writing the clues, setting the style, and adding any puzzle metainfo. Three of the phases will use paneds to house PanelWidgets to supplement the mode. The panel widgets are only useful for one mode.
I threw together a very rough demo as a proof of concept:
My naive implementation of this uses a GtkStack in the PanelDock with a GtkStackSwitcher. When the stack changes modes, I change the visibility of the PanelWidgets to match the state.
[ Note: I plan to have a bottom paned for both the grid and clues phases to provide information. I also have another dozen PanelWidgets planned, including all the style widgets. ]
This has a number of drawbacks, most notably that hiding/showing the widgets changes the size of the side-panels, which means the dock bounces around quite a lot.
I'd love to be able to use PanelFrameHeaderBar for mode switching. I'd also love to be able to have a hhomogenous-style property on paneds, so they don't resize so much when the phase changes.