home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / windows / openloo / 4622 < prev    next >
Encoding:
Text File  |  1992-11-22  |  2.4 KB  |  53 lines

  1. Newsgroups: comp.windows.open-look
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!nuscc!lincoln.technet.sg!ctan
  3. From: ctan@solomon.technet.sg (Tan Chee Weei)
  4. Subject: Q: Correct way to handle resources?
  5. Message-ID: <By5HAu.MDE@lincoln.technet.sg>
  6. Sender: news@lincoln.technet.sg
  7. Nntp-Posting-Host: solomon.technet.sg
  8. Organization: TECHNET, Singapore
  9. X-Newsreader: TIN [version 1.1 PL6]
  10. Date: Mon, 23 Nov 1992 03:49:41 GMT
  11. Lines: 40
  12.  
  13.  
  14. Can anyone enlighten me on the correct way to query for resources (that the
  15. user may have specified in his .Xdefaults file) ?
  16.  
  17. I've seen the use of the defaults_ functions to look for defined (or default)
  18. values of resources. They each requires a name class pair. What the O'Reilly
  19. book doesn't explain is the format of the name and class strings. Assume I
  20. have a subframe in my application and I want to allow the user to specify
  21. in his .Xdefaults file its geometry. First, is it possible to allow them
  22. to specify it in WxH+X+Y format? If so, does it mean the application is
  23. responsible for parsing the value? Is there a function that can extract
  24. geometry values from strings of this format? Assuming the application
  25. requires a resource for each value. Let the name of the application be
  26. xapp. My subframe is referred to as a subframe subobject. I want the
  27. user to specify the value for the x location value of the subframe as:
  28.  
  29. xapp.subframe.x: 0
  30.  
  31. Now, what I want to know is:
  32.  
  33. 1) In the name string, what must I specify to name the resource? Do I say
  34. "xapp.subframe.x" (which I know works) or can I say "subframe.x"? Do
  35. I have to explicitly name the name of the application as part of the
  36. resource name or would the defaults function be smart enough to know
  37. to look for the resources for those beginning with xapp or *?
  38.  
  39. 2) What does the user say in the .Xdefaults file to set the x and y position
  40. of the base frame? Initially, I set the base frame's x-y value explictly
  41. but I realised that xv_main_loop() resets these values. What should the
  42. user specify in the .Xdefaults file to specify the base frame's x-y 
  43. values? 
  44.  
  45. 3) If I were to get the x-y values in 2) above via my own defined resources:
  46. eg. xapp.main.x and xapp.main.y, what can I do in my application to
  47. set it so that the values used by xv_main_loop are those I want them to be?
  48.  
  49. Any other pointers to other sources of information on this subject are also
  50. much appreciated. Thanks in advance.
  51.  
  52. CW
  53.