[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: widget_programming
- Subject: Re: widget_programming
- From: David Foster <foster(at)bial1.ucsd.edu>
- Date: Tue, 08 Jun 1999 14:26:02 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: Univ. of Calif San Diego
- References: <3755190E.9701C37A@fz-juelich.de>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:15105
R.Bauer wrote:
>
> Hi,
>
> position keywords are fine if I use always the same platform for my
> application.
> But unfortunately we have some computers and some platforms where
> positional widgets
> are shown very bad.
>
> The main reason is the different system font and the different screen
> resolutions.
>
> Which fonts are on unix idl and nt idl will give the same results? Is
> there a list avaliable?
>
> Did the fontsize append on the screen resolution and how will I get
> independent to the screen resolution?
>
> I do understand well thats if I defined 1280 * 1024 and I have on an
> other one only 1024 x 768 I got in trouble.
> But if I define 200 * 160 both should look simliar. What happens is
> thats on the best system (it's always the one where the widget was
> builded) all is ok and on an other one all is shifted on top of each
> other. Input fields could not be reached.
>
> R.Bauer
When I ran into this problem trying to port code from Sun/Solaris to
SGI I included the following commands in the "idl_startup" file:
; Choose pseudo-color 8-bit visual
device, pseudo_color=8
; Select default backing-store method to be provided by IDL, as SGI
; X server does not seem to provide it
device, retain=2
; Change size of font so programs fit on-screen (IRIX 4.0 or later)
; Reference: sgi.doc document in $IDL_DIR/notes
WIDGET_CONTROL, $
DEFAULT_FONT="-adobe-helvetica-bold-r-normal-*-14-100-*-*-*-*-*"
; Set default plotting font to same hardware font above
; (Create a pixmap window to avoid window creation upon
; calling DEVICE, FONT= ; then delete window)
window, xsize=5,ysize=5,/free,/pixmap
!p.font = 0 ; Use hardware font
device, FONT="-adobe-helvetica-bold-r-normal-*-10-100-*-*-*-*-*"
wdelete ; Delete window created
I used something very similar, without the RETAIN=2, for Solaris 2.6.
>From my experience, the two major issues are (1) default font sizes,
and (2) screen resolution. I really like the idea of developing
routines that can choose reasonably sized fonts under multiple
platforms.
As far as getting things to look similar goes, screen resolution
can be an important issue as well. If widgets are too big, chances
are your default font(s) are too big, but if widgets are too small,
chances are your screen resolution may be higher than you're used to.
In our lab, we have actually forced the resolution of our newer Sun
Ultra machines to a lower value than their default, because the higher
resolution was making it too hard for our brain-anatomy people to see
what they were doing. Once you figure out which damn command controls
your particular frame-buffer, it's quite easy to do this. As an example,
on our Sun Ultra1 Creator we use:
/usr/sbin/ffbconfig -res 1152x900x76 now
in the user's startup file, before starting the window manager,
and then restore the default resolution later using:
/usr/sbin/ffbconfig -res 1280x1024x76 now
Dave Foster
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~