Re: widget_programming [message #15706 is a reply to message #15663] |
Fri, 04 June 1999 00:00   |
mgs
Messages: 144 Registered: March 1995
|
Senior Member |
|
|
In article <3757BF62.5494763D@astro.estec.esa.nl>, Michael Werger
<mwerger@astro.estec.esa.nl> wrote:
> Dear all
>
> David and Richard wrote about cross-platform development of GUIs
> and the problems with this
>
> [... discussion simply cut ...]
>
> I simply gave up (was trying on Solaris and Windows95/98) - I
> got them by default pretty similar but never equal...
>
> I was doing some cross-platform development for Tcl/Tk too and
> had similar problems. There I developed simply a routine which
> reads a resource file where you can specify font sizes etc.
> I think this way might be a good way here too...? Even different
> users on the same platform have different preferences for
> colors and font sizes
I've been working sporadically on a way to handle this. I hard-coded
something up a couple years ago called OsInfo that is not very useful.
I've been working on a version that creates sliders, text widgets, etc. in
the background, then stores the sizes in a structure. You can use the
sizes as part of a ButtonSize calculation. Here's an idea, where
mMisc.mOsInfo.mBuffer.button contains the number of pixels that a button
takes up without text in it:
; the widget button group definition
wBGAAC = CW_BGroup2(wBase, asResText, /Frame, /Row, $
ButtonSize=mGeo.XSize / N_Elements(asResText) - $
mMisc.mOsInfo.mBuffer.button, Font=mMisc.labelFont)
The idea was to use the XSize of a pre-existing base in the widget
hierarchy to determine the ButtonSize of a BGroup. At the time, I was
developing on a Mac with an SGI target. It worked, but it's not flexible
enough. The OsInfo code on <http://www.ivsoftware.com/IV_Code.html> has
the old incarnation of OsInfo if someone wants to use it for a starting
point.
--
Mike Schienle Interactive Visuals, Inc.
mgs@ivsoftware.com Remote Sensing and Image Processing
http://www.ivsoftware.com/ Analysis and Application Development
|
|
|