home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 April / DPPCPRO0498.ISO / April / AutoCAD / ACLT / BASE.DCL < prev    next >
Encoding:
Text File  |  1997-10-16  |  11.9 KB  |  508 lines

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