Re: Automatic paragraph direction and BiDirection layouts in Gtk+



> 
> > * About "widget direction": gtk+ currently is employing a two layer
> scheme,
> > called direction, and default direction. Both of these may take on the
> values
> > LTR and RTL. The default direction is propagated, wheras the direction
> is not.
> > This is not as good as what you proposed, but it may be good enough.
> 
> That's indeed good news that it has both of them.  But are you
> sure that default direction is *propagated*?  Or simply falls
> back to the locale direction?  I'm guessing this partly based on
> the code I read, and partly on that you typically attach widgets
> to their parents in a bottom-up manner, and I really wonder it
> goes and propagates the default direction in a tree traversal
> way.  BTW, when we know the exact semantics, we can extend it in
> a clean way.
> 

Behdad, it is not propagated "down the tree". As Dov said, its just
two-level:
You have a global, default direction (set with
gtk_widget_set_default_direction()) and
can override it for individual widgets (using gtk_widget_set_direction()). 

Also, you're right that we're missing a few values in the various enums
which would be nice to
have:

- for text directions, "same" and "opposite" would be nice, but not really
necessary, since we
  don't propagate down the tree anyway.

- for justification, we're missing "start" and "end", which is why we had to
interpret "left" and "right"
  in this way. Adding "start" and "end" without breaking compatibility would
be a bit tricky, I guess.

Matthias

-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz




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