From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2005-10-04 10:41:59
Vladimir Prus wrote:
> Let me try from a different angle. There's some settings made by user, like
> font size, or toolbar icon size. The unit does not matter there.
I'm not sure I understand what you mean by 'unit' here. Imagine you want to
print a portion of the screen. Do you expect dimensions to be preserved on
paper or not ? I do.
> I believe that in a good GUI library, you should not ever need to use any
> dimensions for windows dimensions, but just allow the layout code in the
> library to take care of this. And since you don't have to specify
> dimensions, it does not matter if they are in pixels or not.
What you describe is true for 'non-terminals' in the tree only. All leaf
nodes (glyphs, icons, but also some part of the widgets themselves, such as
bevels, slider and scrollbar handles, etc., etc.) do need their own size.
> So, it looks like the only place where coordinate unit choice makes a
> difference makes difference is explicit 2D graphics (drawing lines, circles
> and the like).
Ok, if you read 'only' appropriately. :-)
> Do we agree so far? I'm just trying to narrow down the scope of discussion.
> It just don't not make sense, IMO, to have a choice of coordinate unit for
> mouse press event.
I think we are in violent agreement. Mouse events are reported in the coordinate
system of the target region (window, widget, surface, whatever you name it).
All I'm saying is that this coordinate system should reflect physical size, i.e.
be independent from device-space coordinates.
Unfortunately, traditionally GUIs are tied to a particular device and thus it
is custom to express coordinates in the device's own coordinate system.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk