[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] XForm.FontSize, XForm.PupFontSize

From: Jens Thoms Toerring
Subject: Re: [XForms] XForm.FontSize, XForm.PupFontSize
Date: Mon, 24 Jul 2017 23:51:25 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Peter,

On Mon, Jul 24, 2017 at 01:27:42PM -0700, Peter Rowat wrote:
> Hello, I have what must be a very dumb question about resources and FDesign.
> First, I don’t understand what “resources” are.

I don't know if you ghave ever looked at your .Xresources
file (or if you have one at all). As an example here's are
a few bits from mine

xterm.VT100.background:     white
xterm.VT100.foreground:     black
xterm.VT100.geometry:       80x45+120+5
xterm.VT100.faceName:       Input Mono Narrow
xterm.VT100.faceSize:       13

If you look up the xterm man page you'll fine a long list
in the "RESOURCES" section. These are keyword-value pairs
xterm understands. And when it is started it asks X (which
keeps a database of the entries in the users '.Xresource'
file) if there were any fpr 'xterm' and tries to make sense
of them. So it allows the user to adjust a lot of "default"
settings of different programs (in my case back- and forground
color, the font to use, where and how large to make the window
etc.) without having to pass them via command line argumemts
each time a program is started.

And it's the same with programs using XForms. The library will
on start-up request information from XLibs database of the set-
tings in the users .Xresource file starting with the name of
the program (as that's the first in the list in the argv array
you pass to fl_initialize()). There's a set of predefined "re-
sources" you found in the manual. And each prgram can add futher
"resources" it can check for and use for whatever purposes it
wants the user to change.

> In the XForms manual p.88,
> XForm.FontSize, XForm.PupFontSize are listed, and I’d like to change them
> while using FDesign. I searched for them unsuccessfuly in “forms.h” and in
> the library code. So how do I access them?

First of all that bit of documentation is really bad. You al-
ready need to know what "resources" are and how they are dealt
with by X. And then it seems to be a bit misleading:-( In any
case this is nothing you can use with fdesign - it's all about
allowing the user to change default settings of XForms (and
also others of the program using XForms) via his/her .Xresource
file. I've used it once in a program but definitely needed to
read the X documentation to get it to work;-)

The whole of this is dealt with in flresource.c if you're
interested. And, if you plan to play around with the possi-
bilities, keep in mind that the .Xresource file is read in
once by X on start-up and never again - unless you tell it
to. So changes in the .Xresourvce file only have an effect
after either logging out and back in or running the command

xrdb -load $HOME/.Xresources

('xrdb' stands for "X read data base" or something similar.)

I hope this gives you at least an idea what to look for. For
more details I'd have to take a longer look at how all this
                            Best regards, Jens
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]