Re: GnomeCanvas



Hi,

> > 1.) What about a highlight function, that will highlight the item in
> > the near of the cursor. I figured out that you call the (point)
> > function to determine the nearest item whithe every mouse move.	Iīm
> > not sure if this can be done via the drawable of the (draw) function,
> > or a new (highlight) function, which will copy most of the (draw)
> > algorithm. 
> > And naturally a flag, whether this item should be highlighted or not.
> 
> Well, the first question is: what does "highlighting an item" mean to
> you?  The fact is that different programmers might have different
> needs for a highlighting routine.  
This came into my mind while playing with your gnumeric app. It was very
hard to grab a line or circle I created on top of the grid. I thought, 
that it would be usfull if the item changes color if the next action
is performed by this item. Since the Canvas computes the nearest item
on every mouse_motion_event it would be easy to give the user some
feedback about the nearest item.

> > 5.) Is somebody working on the spline interpolation in the
> > gnome-canvas-line item? I would like to do this. I thought about
> > computing the interpolated pixels within the realize phase and to hold 
> > a second list of GnomeCanvasPoints within the GnomeCanvasLine
> > structure.
> 
> I would appreciate if you told me what spline interpolation in
> gnome-canvas-line item means, as I am pretty much clueless regarding
> graphics.
just a smooth curve through the line points, where the first
derivation is steady within the points. It is used in
the gtkcurve widget (spline_solve, spline_eval)

> > 6.) Is it possible to build up a generic widget from the item arguments, 
> > so that one can change the arguments from a properties entry in the
> > right click menu. The generic widget could be replaced by the item
> > programmer with a specialized widget.
> 
> I am not sure if I understand this question.  Can you be more
> explicit?
Sorry, its is hard for me to produce nearly readable sentences in
english, but to express my ideas right is even harder :-)

So, again the example of the drawing application. I filled the canvas
with a few circles, lines, rectangles. And I want to edit one of the
items properties. I right click the item, choose properties from the
menu and, ... What now? If the GnomeCanvasItem Programmer hasnīt
provided a property dialog I have no chance to edit the item. In this
case a generic widget can show up. that lets me change the registered
arguments.

> > 7.) Last but not least a question about inheritance: What if I would
> > like to produce a small drawing application with lines, circles,
> > rectangles, polygons and variable fill style, line width, color? 
> 
> If you are thinking seriously about writing a drawing application, let
> us know (federico@nuclecu.unam.mx, raph@acm.org, and myself) as we are
Sorry, not really. This was just an example. 
I am thinking of a "Gnome Scientific Application (gnuscience)" where
data objects are passed around to perform various manipulation and 
finally end up in a viewer for visualization.

> > I do not understand the whole GtkObject way of arguments and neither
> > have a deep inside knowledge about all that Object Oriented stuff in
> > Gtk+ and Gnome. But wouldnīt it be better to use argument names like:
> > 
> > GnomeCanvasItem::Fill::color instead of GnomeCanvasLine::fill_color
> > 					  GnomeCanvasRE::fill_color
> 
> The only issue here is that not every item needs/wants a fill-color,
> so I do not think the Fill color belongs to GnomeCanvasItem.  
You got me wrong. I didnīt want the GnomeCanvasItem to provide a set
of filling arguments to all items. I wanted the GnomeCanvasLine to set
one of its argument to GnomeCanvasItem::Fill::color, or better to
adopt all  GnomeCanvas::Fill arguments, and to have one widget, which
is capable of changing the fill arguments, regardeless of the item
that recive the final set_arg call. 

This is like protocolls in Objective C. There is a set of arguments
that implements filling. And there is also a widget, where the user
can change between the different filling methods. The GomeCanvasItem
Designer can adopt this set of arguments and can use the widget to
present ^the user a uniform way of changing the fill styles. What he
must do, is to implement the arguments within his GnomeCanvasItem. 

Or what is your idea of having a uniform way of changing items
properties like fill- or line-style.

Dirk



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