Boost logo

Boost :

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


Vladimir Prus wrote:
> Stefan Seefeld wrote:
>
>
>>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.
>
>
> Physical dimenstions? In millimeters? Then I don't expect this. Say the
> program shows a chart in a window. It's natural to print that chart to
> occupy full size of A4 paper (if A4 is the current paper size), or have
> page layout customizable.

I don't quite understand what you are saying. There are certainly graphical
objects without an intrinsic (physical) size that can scale to whatever
region is available.

>>>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.
>
>
> Right, but those sizes should be configurable by user and never tweaked by
> developer. The logic in the library to determine slider width, for example,
> might be complicated, but it should be inside library. Do you ever needed
> to explicitly set scrollbar width?

These sizes are typically determined by the GUI designer. They may or may
not be configurable by users. My point is that don't want 'screen resolution'
to interfer with them either. Users may scale ('zoom') the whole GUI to
adjust it to their eyes.

>>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.
>
>
> But this does not cause any problems I know about. If you know about any
> problems, please tell! Say mouse events coordinates are mostly usefull for
> testing which object mouse is over, or for positioning popup menu, or
> something like that. In those cases, using device coordinates are OK.

Device coordinates are not ok to determine object size, because that means
that objects have differing sizes on different output devices (multiple
screens, printers, etc.) and so users wrongly tweak resolution to get back
their wanted object sizes.

Regards,
                Stefan


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