Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-10-05 08:21:19

Stefan Seefeld wrote:

> Vladimir Prus wrote:
>> I'm trying to say that the choice of coordinate unit -- pixel,
>> millimeter, inch, whatever, is only important if you need to write:
>> window.setWidth(10cm);
>> and in a proper GUI library you should never set width to absolute value
>> like that. Instead, you should do:
>> window.setWidth(screen_width()*some_constant);
>> In that case "screen_width()" can return SomeVeryOpaqueType that you can
>> multiply by float, but can't convert to pixel, or to to inch, or to
>> anything else.
> I don't quite agree. From an ergonomic point of view it doesn't make
> sense to preserve the screen content no matter how large the screen is.

Well, at least there are application that have no use for extra size (say,
instant messaging), and some which can use all the space you give them
(say, IDE). It would be good if size of top-level windows were laid out
using an algorithm similar to the one that lays out children. Then you
won't have to set even relative width/height of top-level windows.

> At least, if the application's GUI is to scale, it is the *user* who
> should do that explicitely, not the developer.

In most cases, yes.

> I agree though that absolute sizes are mostly used in leaf nodes in the
> 'scene graph', and all composites adjust to their children (using various
> layout algorithms to gain flexibility).

There's bidirectional adjustment, generally. But that's a detail.

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at