home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / x / motif / 5615 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  3.1 KB

  1. Path: sparky!uunet!mcsun!uknet!lsl!stevewi
  2. From: stevewi@lsl.co.uk
  3. Newsgroups: comp.windows.x.motif
  4. Subject: MULTICOLOUR ICONS
  5. Summary: MULTICOLOUR ICONS
  6. Keywords: COLOR ICONS UIL
  7. Message-ID: <1992Aug14.125647.2295@lsl.co.uk>
  8. Date: 14 Aug 92 11:56:47 GMT
  9. Reply-To: stevewi@lsl.co.uk
  10. Organization: Laser-Scan Ltd., Cambridge
  11. Lines: 72
  12.  
  13. My problem concerns the use of colour pixmaps defined using UIL.
  14. I am currently defining the colours used by the pixmaps in a color_table
  15. as follows :
  16.  
  17. value
  18.  my_table : color_table(
  19.                          background color = ' ',
  20.                          color('blue') = 'X',
  21.                          color('red') = '*',
  22.                              ...
  23.                          color('green') = '+');
  24.  
  25. using this color_table when defining the pixmaps:
  26.  
  27. value MY_ICON : icon (color_table = my_table,
  28.                       '        ',
  29.                       ' XXXXXX ',
  30.                       ' X****X ',
  31.                       ' X*++*X ',
  32.                       ' X*++*X ',
  33.                       ' X****X ',
  34.                       ' XXXXXX ',
  35.                       '        ');
  36.  
  37. then using the pixmaps in labels and buttons instead of strings:
  38.  
  39. object
  40.   A_BUTTON : XmPushButton {
  41.     arguments {
  42.         XmNlabelType = XmPIXMAP;
  43.         XmNlabelPixmap = MY_ICON;
  44.     };
  45. };
  46.  
  47. What I want to know is ->
  48.  
  49. How can I define the values of the *colours* used in the color_table from
  50. the .Xdefaults file, or elsewhere if necessary ??
  51.  
  52. What I want to be able to do is something like:
  53.  
  54. value
  55.  my_table : colour_table(
  56.                          background color = ' ',
  57.                          color('my_colour_1') = 'X',
  58.                          color('my_colour_2') = '*',
  59.                              ...
  60.                          color('my_colour_n') = '+');
  61.  
  62. and define what these my_colour_1-n are somewhere else, preferably outside
  63. application control and in a simple .Xdefaults or similar file.
  64.  
  65. Or am I asking too much ???
  66.  
  67. Thanx in advance,
  68.  
  69. Steve Wilkes
  70.  -----------------------------------------------------------------------------
  71. |                       |                                                     |
  72. | Steve Wilkes          |  /                    |    |                        |
  73. | Laser-Scan Ltd        |  \ |- /\ \  / * /\    | /\ |                        |
  74. | The Science Park      |  /  \ \_  \/  | \_    |/  \|                        |
  75. | Milton Road           |                                                     |
  76. | CAMBRIDGE             |  He was the kind of man who would wear wet copper   |
  77. | CB4 4FY               |  armour in a thunderstorm shouting                  |
  78. | Tel (+44) 233 414420  |  "The rain gods are b******s!!".                    |
  79. |                       |                                                     |
  80.  -----------------------------------------------------------------------------
  81. | Disclaimer:                                                                 |
  82. | This was all MY IDEA and had absolutely nothing to do with Laser-Scan...    |
  83. |                                                                             |
  84.  -----------------------------------------------------------------------------
  85.