Hi!
Second week of GSOC has passed. This time refactoring effort was continued.
Most of the changes were connected to color selecting widgets in fill and
stroke dialog. After discussion with Jon and Krzysztof, a new class design
was implemented. GObject based classes are now derived from gtkmm widgets.
Class Inkscape::UI::SelectedColor represents state and actions triggered by
color selecting widgets. It stores actual color, alpha value and some flags
to differentiate between dragging and changing colors. It defines following
signals:
* signal_grabbed
* signal_dragged
* signal_released
* signal_changed
It behaves somewhat similarly to Gtk::Adjustment. It can be shared between
multiple widgets. It is converted from ColorSelector class.
The users of color selecting widgets store a reference to SelectedColor and
interact with it. This reference is passed to color selecting widget constructor.
The reference to constructed widget is only needed during initial set-up and
doesn't have to be tracked.
Widgets, whose state is held in SelectedColor are:
* ColorEntry (separated from SPColorNotebook)
* ColorICCSelector (formerly SPColorICCSelector)
* ColorNotebook (formerly SPColorNotebook)
* ColorScales (formerly SPColorScales)
* ColorWheelSelector (formerly SPColorWheelSelector)
The widgets were moved from src/widgets directory to src/ui/widget. They are all
in Inkscape::UI::Widget namespace.
I found a dead code in ColorNotebook. It implemented a pop-up menu for available
card selection (RGB, HSV, CMYK...). I commented it out, leaving explanation in
src/ui/widget/color-notebook.h. Hovewer, new design of ColorNotebook supports
furure re-addition of this feature. Instead of using g_type_children and advanced
introspection to populate the cards, a solution using abstract factory is used.
The factory is defined in file src/ui/selected-color.h. Concrete factories are
together with classes, whose objects they produce. Currently, the content of the
tabs is set up in ColorNotebook constructor.
Known issue is application crash after multiple switches between fill types in
stroke and fill dialog. I've collected core dump and will fix it up.
Please review the code. It is contained in branch lp:~penginsbacon/inkscape/svg-paints-support.
I would like to merge my code with experimental branch. Do you know if it's
legal to merge to/from my development branch during GSOC?
The work on new pattern selector has started. I worked out the design and began
the implementation. For some days, the widget will be developed separately
in lp:~penginsbacon/+junk/tile-view.
Regards,
Tomasz