Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2005-10-05 08:09:17


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.
At least, if the application's GUI is to scale, it is the *user* who
should do that explicitely, not the developer.

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).

Regards,
                Stefan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk