Version 9 of Pod

Updated 2007-08-08 12:06:27 by ABU

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


The Pod command creates a new toplevel widget (given by the pathName argument). Additional options, described below, may be specified on the command line or in the option database to configure aspects of the Pod such as its background color.

Other than creating new Pods, the Pod command can also transform existing toplevel widgets.

Here is a sample; note the rounded shaded corners and the 3rd semi-transparent window ..

http://web.tiscali.it/irrational/tcl/pod-1.0/doc/images/demo01.png

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

http://web.tiscali.it/irrational/tcl/pod-1.0/doc/images/Kandinsky.png

DOWNLOAD

  • Start page: [L1 ]
  • Download [L2 ]

HOW TO USE IT

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" [L3 ] within the doc directory.

PLATFFORM COMPATIBILITY

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

  • wm ovverrideredirect $win
  • wm attributes $win -transparentcolor $color (*New in TclTk 8.4.15*)
  • wm attributes $win -alpha $val

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


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

  • Rounded corners are not drawn properly ( you can see a fake pink background!). This is because on Mac (8.4.15 at least) the Toplevel-transparency concept is implemented in a totally different (and incompatible) way.
  • You can create new Pod, but you cannot convert existing toplevels to Pod. This is because the wm overrideredirect ... command has a different behaviour respect to Windows ; Once a toplevel has been drawn, you cannot hide the window-decoration.

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.

Yesterday WJP reported a positive impression on Linux ... I'd like to see a screenshot of the demo included ...


[ Category Widget ]