Re: Ideas for new API



On Mon, 2010-06-21 at 11:32 +0100, Damon Chaplin wrote:

> Possible big API changes:
> 
> o Get rid of the model/view option.
>    The model/view stuff made the code overly complicated. It would
>    still be possible to use the canvas as a view if needed. (Though
>    you will need to write your own canvas items and models.)
> 
> o Get rid of the interfaces, and use regular classes instead.
>    Using interfaces is a bit fiddly, and not that useful. They are
>    a bit slower as well.
> 
> o Get rid of cascading style properties.
>    The code for these is a bit complicated, and they're not that
>    useful. We'd replace them with simple GooCanvasStyle objects.
> 
> o Allow all items to have children.
>    This is a handy feature that I would have liked a few times.


> Possible smaller API changes:
> 
> o Add a tolerance setting for line widths, so clicking on narrow
>   lines can be made easier.
> 
> o Add an "unscaled-line-width" where the line width doesn't grow
>   as the canvas is scaled. (Though it should probably shrink if
>   the canvas is shrunk.)


These are all practically done. The code is in the new-api branch in git
if people want to try it out.


I'm currently thinking of doing a few more minor things:

 o Change goo_canvas_item_set_parent() so it acts like setting the
   "parent" property. Currently it is a bit confusing as it only
   stores the parent pointer. (Though we still need the virtual
   GooCanvasItem method to store the parent pointer.)

 o Convert font sizes to correct absolute sizes automatically.

 o Make sure we always do a g_object_notify() on the "scale" property
   when the canvas scale changes.

Damon




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