home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 January / Chip_1997-01_cd.bin / autocad / acltldv / base.dcl < prev    next >
Text File  |  1995-07-26  |  12KB  |  478 lines

  1. // Next XMF message is 15, Module ID BASE_DCL
  2.  
  3. //    BASE.DCL      Version 1.1
  4. //
  5. //    Copyright (C) 1991-1994 by Autodesk, Inc.
  6. //         
  7. //    Permission to use, copy, modify, and distribute this software 
  8. //    for any purpose and without fee is hereby granted, provided 
  9. //    that the above copyright notice appears in all copies and that 
  10. //    both that copyright notice and this permission notice appear in 
  11. //    all supporting documentation.
  12. //
  13. //    THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
  14. //    WARRANTY.  ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR
  15. //    PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
  16.  
  17. // Define common prototypes and subassemblies for use by
  18. // ACAD.DCL (AutoCAD),
  19. // ACLT.DCL (AutoCAD LT),
  20. // ACVQ.DCL (AutoCAD VQ),
  21. // and user-defined dialogs (AutoCAD).
  22.  
  23. // (The primitive widgets are set up automatically by init_dialog.  The
  24. // equivalent DCL is shown here (commented out) for reference.)
  25.  
  26. // dialog {
  27. //      layout          = vertical;
  28. //      is_enabled      = false;
  29. // }
  30. // 
  31. // cluster {
  32. //      layout          = horizontal;
  33. // }
  34. // 
  35. // radio_cluster {
  36. //      layout          = horizontal;
  37. //      is_enabled      = true;
  38. // }
  39. // 
  40. // tile {
  41. //      layout          = horizontal;
  42. //      is_enabled      = true;
  43. // }
  44. // 
  45. // text  : tile {
  46. //      fixed_height    = true;       // inhibit vertical expansion
  47. // }
  48. // 
  49. // image : tile {
  50. // }
  51. // 
  52. // button : tile {
  53. //      fixed_height    = true;
  54. //      is_tab_stop     = true;
  55. // }
  56. // 
  57. // image_button : button {
  58. //      is_tab_stop     = true;
  59. // }
  60. // 
  61. // toggle : tile {
  62. //      fixed_height    = true;
  63. //      is_tab_stop     = true;
  64. // }
  65. // 
  66. // radio_button : tile {
  67. //      fixed_height    = true;
  68. //      is_tab_stop     = true;
  69. // }
  70. // 
  71. // list_box : tile {
  72. //      is_tab_stop     = true;
  73. //      height          = 10;
  74. //      width           = 10;
  75. // }
  76. // 
  77. // edit_box : tile {
  78. //      fixed_height    = true;
  79. //      is_tab_stop     = true;
  80. // }
  81. // 
  82. // popup_list : tile {
  83. //      is_tab_stop     = true;
  84. //      fixed_height    = true;
  85. // }
  86. // 
  87. // slider : tile {
  88. //      is_tab_stop     = true;
  89. // }
  90. // 
  91. // spacer : tile {
  92. // }
  93.  
  94. //----- Styles of clusters.
  95.  
  96. row : cluster {
  97.     horizontal_margin = none;
  98.     vertical_margin = none;
  99.     children_alignment = centered;
  100. }
  101.  
  102. column : cluster {
  103.     layout = vertical;
  104.     horizontal_margin = none;
  105.     vertical_margin = none;
  106. }
  107.  
  108. boxed_row : cluster {
  109.     label = /*MSG0*/" ";
  110.     boxed = true;
  111.     children_alignment = centered;
  112. }
  113.  
  114. boxed_column : cluster {
  115.     label = /*MSG0*/" ";
  116.     layout = vertical;
  117.     boxed = true;
  118. }
  119.  
  120. //----- Styles of radio clusters.
  121.  
  122. radio_row : radio_cluster {
  123.     horizontal_margin = none;
  124.     vertical_margin = none;
  125.     children_alignment = centered;
  126. }
  127.  
  128. radio_column : radio_cluster {
  129.     layout = vertical;
  130.     horizontal_margin = none;
  131.     vertical_margin = none;
  132. }
  133.  
  134. boxed_radio_row : radio_cluster {
  135.     label = /*MSG0*/" ";
  136.     boxed = true;
  137.     children_alignment = centered;
  138. }
  139.  
  140. boxed_radio_column : radio_cluster {
  141.     label = /*MSG0*/" ";
  142.     layout = vertical;
  143.     boxed = true;
  144. }
  145.  
  146. //----- Horizontal and vertical blocks of running text.
  147.  
  148. concatenation : cluster {
  149.     fixed_width = true;
  150.     fixed_height = true;
  151.     children_alignment = centered;
  152. }
  153.  
  154. paragraph : cluster {
  155.     layout = vertical;
  156.     fixed_height = true;
  157. }
  158.  
  159. text_part : text {
  160.     horizontal_margin = none;
  161.     vertical_margin = none;
  162. }
  163.  
  164. //----- Common spacers.
  165.  
  166. spacer_0 : spacer {
  167.     height = 0;
  168.     width = 0;
  169.     horizontal_margin = none;
  170.     vertical_margin = none;
  171. }
  172.  
  173. spacer_1 : spacer {
  174.     height = 1;
  175.     width = 1;
  176.     horizontal_margin = none;
  177.     vertical_margin = none;
  178. }
  179.  
  180. //----- The normal default widget.
  181.  
  182. default_button : button {
  183.         is_default      = true;
  184. }
  185.  
  186. //----- plain_cluster and plain_text are obsolete.  Use the new cluster
  187. //      styles and running text prototypes above.
  188.  
  189. plain_cluster : cluster {
  190.         horizontal_margin = none;
  191.         vertical_margin = none;
  192. }
  193.  
  194. plain_text  : text {                // text without margins
  195.         horizontal_margin    = none;
  196.         vertical_margin      = none;
  197. }
  198.  
  199. //----- Standard prototype for making consistent "dialog retirement buttons".
  200. //      Used below for the predefined retirement buttons, and for user-defined
  201. //      dialogs that need retirement buttons with specialized verbs.
  202.  
  203. retirement_button : button {
  204.         fixed_width     = true;
  205.         width           = 8;
  206.         alignment = centered;
  207. }
  208.  
  209. //----- Standard dialog retirement buttons.  Unless one is building a dialog
  210. //      retirement subassembly containing specialized verbs, these will 
  211. //      normally not be used directly by DCL code outside of base.dcl; use
  212. //      the pre-built subassemblies in the next section.
  213.  
  214. ok_button : retirement_button {
  215.         label           = /*BASE_DCL_1*/"  OK  ";
  216.         key             = /*MSG0*/"accept";
  217.         is_default      = true;
  218. }
  219.  
  220. cancel_button : retirement_button {
  221.         label           = /*BASE_DCL_2*/"Cancel";
  222.         key             = /*MSG0*/"cancel";
  223.         is_cancel       = true;
  224. }
  225.  
  226. help_button : retirement_button {
  227.         label           = /*BASE_DCL_3*/"&Help...";
  228.         key             = /*MSG0*/"help";
  229. }
  230.  
  231. info_button : retirement_button {
  232.         label           = /*BASE_DCL_4*/"&Info...";
  233.         key             = /*MSG0*/"info";
  234. }
  235.  
  236. //----- Pre-built arrays of dialog bottom-line buttons.
  237.  
  238. ok_only : column {
  239.     fixed_width = true;
  240.     alignment = centered;
  241.     : ok_button {
  242.         is_cancel = true;
  243.     }
  244. }
  245.  
  246. ok_cancel : column {
  247.     : row {
  248.         fixed_width = true;
  249.         alignment = centered;
  250.         ok_button;
  251.         : spacer { width = 2; }
  252.         cancel_button;
  253.     }
  254. }
  255.  
  256. ok_cancel_help : column {
  257.     : row {
  258.         fixed_width = true;
  259.         alignment = centered;
  260.         ok_button;
  261.         : spacer { width = 2; }
  262.         cancel_button;
  263.         : spacer { width = 2; }
  264.         help_button;
  265.     }
  266. }
  267.  
  268. ok_help : column {
  269.     : row {
  270.         fixed_width = true;
  271.         alignment = centered;
  272.         ok_button;
  273.         : spacer { width = 2; }
  274.         help_button;
  275.     }
  276. }
  277.  
  278. ok_cancel_help_info : column {
  279.     : row {
  280.         fixed_width = true;
  281.         alignment = centered;
  282.         ok_button;
  283.         : spacer { width = 2; }
  284.         cancel_button;
  285.         : spacer { width = 2; }
  286.         help_button;
  287.         : spacer { width = 2; }
  288.         info_button;
  289.     }
  290. }
  291.  
  292. //----- Error reporting tiles.
  293.  
  294. errtile : text {
  295.         label = /*MSG0*/"";
  296.         key = /*MSG0*/"error";
  297.         width = 35;                   // must be long enough to hold error msgs
  298.         is_error_tile = true;
  299. }
  300.  
  301. // A custer consisting of OK, Cancel, and Help on one line with the error tile
  302. //    below.
  303.  
  304. ok_cancel_help_errtile : column {
  305.     ok_cancel_help;
  306.     errtile;
  307. }
  308.  
  309. // The same thing without the Help button for subdialogues that have no help
  310. //    available.
  311.  
  312. ok_cancel_err : column {
  313.     ok_cancel;
  314.     errtile;
  315. }
  316.  
  317. //-----For AutoCAD: Currently, the only dcl setting is the audit_level which
  318. //     controls the level of semantic error checking applied during a 
  319. //     load_dialog operation.  (0 = none, 1 = errors, 2 = warnings, 3 = hints)
  320. // See AutoCAD's README for details.
  321. //
  322. // Audit is not supported in AutoCAD VQ.
  323. default_dcl_settings : tile {
  324.     audit_level = 1;
  325. }
  326.  
  327. //----- Miscellaneous parts used by ACAD.DCL (AutoCAD),
  328. //      ACLT.DCL (AutoCAD LT), and ACVQ.DCL (AutoCAD VQ).
  329.  
  330. image_block : image {
  331.         key = /*MSG0*/"show_image";
  332.         height = 1;
  333.         width = 1;
  334. }
  335.  
  336. icon_image : image_button {
  337.         color                   = 0;
  338.         width                   = 12;
  339.         aspect_ratio            = 0.66;
  340.         allow_accept            = true;
  341.         fixed_height            = true;
  342.         fixed_width             = true;
  343. }
  344.  
  345. edit12_box : edit_box {
  346.         edit_width = 12;
  347.         edit_limit = 18;
  348. }
  349.  
  350. //  The following are for the color-selection dialogs
  351.  
  352. swatch : image_button {
  353.     vertical_margin = none;
  354.     horizontal_margin = none;
  355.     fixed_height = true;
  356.     fixed_width = true;
  357.     height = 1.5;
  358.     width = 3;
  359. }
  360.  
  361. color_palette_1_7 : row {             // Standard colors 1-7
  362.     : swatch { color = 001; key = /*MSG0*/"001"; }
  363.     : swatch { color = 002; key = /*MSG0*/"002"; }
  364.     : swatch { color = 003; key = /*MSG0*/"003"; }
  365.     : swatch { color = 004; key = /*MSG0*/"004"; }
  366.     : swatch { color = 005; key = /*MSG0*/"005"; }
  367.     : swatch { color = 006; key = /*MSG0*/"006"; }
  368.     : swatch { color = 007; key = /*MSG0*/"007"; }
  369. }
  370.  
  371. color_palette_1_9 : row {             // Standard colors, plus 8 and 9
  372.     color_palette_1_7;
  373.     : swatch { color = 008; key = /*MSG0*/"008"; }
  374.     : swatch { color = 009; key = /*MSG0*/"009"; }
  375. }
  376.  
  377. color_palette_0_9 : row {             // Standard colors, plus 0, 8, and 9
  378.     : swatch { color = 000; key = /*MSG0*/"000"; }
  379.     color_palette_1_9;
  380. }
  381.  
  382. color_palette_250_255 : row {         // Grey shades 250-255
  383.     : swatch { color = 250; key = /*MSG0*/"250"; }
  384.     : swatch { color = 251; key = /*MSG0*/"251"; }
  385.     : swatch { color = 252; key = /*MSG0*/"252"; }
  386.     : swatch { color = 253; key = /*MSG0*/"253"; }
  387.     : swatch { color = 254; key = /*MSG0*/"254"; }
  388.     : swatch { color = 255; key = /*MSG0*/"255"; }
  389. }
  390.  
  391. std_rq_color :column{
  392.     :column {
  393.         :boxed_row {
  394.             fixed_width = true;
  395.             label = /*BASE_DCL_5*/"Standard Colors";
  396.             color_palette_1_9;
  397.         }
  398.         :row {
  399.             :boxed_row {
  400.                 fixed_width = true;
  401.                 label = /*BASE_DCL_6*/"Gray Shades";
  402.                 color_palette_250_255;
  403.             }
  404.             :boxed_row {
  405.                 fixed_width = true;
  406.                 label = /*BASE_DCL_7*/"Logical Colors";
  407.                 :button {
  408.                     label = /*BASE_DCL_8*/"BY&LAYER";
  409.                     key = /*MSG0*/"256";
  410.                 }
  411.                 :button {
  412.                     label = /*BASE_DCL_9*/"&BYBLOCK";
  413.                     key = /*MSG0*/"000";
  414.                 }
  415.             }
  416.         }
  417.     }
  418.     :boxed_column {
  419.         label = /*BASE_DCL_10*/"Full Color Palette";
  420.         :image_button{
  421.             key = /*MSG0*/"hiside";
  422.             width = 40;
  423.             height = 5;
  424.         }
  425.         :image_button{
  426.             key = /*MSG0*/"loside";
  427.             width = 40;
  428.             height = 5;
  429.         }
  430.     }
  431.     :row {
  432.         fixed_width = true;
  433.         alignment = centered;
  434.         children_alignment = bottom;
  435.         :edit12_box {
  436.             label = /*BASE_DCL_11*/"Color:";
  437.             key = /*MSG0*/"color_edit";
  438.             allow_accept = true;
  439.         }
  440.         :swatch {
  441.             key = /*MSG0*/"color_image";
  442.         }
  443.     }
  444.     ok_cancel_help_errtile;
  445. }
  446.  
  447. //  The preceding are for color-selection dialogs
  448.  
  449.  
  450. //  Top and bottom sub-assemblies for the files dialogue
  451. files_topdf : column {
  452.     : edit_box {
  453.         key = /*MSG0*/"pedit";
  454.         label = /*BASE_DCL_12*/"&Pattern:";
  455.         edit_width = 35;
  456.     }
  457.     : row {
  458.         : text {
  459.             label = /*BASE_DCL_13*/"Directory:";
  460.         }
  461.         : text {
  462.             key = /*MSG0*/"dirtext";
  463.             width = 35;
  464.         }
  465.     }
  466. }
  467.  
  468. files_bottomdf : column {
  469.     : edit_box {
  470.         key = /*MSG0*/"fedit";
  471.         label = /*BASE_DCL_14*/"&File:";
  472.         allow_accept = true;
  473.     }
  474.     ok_cancel_help;
  475.     errtile;
  476. }
  477.  
  478.