T.R | Title | User | Personal Name | Date | Lines |
---|
585.1 | | LDP::WEAVER | Laboratory Data Products/Science | Wed Apr 12 1989 17:28 | 7 |
| UIL widget positioning is definitely non-intuitive, perhaps someone
can explain? I think it tends to be character (Latin1) relative
when dealing with objects that handle text, but I am just guessing.
Hopefully someone "in the know" will explain it better.
-Dave
|
585.2 | | LEOVAX::TREGGIARI | | Wed Apr 12 1989 21:56 | 10 |
| The only "unexpected" thing about widget coordinates is that
positioning in Dialog boxes (and subclasses) is by default in
font units, not pixels.
An application should not call XtMoveWidget. Only a widget's
parent widget should be calling that. An application should use
XtSetValues of DwtNx and DwtNy.
Leo
|
585.3 | .2 fixes it, but I'm still puzzled | IOSG::LOVELUCK | Dave | Mon Apr 17 1989 08:35 | 22 |
| Re .2
Thanks for the advice - I tried using XtSetValues and the positioning
is consistent.
I'm still a little puzzled by the behaviour however, and I would
appreciate some explanation or a pointer to the right bit of
documentation (I admit it, I haven't read *all* the manuals :-)).
Am I right in understanding that the UIL definition and the result of
XtSetvalue is to express the position in Font units but the XtMove uses
pixels? If so then how come, I didn't get a different results back from
XtGetValue after I moved it. Did XtGetValue start returning me values
in the different units as well? Am I confusing the whole system by using
XtMoveWidget in an inappropriate way?
Cheerse
Dave
|
585.4 | | LEOVAX::TREGGIARI | | Mon Apr 17 1989 09:01 | 15 |
| > Did XtGetValue start returning me values
> in the different units as well?
XtGetValues of XtNx and XtNy will always return pixel coordinates.
To get the font unit coordinates of an item in a dialog box you
need to call XtGetValues of DwtNfontX and DwtNfontY.
> Am I confusing the whole system by using
> XtMoveWidget in an inappropriate way?
Very likely...
Leo
|
585.5 | How big are font units? | NITMOI::WITHERS | Another Hallmark Moment. -Al Bundy | Wed May 23 1990 15:05 | 11 |
| RE: .4
> XtGetValues of XtNx and XtNy will always return pixel coordinates.
> To get the font unit coordinates of an item in a dialog box you
> need to call XtGetValues of DwtNfontX and DwtNfontY.
For Latin1 character what does the "font unit coordinates" breakdown
as? Are they the size of the largest character? smallest character?
George
|
585.6 | Font-units | LEOVAX::TREGGIARI | | Wed May 23 1990 15:41 | 8 |
| In the X direction, the value of the AVERAGE_WIDTH property / 35.
In the Y direction, the value of the POINT_SIZE property *
the value of the RESOLUTION_Y property / 5825.24
The odd divisors are the result of the algorithm changing after V1, but
attempting to get compatible values.
Leo
|