Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ogicse!milton!mattf From: mattf@milton.u.washington.edu (Matthew Freedman) Newsgroups: comp.windows.x.motif Subject: User settable resources in UIL Message-ID: <8609@milton.u.washington.edu> Date: 4 Oct 90 21:34:07 GMT Organization: University of Washington, Seattle Lines: 33 Does anybody know how to create new, user-settable resources which can be referenced from a UIL module? In particular, I have several distinct fonts and colors which I use in different widgets in my application. Right now they are defined in UIL, i.e. text_font : font('Adobe-New Century Schoolbook-Medium-R-Normal--12-*-*-*-*-*-*-*'); and in various arguments sections of objects I will say XmNfontList = text_font; The problem is that I need to make the fonts (and colors) usable-settable at run-time. The obvious choice is to do so in a resource file, but the only way I can see to do this is to individually specify the fontList resource for each and every widget or widget-class which used a certain font. I would much rather create a new resource called textFont, and allow the user to specify a value for that, and have my uil-defined widgets use it as needed. If I was building the interface directly in C without UIL, I know I could use an XtResource array and XtGetApplicationResources to define new resource names, but how can I export those to uil-defined widgets? This is very important, because the application needs to run well on a variety of different displays, and some of them seem to have radically different font sizes and names available. I also need to do the same with colors so that the application will look decent in monochrome as well as color. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- = Matthew M. Freedman = = U. of Washington Information Systems mattf@cac.washington.edu = = 4545 15th Ave. NE; 4th Floor (206) 543-5593 = = Seattle, WA 98105 = -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-