• progeCAD in French Language
  • progeCAD in Spanish Language
  • progeCAD in English Language
 >  > Dialog Control Language 

Dialog Control Language

Dialog Control Language

Programming Overview of DCL (Dialog Control Language)

DCL is an acronym for Dialog Control Language, a separate programming language that you can use with progeCAD to create custom dialog boxes. In creating dialog boxes with DCL, you work with elements called tiles, cluster tiles (or clusters), and attributes. The following sections describe each type of element and the basic syntax used to express it.

Tiles

A tile is a dialog box element, such as a button, a text box, a list box, an image, or a piece of text. Tiles are typically expressed via the following syntax:

: toggle { }

Note the colon prefix, followed by a space. That signifies that you are redefining (temporarily) the attributes of a tile. A tile name appearing without the colon prefix indicates that it has already been defined elsewhere (earlier in the DCL file or in another DCL file). The braces contain the tile's attributes (if any), characteristics such as color, associated action, or label.

Tiles are also categorized by function:

NOTE

    • There are no tiles for creating tabbed dialog boxes.
    • Your DCL file must not use the following tiles: cluster, tiles, cancel_button, help_button, info_button, and ok_button.

Cluster Tiles

A cluster is a group of tiles, such as a group of related radio buttons (also called option buttons) or a group of check boxes (also called toggles). Clusters are usually (but not always) surrounded by a rectangular outline. The individual tile elements within a cluster are called the cluster's children.

Clusters are a form of tile, and typically take the following syntax:

: boxed_column { }

Again, note the colon prefix, followed by a space. The braces contain the cluster's attributes and tiles. Radio buttons have their own clusters since, by definition, there must be at least two radio buttons in a cluster.

Attributes

In DCL, the term attribute refers to a characteristic of a tile, such as its color, the action it performs, its label, and so forth. The program's DCL includes a number of predefined Predefined Attributes(IDR_2) (for example, color, multiple_select, and typeface).

A tile can have many attributes or none at all. When a tile has no attributes, it assumes the default values of the attributes.

A typical attribute takes the following syntax:

label = "Pick a viewpoint: ";

Note the semicolon terminator. Not all attributes apply to all tiles. In fact, some attributes change their meaning, depending on the tile with which they are used.

Tiles and Attributes Unique to progeCAD's Implementation of DCL

The program's DCL has one unique tile and several attributes that are not found in other implementations of DCL. The following table describes the tile unique to progeCAD's implementation of DCL:

Tile Meaning
: multi_edit_box { } Creates a multi-line edit box.

The following table summarizes the attributes that are unique to progeCAD's implementation of DCL:

Attribute Meaning
lower_only = flag; Read all input text as lower case.
pointsize = int; Point size of text displayed by the dialog box.
read_only - flag; Text in edit box is non-editable.
typeface = "string"; TrueType typeface displayed by the dialog box.
upper_only = flag; Read all input text as upper case.

The DCL File Format

A DCL file is in ASCII format, so you can use any text editor (such as Microsoft® NotePad or Microsoft® Word) to write and edit DCL files.

Syntax for Comments in DCL Code

Line comments are prefixed with //, as follows:

// A comment line.

To embed comments in the DCL code, use /* and */, as follows:

plotdlg : dialog { /* The Plot dialog box*/

Referencing Tile Definitions in DCL Code

The DCL file can reference tile definitions in anther DCL file through the use of the include directive:

@include filename

About Predefined Attributes

Copying Code Examples from the progeCAD Developer Reference

  • Google +One
 
DWG is the native file format for Autodesk AutoCAD®. Autodesk and AutoCAD are registered trademarks or trademarks of Autodesk, Inc. in the USA and/or other countries. progeSOFT and progeCAD are registered trademarks or trademarks of progeCAD s.r.l. in the USA and/or other countries.