www.gibmonks.com

  Previous section   Next section

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch

Table of Contents
Chapter 54.  Tcl/Tk 8.3


Proposed Tk Changes

The Img Patch

The Img patch adds an alpha channel, better transparency support, and improved GIF support, including the ability to save GIF images. This patch also supports other image types (e.g., JPEG) that can be loaded as extensions.

Canvas Improvements

The canvas implementation needs to be converted to use Tcl_Obj values, which will improve its performance. Advanced tag searching may be added. This adds the ability to search for canvas items based on boolean expressions of tag values. Dashed lines will be added, even though we can support only single-pixel wide dashed lines on Windows 95. Windows NT, UNIX, and Macintosh can support thick dashed lines. Canvas coordinates may be specified as a single list argument instead of individual arguments, which makes it easier to construct commands. The "Visitors Patch" may be adopted, so that extensions can add new canvas operations without patching Tk directly.

Pointer Warping

Tk applications will have the ability to move the mouse under program control. Use the wm warp command:

wm warp x y

Hidden Text

The TkMan application uses hidden text to suppress text display. This works by adding a new tag property.

Entry Widget Validation

New options may be added to the entry widget for input validation. The options specify command callbacks that are made at various times, such as when the entry widget takes input focus, loses input focus, or has its value change. The commands are subject to % keyword substitution similar to the substitutions in event bindings. The keywords are used to get the name of the entry widget (e.g., %W), the character that is being added, and so forth.


      Previous section   Next section
    Top