home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xcolored.zip / xcoloredit / Xcoloredit.h < prev    next >
Text File  |  1991-06-18  |  8KB  |  214 lines

  1. /* $Xukc: Xcoloredit.h,v 1.4 91/06/17 10:58:00 rlh2 Rel $ */
  2.  
  3. /* 
  4.  * Copyright 1990 Richard Hesketh / rlh2@ukc.ac.uk
  5.  *                Computing Lab. University of Kent at Canterbury, UK
  6.  *
  7.  * Permission to use, copy, modify and distribute this software and its
  8.  * documentation for any purpose is hereby granted without fee, provided that
  9.  * the above copyright notice appear in all copies and that both that
  10.  * copyright notice and this permission notice appear in supporting
  11.  * documentation, and that the names of Richard Hesketh and The University of
  12.  * Kent at Canterbury not be used in advertising or publicity pertaining to
  13.  * distribution of the software without specific, written prior permission.
  14.  * Richard Hesketh and The University of Kent at Canterbury make no
  15.  * representations about the suitability of this software for any purpose.
  16.  * It is provided "as is" without express or implied warranty.
  17.  *
  18.  * Richard Hesketh AND THE UNIVERSITY OF KENT AT CANTERBURY DISCLAIMS ALL
  19.  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
  20.  * OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL Richard Hesketh OR THE
  21.  * UNIVERSITY OF KENT AT CANTERBURY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  22.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  23.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  24.  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
  25.  * OF THIS SOFTWARE.
  26.  *
  27.  * Author:  Richard Hesketh / rlh2@ukc.ac.uk, 
  28.  *                Computing Lab. University of Kent at Canterbury, UK
  29.  */
  30.  
  31. static String app_defaults[] = {
  32. /* global defaults */
  33.     "*Foreground: black",
  34.     "*Background: white",
  35.     "*BorderColor: black",
  36. /* For mixing form */
  37.     "*mixingForm.translations: <Expose>: draw_boxed()",
  38. /* For all scrollbars */
  39.     "*Scrollbar.borderWidth: 2",
  40.     "*Scrollbar.height: 255",
  41.     "*Scrollbar.width: 15",
  42.     "*Scrollbar.translations: \
  43.  <Btn1Down>: border() StartScroll(Forward) \\n\
  44.  <Btn2Down>: border() StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\
  45.  <Btn3Down>: border() StartScroll(Backward) \\n\
  46.  <Btn2Motion>: MoveThumb() NotifyThumb() \\n\
  47.  <BtnUp>: border(reset) NotifyScroll(Proportional) EndScroll() update_triple()",
  48. /* Red locked button */
  49.     "*redLocked.width: 15",
  50.     "*redLocked.height: 15",
  51.     "*redLocked.label: ",
  52.     "*redLocked.horizDistance: 5",
  53.     "*redLocked.translations: <Btn1Down>: lock_toggle(red)",
  54. /* Green locked button */
  55.     "*greenLocked.width: 15",
  56.     "*greenLocked.height: 15",
  57.     "*greenLocked.label: ",
  58.     "*greenLocked.fromHoriz: redLocked",
  59.     "*greenLocked.horizDistance: 6",
  60.     "*greenLocked.translations: <Btn1Down>: lock_toggle(green)",
  61. /* Blue locked button */
  62.     "*blueLocked.width: 15",
  63.     "*blueLocked.height: 15",
  64.     "*blueLocked.label: ",
  65.     "*blueLocked.fromHoriz: greenLocked",
  66.     "*blueLocked.horizDistance: 6",
  67.     "*blueLocked.translations: <Btn1Down>: lock_toggle(blue)",
  68. /* Title */
  69.     "*title.label: XColoredit v1.2",
  70.     "*title.borderWidth: 0",
  71.     "*title.width: 187",
  72.     "*title.height: 15",
  73.     "*title.fromHoriz: blueLocked",
  74.     "*title.vertDistance: 6",
  75. /* Red Scroll bar */
  76.     "*redScroll.foreground: red",
  77.     "*redScroll.borderColor: red",
  78.     "*redScroll.fromVert: redLocked",
  79. /* Green Scroll bar */
  80.     "*greenScroll.foreground: #4fb51e",
  81.     "*greenScroll.borderColor: #4fb51e",
  82.     "*greenScroll.fromHoriz: redScroll",
  83.     "*greenScroll.fromVert: greenLocked",
  84. /* Blue Scroll bar */
  85.     "*blueScroll.foreground: blue",
  86.     "*blueScroll.borderColor: blue",
  87.     "*blueScroll.fromHoriz: greenScroll",
  88.     "*blueScroll.fromVert: blueLocked",
  89. /* Locked Scroll bar */
  90.     "*lockedScroll.fromHoriz: blueScroll",
  91.     "*lockedScroll.fromVert: title",
  92.     "*lockedScroll.sensitive: false",
  93. /* Mixed colour box */
  94.     "*mixedColor.label: To change the\\n\
  95. colour of this\\n\
  96. example text\\n\
  97. type \"c\" or \"t\"\\n\
  98. in this window.",
  99.     "*mixedColor.height: 148",
  100.     "*mixedColor.width: 162",
  101.     "*mixedColor.fromHoriz: lockedScroll",
  102.     "*mixedColor.fromVert: title",
  103.     "*mixedColor.translations: <Btn1Down>: set_scroll(red) \\n\
  104.                          <Btn1Up>: stop_scroll(red) \\n\
  105.                          <Btn2Down>: set_scroll(green) \\n\
  106.                          <Btn2Up>: stop_scroll(green) \\n\
  107.                          <Btn3Down>: set_scroll(blue) \\n\
  108.                          <Btn3Up>: stop_scroll(blue) \\n\
  109.                          <Key>c: change_text_colour() \\n\
  110.                          <Key>t: change_text_colour() \\n\
  111.                          <MotionNotify>: move_scroll()",
  112. /* Red colour box */
  113.     "*redIntensity.height: 50",
  114.     "*redIntensity.width: 50",
  115.     "*redIntensity.fromVert: mixedColor",
  116.     "*redIntensity.fromHoriz: lockedScroll",
  117.     "*redIntensity.translations: <Btn1Down>: set_scroll(red) \\n\
  118.                         <Btn1Up>: stop_scroll(red) \\n\
  119.                         <MotionNotify>: move_scroll()",
  120. /* Green colour box */
  121.     "*greenIntensity.height: 50",
  122.     "*greenIntensity.width: 50",
  123.     "*greenIntensity.fromVert: mixedColor",
  124.     "*greenIntensity.fromHoriz: redIntensity",
  125.     "*greenIntensity.translations: <Btn1Down>: set_scroll(green) \\n\
  126.                          <Btn1Up>: stop_scroll(green) \\n\
  127.                          <MotionNotify>: move_scroll()",
  128. /* Blue colour box */
  129.     "*blueIntensity.height: 50",
  130.     "*blueIntensity.width: 50",
  131.     "*blueIntensity.fromVert: mixedColor",
  132.     "*blueIntensity.fromHoriz: greenIntensity",
  133.     "*blueIntensity.translations: <Btn1Down>: set_scroll(blue) \\n\
  134.                         <Btn1Up>: stop_scroll(blue) \\n\
  135.                         <MotionNotify>: move_scroll()",
  136. /* triple Value */
  137.     "*tripleValue.label: #ffffff",
  138.     "*tripleValue.width: 162",
  139.     "*tripleValue.fromHoriz: lockedScroll",
  140.     "*tripleValue.fromVert: redIntensity",
  141. /* quit button */
  142.     "*quit.label: Quit",
  143.     "*quit.width: 162",
  144.     "*quit.fromVert: tripleValue",
  145.     "*quit.fromHoriz: lockedScroll",
  146. /* hue label */
  147.     "*hueLabel.label: H",
  148.     "*hueLabel.fromHoriz: title",
  149.     "*hueLabel.width: 15",
  150.     "*hueLabel.height: 15",
  151.     "*hueLabel.horizDistance: 6",
  152. /* saturation label */
  153.     "*satLabel.label: S",
  154.     "*satLabel.fromHoriz: hueLabel",
  155.     "*satLabel.width: 15",
  156.     "*satLabel.height: 15",
  157.     "*satLabel.horizDistance: 6",
  158. /* value label */
  159.     "*valLabel.label: V",
  160.     "*valLabel.fromHoriz: satLabel",
  161.     "*valLabel.width: 15",
  162.     "*valLabel.height: 15",
  163.     "*valLabel.horizDistance: 6",
  164. /* hue scrollbar */
  165.     "*hueScroll.fromHoriz: mixedColor",
  166.     "*hueScroll.fromVert: hueLabel",
  167.     "*hueScroll.translations: \
  168.  <Btn1Down>: set_scroll(red) set_scroll(green) set_scroll(blue) \
  169.         StartScroll(Forward) \\n\
  170.  <Btn2Down>: set_scroll(red) set_scroll(green) set_scroll(blue) \
  171.         StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\
  172.  <Btn3Down>: set_scroll(red) set_scroll(green) set_scroll(blue) \
  173.         StartScroll(Backward) \\n\
  174.  <Btn2Motion>: MoveThumb() NotifyThumb() \\n\
  175.  <BtnUp>: stop_scroll(red) stop_scroll(green) stop_scroll(blue) \
  176.         NotifyScroll(Proportional) EndScroll() update_triple()",
  177. /* saturation scrollbar */
  178.     "*satScroll.fromHoriz: hueScroll",
  179.     "*satScroll.fromVert: satLabel",
  180.     "*satScroll.translations: \
  181.  <Btn1Down>: set_scroll(red) set_scroll(green) set_scroll(blue) \
  182.         StartScroll(Forward) \\n\
  183.  <Btn2Down>: set_scroll(red) set_scroll(green) set_scroll(blue) \
  184.         StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\
  185.  <Btn3Down>: set_scroll(red) set_scroll(green) set_scroll(blue) \
  186.         StartScroll(Backward) \\n\
  187.  <Btn2Motion>: MoveThumb() NotifyThumb() \\n\
  188.  <BtnUp>: stop_scroll(red) stop_scroll(green) stop_scroll(blue) \
  189.         NotifyScroll(Proportional) EndScroll() update_triple()",
  190. /* value scrollbar */
  191.     "*valScroll.fromVert: valLabel",
  192.     "*valScroll.fromHoriz: satScroll",
  193.     "*valScroll.translations: \
  194.  <Btn1Down>: set_scroll(red) set_scroll(green) set_scroll(blue) \
  195.         StartScroll(Forward) \\n\
  196.  <Btn2Down>: set_scroll(red) set_scroll(green) set_scroll(blue) \
  197.         StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\
  198.  <Btn3Down>: set_scroll(red) set_scroll(green) set_scroll(blue) \
  199.         StartScroll(Backward) \\n\
  200.  <Btn2Motion>: MoveThumb() NotifyThumb() \\n\
  201.  <BtnUp>: stop_scroll(red) stop_scroll(green) stop_scroll(blue) \
  202.         NotifyScroll(Proportional) EndScroll() update_triple()",
  203. /* color box */
  204.     "*colorBox.fromVert: redScroll",
  205.     "*colorBox.borderWidth: 0",
  206.     "*colorBox.horizDistance: 0",
  207. /* memory buttons */
  208.     "*colorMemory.width: 22",
  209.     "*colorMemory.height: 22",
  210.     "*colorMemory.borderWidth: 1",
  211.     "*colorMemory.borderColor: black",
  212.     "*colorMemory.translations: <Btn1Down>: pick_memory()"
  213. };
  214.