home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 November / Dppcpro1198.iso / Nov / Intelcad / Uncompressed / API / DCL / BASICDCL.DCL next >
Encoding:
Text File  |  1998-01-29  |  12.8 KB  |  422 lines

  1.  
  2. dcl_settings : default_dcl_settings { audit_level=3; }
  3.  
  4.  
  5. // -----------------------------------------------------------------
  6. // EXAMPLE 1:  Sampler
  7. // THE FOLLOWING DIALOG CONTAINS EXAMPLES OF MOST KINDS OF TILES.
  8. // USE IT AS A BASIS FOR CREATING NEW DIALOGUE BOXES QUICKLY.
  9. // THIS EXAMPLE DOES NOT USE ANY "PRE-FAB" PIECES. 
  10. // SEE EXAMPLE 2:  prefab (BELOW) FOR A DIALOG CREATED USING THOSE.
  11. // -----------------------------------------------------------------
  12.  
  13. sampler : dialog {
  14.     label = "Main Title Goes Here";
  15.    
  16.     : column {
  17.         : boxed_row {  
  18.             label          = "Boxed Row";   
  19.             : row {
  20.                 : column {
  21.                     children_alignment     = right;
  22.                     : text {
  23.                         label   = "Pop-up List 1:";
  24.                     }
  25.                     : text {
  26.                         label   = "Pop-up List 2:";
  27.                     }
  28.                     : text {
  29.                         label   = "Edit Box 1:";
  30.                     }
  31.                 }   
  32.                 : column {  
  33.                     children_fixed_width  = true;
  34.                     : popup_list {
  35.                         key         = "poplist1";
  36.                         list        = "Popcorn\nSoda Pop\nPop Tarts\nPopovers\nPoppyseeds";
  37.                         edit_width  =  12;
  38.                     }       
  39.                     : popup_list {
  40.                         key         = "poplist2";
  41.                         list        = "Pop Tarts\nPopcorn\nSoda Pop\nPopovers\nPoppyseeds";
  42.                         edit_width  =  12;
  43.                     }       
  44.                     :row {
  45.                        : edit_box {
  46.                            key         = "editbox";
  47.                            edit_width  =  14;
  48.                            edit_limit  =  20;
  49.                            value       = "Edit This";
  50.                        }
  51.                        : button {
  52.                            key         = "pickbutton";
  53.                            label       = "Pick";
  54.                            is_default  =  false;
  55.                            width       =  8;
  56.                        }
  57.                     }
  58.                 }
  59.                 : column {
  60.                     : image {
  61.                         key           = "image";
  62.                         aspect_ratio  =  1;
  63.                         height        =  2;
  64.                         width         =  7;
  65.                         color         =  -16;
  66.                     }
  67.  
  68.                     : row {
  69.                         : image_button {
  70.                             key           = "image_button1";
  71.                             width         =  3;
  72.                             height        =  2;
  73.                             color         =  2;
  74.                         }
  75.                         : image_button {
  76.                             key           = "image_button2";
  77.                             width         =  3;
  78.                             height        =  2;
  79.                             color         =  6;
  80.                         }
  81.                     }
  82.                 }
  83.            }
  84.     }
  85.         : spacer {
  86.             height  = 1;
  87.         }
  88.         : row {
  89.             fixed_width = true;
  90.             alignment   = centered;
  91.             : toggle {
  92.                 key           = "toggle0";
  93.                 label         = "Un-checked Toggle";
  94.                 value         =  "0";
  95.             }
  96.  
  97.             : toggle {
  98.                  key           = "toggle1";
  99.                  label         = "Checked Toggle";
  100.                  value         =  "1";
  101.             }
  102.         }
  103.         : row {
  104.             fixed_width = true;
  105.             alignment   = centered;
  106.             : text {
  107.                 label    = "1 - 100:";
  108.             }
  109.             : slider {
  110.                 key              = "slider";
  111. //                layout           =  horizontal;
  112.                 min_value        =  0;
  113.                 max_value        =  100;
  114.                 value            = "50";
  115.                 fixed_width      =  true;
  116.                 width            =  30;
  117.                 fixed_height     =  true;
  118.                 height           =  1;
  119.                 small_increment  =  1;
  120.                 big_increment    =  10;
  121.             }
  122.         }
  123.         : spacer {
  124.             height  = 1;
  125.         }   
  126.         : boxed_row {
  127.             label                 = "Boxed Row";
  128.             children_fixed_width  =  true;
  129.             children_fixed_height =  true;
  130.             : boxed_radio_column {
  131.                 key            = "radio_column";
  132.                 label          = "Boxed Radio Column";
  133.                 fixed_height   =  true;
  134.                 : radio_button {
  135.                     key        = "radio1";
  136.                     label      = "KPBS - Public Radio";
  137.                     value      = "1";
  138.                 }
  139.                 : radio_button {
  140.                     key        = "radio2";
  141.                     label      = "91X - Alternative";
  142.                     value      = "0";
  143.                 }
  144.                 : radio_button {
  145.                     key        = "radio3";
  146.                     label      = "KSON Country";
  147.                     value      = "0";
  148.                 }
  149.             }                                
  150.             : list_box {
  151.                 key             = "List1";
  152.                 label           = "List Box";
  153.                 multiple_select =  false;
  154.                 value           = "1";
  155.                 list            = "Ten Most Wanted List\nShopping List\nBlack List\nHit List\nWish List\nChristmas List\nPhone List";
  156.                 width           =  30;
  157.                 height          =  6;
  158.             }
  159.         }
  160.         : row {
  161.             children_fixed_width = true;
  162.             fixed_width          = true;
  163.             alignment            = centered;
  164.             : button {
  165.                 key           = "accept2";
  166.                 label         = "OK";
  167.                 mnemonic      = "O";
  168.                 is_default    =  true;
  169.                 width         =  8;
  170.                 alignment     =  centered;
  171.             }
  172.             : spacer {
  173.                 width = 2;
  174.             }
  175.             : button {
  176.                 key           = "cancel2";
  177.                 label         = "Cancel";
  178.                 mnemonic      = "C";
  179.                 is_default    =  false;
  180.                 width         =  8;
  181.                 alignment     =  centered;
  182.             }
  183.             : spacer {
  184.                 width = 2;
  185.             }
  186.             : button {
  187.                 key           = "help2";
  188.                 label         = "Help";
  189.                 mnemonic      = "H";
  190.                 is_default    =  false;
  191.                 width         =  8;
  192.                 alignment     =  centered;
  193.             }
  194.         } 
  195.     }
  196. }
  197.  
  198.  
  199.  
  200. // ---------------------------------------------------------------------
  201. // THE ROWS AND COLUMNS BELOW ARE EXAMPLES OF "PRE-FAB" CHUNKS OF STUFF
  202. // FOR USE LATER IN SEVERAL DIALOGS IN THE SAME .DCL FILE.
  203. // ---------------------------------------------------------------------
  204.  
  205. okcancelhelp : column {
  206.     fixed_height=true;
  207.     children_fixed_width=true;
  208.     children_alignment=left;
  209.     : button {
  210.         label="  OK  ";
  211.         key="accept2";
  212. //        is_default=true;
  213.         width=19;
  214.     }
  215.     : button {
  216.         label="Cancel";
  217.         key="cancel2";
  218. //        is_cancel=true;
  219.         width=19;
  220.     }
  221.     : button {
  222.         label="Help...";
  223.         key="help2";
  224.         width=19;
  225.     }
  226. }
  227.  
  228. bottomrow : row {
  229.     fixed_width = true;
  230.     alignment = centered;
  231.     children_fixed_width = true;
  232.     ok_button;
  233.     spacer_1;
  234.     cancel_button;
  235.     spacer_1;
  236.     help_button;
  237. }         
  238.  
  239. stations : boxed_radio_column {
  240.     key            = "radio_column";
  241.     label          = "Boxed Radio Column";
  242.     fixed_height   =  true;
  243.     : radio_button {
  244.         key        = "radio1";
  245.         label      = "KPBS - Public Radio";
  246.         value      = "1";
  247.     }
  248.     : radio_button {
  249.         key        = "radio2";
  250.         label      = "91X - Alternative";
  251.         value      = "0";
  252.     }
  253.     : radio_button {
  254.         key        = "radio3";
  255.         label      = "KSON - Country";
  256.         value      = "0";
  257.     }
  258. }                                 
  259.  
  260.  
  261. commentbox : column {
  262.     : text { label="Comments :"; }
  263.     : edit_box {
  264.         key="comments_edbx";
  265.         width=49;
  266.         edit_width=49;
  267.         edit_limit=240;
  268.     }
  269. }
  270.  
  271. littlesliders : row {
  272.     fixed_width  = true;
  273.     fixed_height = true;
  274.     : text {
  275.         label  = "Here's a tiny horizontal slider...";
  276.     }
  277.     : slider {
  278.         fixed_width     =  true;
  279.         width           =  4;
  280.         key             = "horiz";
  281.         value           = "0";
  282.         min_value       =  0;
  283.         max_value       =  999;
  284.         small_increment =  1;
  285.         big_increment   =  1;
  286.     }
  287.     spacer_1;
  288.     : text {
  289.         label  = "and a vertical one :";
  290.     }
  291.     : slider {
  292.         layout          =  vertical;
  293.         fixed_width     =  true;
  294.         height          =  2;
  295.         key             = "vert";
  296.         value           = "0";
  297.         min_value       =  0;
  298.         max_value       =  999;
  299.         small_increment =  1;
  300.         big_increment   =  1;
  301.     }
  302. }
  303.  
  304.  
  305.  
  306. // ------------------------------------------------------------------------
  307. // EXAMPLE2
  308. // THIS DIALOGUE BOX USES THE "PRE-FAB" CHUNKS OF STUFF, ABOVE.
  309. // IF YOU COPY AND PASTE FROM HERE, BE SURE TO TAKE ALONG THE 
  310. // PARTS THAT ARE CALLED BY THE DCL CODE YOU ARE COPYING.
  311. // ------------------------------------------------------------------------
  312.  
  313. prefab : dialog {
  314.     label = "This Dialogue Box Uses 'Pre-Fab' Pieces";   
  315.     : column {
  316.         : row {
  317.             stations;
  318.             spacer_1;
  319.             okcancelhelp;
  320.         }
  321.         spacer_1;
  322.         littlesliders;
  323.         commentbox;
  324.         spacer_1;
  325.         bottomrow;
  326.     }
  327. }
  328.  
  329. //-----------------------------------------------------------------------
  330. // THIS ONE SHOWS HOW BOXES AND COLUMNS NEST TOGETHER.
  331. //-----------------------------------------------------------------------
  332.  
  333. boxes : dialog {
  334.         label = "Lots o'Boxes and Columns";
  335.  
  336.       : boxed_column {
  337.       : boxed_column {
  338.       : boxed_column {
  339.            : boxed_row {
  340.                 : button {
  341.                      key            = "key1";
  342.                      label          = "OK";
  343. //                     is_default     = true;
  344.                      fixed_width    = true;
  345.                      color          = 1;
  346.                  }
  347.          
  348.                  : button {
  349.                       key            = "key2";
  350.                       label          = "Done";
  351. //                      is_default     = true;
  352.                       fixed_width    = true;
  353.                       color          = 1;
  354.                  }
  355.            }
  356.            : boxed_row {
  357.                 : button {
  358.                      key            = "key3";
  359.                      label          = "Go Away";
  360. //                     is_default     = true;
  361.                      fixed_width    = true;
  362.                      color          = 1;
  363.                  }
  364.          
  365.                  : button {
  366.                       key            = "key4";
  367.                       label          = "Cancel";
  368. //                      is_default     = true;
  369.                       fixed_width    = true;
  370.                       color          = 1;
  371.                  }
  372.  
  373.            }
  374.       }
  375.       }
  376.       }
  377.       : boxed_row {
  378.       : boxed_row {
  379.       : boxed_row {
  380.            : boxed_column {
  381.                 : button {
  382.                      key            = "accept";
  383.                      label          = "OK";
  384.                      is_default     = true;
  385.                      fixed_width    = true;
  386.                      color          = 1;
  387.                  }
  388.          
  389.                  : button {
  390.                       key            = "key6";
  391.                       label          = "Done";
  392. //                      is_default     = true;
  393.                       fixed_width    = true;
  394.                       color          = 1;
  395.                  }
  396.            }
  397.            : boxed_column {
  398.                 : button {
  399.                      key            = "key7";
  400.                      label          = "Go Away";
  401. //                     is_default     = true;
  402.                      fixed_width    = true;
  403.                      color          = 1;
  404.                  }
  405.          
  406.                  : button {
  407.                       key            = "key8";
  408.                       label          = "Cancel";
  409. //                      is_default     = true;
  410.                       fixed_width    = true;
  411.                       color          = 1;
  412.                  }
  413.  
  414.            }
  415.       }
  416.       }
  417.       }
  418. }
  419.  
  420.  
  421.  
  422.