2007/4/16, Sean Luke <[EMAIL PROTECTED]>:
On Apr 16, 2007, at 8:26 AM, Eero Tamminen wrote:

> This is just that string.  Before you know what space the string
> can or should take you need to check the sizes for all the widgets
> contents, take into account the expand etc. attributes in the co.
> widget hierarchy etc.

I'm missing the problem here.  Isn't this being done in the typical
top-down fashion?

1. Set in stone the widget dimensions
2. Compute and cut string lengths line by line
3. If the total height will be more than the widget, include a scroll
bar if appropriate
3.5 If including a scroll bar, recompute and cut string lengths line
by line
4. Paint

This is at most an O(n) operation, at least it is on previous GUIs
I've used.  Is there a misfeature in GNOME which is messing things up
here?  Is GNOME allowing string painting calculations to change the
widget size?

You might want to read

 http://developer.gnome.org/doc/API/2.0/gtk/GtkContainer.html#id3616277

before continuing this discussion, since obviously GTK+ is using
somewhat different principles in widget sizes than whatever you are
used to.

> The device has a small screen, long strings might not fit into it.
> What Mac OSX does e.g. when showing filenames or URLs that are, say
> 500
> characters long?

It truncates them.

Here's a picture of various MacOS X text modes.  Note that in all
cases, there are no ellipses.

http://cs.gmu.edu/~sean/temp/wordwrap.png

There's similar text widget in GTK+ too:

http://www.ibm.com/developerworks/cn/linux/guitoolkit/gnome/gnome2/part1/textview.gif

That hardly relates to labels (or other kinds of visible data) though.

--
Kalle Vahlman, [EMAIL PROTECTED]
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
_______________________________________________
maemo-developers mailing list
[email protected]
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to