02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7<br />

Debugger<br />

Most of the examples in 7.7.3 Tcl: Experimenting with CrossWind Extensions, p.275,<br />

below, center around calls to downtcl.<br />

7.7.3 Tcl: Experimenting with CrossWind Extensions<br />

The examples in this section use the Tcl extensions summarized in Table 7-3. For<br />

detailed descriptions of these and other <strong>Tornado</strong> graphical building blocks in Tcl,<br />

see <strong>Tornado</strong> API Guide: UI Tcl.<br />

Table 7-3 <strong>Tornado</strong> UI Tcl Extensions Used in Example 7-2.<br />

7<br />

Tcl Extension<br />

dialogCreate<br />

dialogPost<br />

dialogUnpost<br />

dialogGetValue<br />

noticePost<br />

menuButtonCreate<br />

toolBarItemCreate … button<br />

toolBarItemCreate … space<br />

Description<br />

Define the layout of a form (dialog box). Includes a list of all<br />

graphical controls (such as buttons, text boxes, lists). The<br />

description of each control ends with the name of a Tcl<br />

callback used when the control is acted on.<br />

Display or update a named form (dialog).<br />

Remove a form (dialog) from the screen.<br />

Report the current value of a dialog graphical element (the<br />

contents of a text box, or the current selection in a list).<br />

Display a popup notice or a file selector.<br />

Add a command to an existing menu.<br />

Add a new button (and associated command string) to the<br />

button bar.<br />

Add space before new buttons in the button bar.<br />

Tcl: “This” Buttons for C++<br />

In C++ programs, one particular named value has great special interest: this,<br />

which is a pointer to the object where the currently executing function is a member.<br />

Example 7-1 defines two buttons related to this:<br />

– A button, akin to the button, to display the address of this in the<br />

command panel.<br />

275

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!