I've been doing some cleanup (and revisioning) wrt model-view =
interaction (between DiaCanvasItem and DIaCanvasViewItem).
Currently, the state of the view-item (selected, focused, grabbed) is =
represented by a few flags (DIA_SELECT, DIA_FOCUS and DIA_GRAB). A few =
macros were there to check for the state. The state was only guaranteed =
during event handling (the event() callback). This is workable, but not =
In an attempt to clean things up a bit I added a new signal to =
DiaCanvasItemClass: has_state. When the state was changed it was already =
communicated to the view items by a signal and now if you want the state =
of the view item, you can also ask it via a signal. The implementation =
has really brightened up and I got rid of the vague status of the DIA_* =
flags. Now you can always query the state of the active view item.
Furthermore I was not happy with the DIA_SHAPE_VISIBLE_IF_* flags. Those =
are from the time we didn't have the shape iterator functions =
(get_shape_iter(), shape_next() and shape_value()). It is easier to let =
the iterator decide which shapes should be drawn than by setting some =
flags on a shape. The new state query mechanism makes it even easier to =
query the right state.
I'll check in my changes in CVS soon, so you can have a look... I'm sure =
that this will make diacanvas2 easier to use.
Get latest updates about Open Source Projects, Conferences and News.