Version 21 of Pod

Updated 2008-11-14 12:07:12 by MHo

ABU 3-aug-2007 - Pod - A new kind of toplevel window.

ABU 9-jan-2008 - Pod 1.2 released - updated links


Introduction

Pod is a new kind of toplevel widget. The Pod command can create new windows or it can also transform existing toplevel-windows.

Anatomy of a Pod widget

http://web.tiscali.it/irrational/tcl/Pod-1.2/doc/images/pod01.png

Here is a sample from a real application:

http://web.tiscali.it/irrational/tcl/Pod-1.2/doc/images/intro.png

Another picture showing how to adapt an existing application : Kandinsky dance

http://web.tiscali.it/irrational/tcl/Pod-1.2/doc/images/Kandinsky.png


Download

  • 1.0 Start page: [L1 ]
  • 1.0 Download [L2 ]
  • 1.2 Start page: [L3 ]
  • 1.2 Download [L4 ]

How to Use the Package

Basically, in order to create a Pod-window you only need to add 2 lines:

   package require Pod
   Pod .myPod

or, you can transform an existing toplevel in a Pod-window

   Pod adapt .topWin

There are few other command you can use for customizing the Pod (read below).

   # change the look
  .myPod configure -background blue
   # disable the interactive resizability 
  .myPod configure -resizable false

For full details, read the "Pod Reference" [L5 ] within the doc directory.

Platform Compatibility

Pod is pure-Tcl code but it is based on some wm sub-commands unfortunately supported only on Windows and Mac. In particular, the following command are not well supported on Unix:

WJP I just tried it on my Linux 2.6.3 system with Tcl/Tk 8.4.14 and it seems to work.

RLH Neat!


AMG: What are the speckles visible in the lower-right corner of the screenshots? Are they resizing grab handles?

ABU: Correct ! You can enable/disable these grab handles

   $w configure -resizable false

Anyway, even if interactive-resizing is disabled, you can always resize the Pod by program:

   wm geometry $w 250x200

More about Platform Compatibility

Windows

  • 100% - Note that the minimal required version is 8.4.15 (it is the first supporting the "wm attributes $w -transparentcolor $color" command).

Mac

  • Version 1.2 is 99.9% identical to the Windows version. The only difference is an annoying flickering when large Pod-widgets are being resized.

http://web.tiscali.it/irrational/tcl/Pod-1.2/doc/images/podOnMac.png

Unix

  • Rounded corners are not drawn properly. Toplevel transparency is not supported.
  • About the wm overrideredirect ... command, there are some troubles ...similar to those found on Mac.

DKF: Actually, Unix/X11 defines what wm overrideredirect does (i.e. it's used to create an unmanaged toplevel widget).


LV Another use of the term pod comes from the perl community and stands for plain old doc, a simple code markup language designed to be used for embedding documentation within code. It is a bit more complex than this wiki's markup, but perhaps a bit simpler than doctools. The relevancy for this wiki is that I have seen, over the years, requests from developers for some kind of tcl documentation scheme that was as easy to use as pod.


MHo: On my WinXP, after minimizing and then maximizing again, the window is not in the foreground (Z-order changed). Trouble activating widgets are not uncommon on windows, I think - I always use focus -force. The Snit package is required.