Standard editable canvas items.




Hi,

I was just looking at Achtung, which is very neat by the way, and thinking
about plots that let you superimpose lines, etc.

This functionality is getting duplicated everywhere. Gnumeric has little
line objects, Achtung does, I'm about to add it to Guppi, undoubtedly a
future word processor will use it. Aside from duplication of effort, this
bites because each app is going to have a slightly different interface on
the little shapes, different handles and click combinations. Say I have a
Gnumeric spreadsheet in my Achtung slide; and I try to edit the line on
the spreadsheet after editing the Achtung line. And the two lines work
differently, even though they're in the same window and a centimeter
apart. Ugh. 

So at the very least we should draw up a little list of single and double
click on each of the three mouse buttons, and what should happen. Also
what handles each shape should have. Some of the click events can be
"app-defined" though.

Better, we could write GnomeCanvasEditLine, GnomeCanvasEditRect, etc. 
These are nice and simple; they have handles, and you can move them
around and resize. Maybe they include the Z-order stuff, problem being
that an individual app might want to constrain that somehow (e.g., can't
go below the background). 

As side effects, we might write GnomeCanvasHandle too, and give the canvas
items the ability to load and save themselves into strings. I guess the
load/save thing might require gnome-xml so wouldn't go in gnome-libs.

I just read the Achtung and Gnumeric source code for items, and both have
the app-specific logic and the little click-and-drag stuff pretty
separate. They also do the editable objects in almost the same way.

Comments? Would this work into Gnumeric/Achtung? Too much bloat for
libgnomeui or generally useful? I volunteer to write library stuff but not
to port existing apps. :-)

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]