Customizeability of widgets: Inkscape's widgets list
Hi,
to ease customizability and provide an easy way to UX designers to rework the interface, we have to expose a consistent set of our widgets to glade. This is possible to do, but not that easy, through a Glade catalog of widgets. Ideally, we would compile separately some libinkscape-widgets library and expose it in a catalog, so that people with Inkscape installed can just work with them in glade in addition to the base gtk widgets.
An example of custom widget we have is our Inkscape spin buttons : they are not real spin buttons, but have the additional capability of "when you enter a formula in it, it gets computed". You can't put them in glade, but if we add a catalog like
<?xml version="1.0" encoding="UTF-8"?>
<glade-catalog name="inkscape" depends="gtk+" version="1.1">
<glade-widget-classes>
<glade-widget-class name="InkSpinScale" generic-name="inkspinscale" title="InkSpinScale" parent="GtkSpinButton">
</glade-widget-class>
</glade-widget-classes>
<glade-widget-group name="inkscape" title="Inkscape">
<glade-widget-class-ref name="InkSpinButton"/>
</glade-widget-group>
</glade-catalog>
then we can see them in glade and use them.
there are quite a lot of such examples (roughly 80) in Inkscape, a few we can do in plain gtk3, most we can't. So the goal of this bug is to list them first (done here), then see which ones we would want to expose to glade users. For all these widgets, it would be good to do two things : know what they do (almost done) and decide what to do with them : there are few possibilities :
- what they do can be done in glade, and it's usually better to do it there.
- they are doing custom stuff specifically related to Inkscape, like keeping sync with some part of the document tree. We should decide to expose them or not for use in glade. For instance, for Fill and stroke stuff, it does not make sense to expose all the million levels of custom widgets we have.
- Not doable in glade, and general-purpose (like our SpinScale) : definitely list them and expose them.
Complete list of "our" custom widgets code :
in src/widgets/ :
- Desktop (the whole application) -> ideally, should be replaced by a glade file (currently not possible)
- "Attribute table" : grid that syncs attributes (in xml editor)
- XML Tree : the gtk tree view showing the objects in xml editor
in src/ui/widget/ :
file | usage | done | decision |
---|---|---|---|
alignment-selector.h | used only to align grids to page in the document properties | ? | |
anchor-selector.h | literaly the same appearance but for arrange dialog | ? | |
attr-widget.h | not a widget, despite the name | N/A | |
button.h | just a Gtk::togglebutton | ? | |
canvas-grid.h | A Gtk::Grid widget that contains rulers, scrollbars, buttons, and, of course, the canvas. | ? | |
clipmaskicon.h | shows the eye icon in Layers | ? | |
color-entry.h | Entry widget for typing color value in css form | ? | |
color-icc-selector.h | part of the CMS dialog in F&S | ? | |
color-notebook.h | flat color choice (GtkNotebook) in F&S dialog (RGB/HSL/HSV/CMYK/Wheel/CMS) | ? | |
color-picker.h | button to pick a color, showing that color | ? | |
color-preview.h | shows a color (used in the button of color-picker) | ? | |
color-scales.h | shows the sliders for R,G,B etc in F&S (used in color-notebook) | ? | |
color-slider.h | the color slider itself with colored background | ? | |
color-wheel-selector.h | the wheel in F&S | ? | |
combo-box-entry-tool-item.h | our comboboxentry for toolbars, specialized for font names except it's not explicit | ? | |
combo-enums.h | A combobox showing enums and only used in the filter editor stuff | ? | |
combo-tool-item.h | "a combobox that can be disaplayed in a toolbar" (sic) | ? | |
dash-selector.h | Class that wraps a combobox and spinbutton for selecting dash patterns. | ? | |
dock.h | GDL Dock | N/A | |
dock-item.h | GDL Dockable | N/A | |
entity-entry.h | ? | ? | |
entry.h | does nothing afaict | ? | |
fill-style.h | "fill" and "stroke" tabs of F&S | ? | |
filter-effect-chooser.h | Allows basic control over feBlend and feGaussianBlur effects as well as opacity. | ? | |
font-button.h | Gtk::FontButton with a label | ? | |
font-selector.h | A container of widgets for selecting font faces. (glyphs, text editor) | ? | |
font-selector-toolbar.h | This is essentially a toolbar version of the 'FontSelector' widget. Someday this may be merged with it. | ? | |
font-variants.h | A container for selecting font variants | ? | |
font-variations.h | A widget for selecting font variations (for variable fonts afaict). | ? | |
frame.h | Gtk::Frame with a label | ? | |
gradient-image.h | A simple gradient preview to display them in gui items | ? | |
gradient-selector.h | the gradient chooser in F&S (with usage counts) | ? | |
gradient-vector-selector.h | some part of the previous widget | ? | |
highlight-picker.h | honestly, no idea | ? | |
iconrenderer.h | probably nothing | ? | |
imagetoggler.h | probably nothing | ? | |
ink-color-wheel.h | the color wheel itself | ? | |
ink-flow-box.h | a very weird mix of a flowbox and a gtk xpander that makes lookups to inkscape preferences, ew | ? | |
ink-ruler.h | our glorious rulers | ? | |
ink-spinscale.h | A widget that allows entering a numerical value either by clicking/dragging on a custom Gtk::Scale or by using a Gtk::SpinButton. The custom Gtk::Scale differs from the stock Gtk::Scale in that it includes a label to save space and has a "slow dragging" mode triggered by the Alt key. | ? | |
insertordericon.h | not much | ? | |
labelled.h | packs a label with a widget, this is heavily used in other widgets, but doable in plain glade | ? | |
label-tool-item.h | same for toolbars | ? | |
layer-selector.h | the visibility/lock/choice for layer that we have in the status bar, combined | ? | |
layertypeicon.h | an icon in the layer panel | ? | |
licensor.h | license choice in doc properties | ? | |
marker-combo-box.h | Gtk::Combobox for markers | ? | |
notebook-page.h | just a vbox | ? | |
object-composite-settings.h | A widget for controlling object compositing (filter, opacity, etc.) (small wrapper around filter-effect-chooser ) | ? | |
page-sizer.h | document properties "page size" widget | ? | |
pages-skeleton.h | page sizes | N/A | |
paint-selector.h | the widget that makes up the paint selection of fill and of stroke panels in F&S | ? | |
panel.h | generic dockable thing | ? | |
point.h | two widgets for entering (x,y), afaict used nowhere | ? | |
preferences-widget.h | Specializations of some Gtk widgets for Prefs | ? | |
preview.h | Generic implementation of an object that can be shown by a preview. | ? | |
random.h | no idea | ? | |
registered-enums.h | comboboxes for enums | ? | |
registered-widget.h | many widgets, but "registered", whatever that means | ? | |
registry.h | ??? | ? | |
rendering-options.h | a dialog I don't think I ever saw in the interface (could be in glade) | ? | |
rotateable.h | EventBox for the selected style | ? | |
scalar.h | A labelled text box, with spin buttons and optional icon or suffix, for entering arbitrary number values. | ? | |
scalar-unit.h | same, but with units | ? | |
selected-style.h | the widget at the left of the status bar | ? | |
spinbutton.h | like a Gtk::Spinbutton, but you can do maths | ? | |
spin-button-tool-item.h | SpinButton for toolbars | ? | |
spin-scale.h | Wrap the InkSpinScale class and attach an attribute ( A combo widget with label, scale slider, spinbutton, and adjustment; ) | ? | |
spin-slider.h | Groups an HScale and a SpinButton together using the same Adjustment | ? | |
stroke-style.h | stroke style in F&S | ? | |
style-subject.h | unsure why this is here, has nothing to do with widgets | ? | |
style-swatch.h | ? | ? | |
swatch-selector.h | might or might not be the Fill/Stroke indicator top-right of the window | ? | |
text.h | "A labelled text box, with optional icon or suffix, for entering arbitrary number values." (again) | ? | |
tolerance-slider.h | tolerance in doc properties | ? | |
unit-menu.h | ComboBoxText for units | ? | |
unit-tracker.h | not a widget | ? |