Toolbar Rewrite
Jump to navigation
Jump to search
A page to explore rewriting the Toolbox widget
Current Situation
Toolbars:
- Tools: Now a Flowbox
- Snapping: Now a Popover
- Main: (File ops, Undo/Redo, Copy/Paste, etc.) Two possible positions/orientations.
- Auxiliary : Changes depending on which tool is active.
- Changing toolbar orientation (currently only Main toolbar).
Classes:
- ToolboxFactory: Only static member functions and constants. Handles:
- Creating toolboxes
- Icon sizes
- Setting which Auxiliary toolbar to show.
- Desktop interface
- UXManager, UXManagerImpl
- Controls if Main toolbar is on top or on right side.
- SPDesktopWidget
- Tightly coupled and might need to be rewritten at the same time.
- This widget should eventually be removed. Some functionality should go into InkscapeWindow and some into CanvasGrid.
Widget Structure
Tools
GtkEventBox "ToolboxCommon"
GtkBox "ToolToolbox
GtkFlowbox "tool-toolbox"
GtkFlowboxChild
GtkToggleButton
GktFlowboxChild
...
Snap
GtkEventBox "ToolboxCommon"
GtkBox "SnapToolbox
GtkToolbar "snap-toolbox"
GtkToggleToolButton
GktToolButton
GtkToolItem "tool-item-advanced"
GtkMenuButton "btn-advanced"
GtkToolItem "tool-item-simple"
GtkMenuButton "btn-simple"
Main
GtkEventBox "ToolboxCommon"
GtkToolbar "CommandsToolbar"
GtkToolButton "FileNew"
GtkButton
GtkToolButton "FileOpen"
...
Auxillary
GtkEventBox "ToolboxCommon"
GtkBox "AuxToolBox"
GtkGrid "SelectToolbar"
GtkToolbar "SubToolbar"
GtkToolButton
GtkButton
...
GtkGrid "NodeToolbar"
...