[Top][All Lists]

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

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

From: Peter Rowat
Subject: Re: [XForms] XForm.FontSize, XForm.PupFontSize
Date: Mon, 24 Jul 2017 15:50:59 -0700

Thank you, Jens, for this detailed explanation.  I was hoping someone else 
would quickly answer my dumb quest before you  spent your valuable time on it.
But, I now know 100% more than I did before about resources. 

I have no .Xresources file.  But you’ve given me enough pointers I may figure 
it out myself. Somewhere there’s a startup file that is read when Xlib first 
starts up or when I first login).
I’m using XQuartz, the Xlib replacement on OS X.

On a different note: Using the xforms “timer” or “idlecallback” to run my 
animations, they ran much more slowly than the same animations used to run on a 
 Sun Ultra which had a CPU clock speed orders of magnitude slower thank my 
MacBok pro. However, using  your sigALRM programs I can now run the animations 
just as fast or faster.

Thank you,

Peter R

> On Jul 24, 2017, at 2:51 PM, Jens Thoms Toerring <address@hidden> wrote:
> 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
> works;-)
>                            Best regards, Jens
> -- 
>  \   Jens Thoms Toerring  ________      address@hidden
>   \_______________________________      http://toerring.de

reply via email to

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