Pod - 1.1

a new kind of toplevel window.

Table Of Contents

NAME

pod - a new kind of toplevel window.

SYNOPSIS

package require Pod

Pod pathName ?options?

Pod adapt pathname ?options?

INTRODUCTION

A Pod is an extended toplevel widget with a special look&feel.

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.

STANDARD OPTIONS

All toplevel options are supported.

Options can be managed with the classic cget and configure commands.

Be careful that some standard options could be meaningless (or worst, dangerous) in a Pod context. Use them with care ..

POD-SPECIFIC OPTIONS

-resizable boolean
This option can enable/hide the ability to interactively resize the Pod. Default value is true
-transparentcolor color
In order to properly display rounded corners, Pod makes use of the "wm attributes $win -transparent $color" command. This means that if you draw something within the Pod with this color, it will look like as holes.

If you really need to use this color for your app, you should choose another unused color, and change this option. Color may have any of the forms accepted by Tk_GetColor. This option defaults to #ff00ff

WIDGET COMMANDS

All command working with a toplevel-window can be used.

    $win configure ....
    $win cget ...
    
    wm .... $win ...

and so on

BINDINGS

Pod-windows are created with class bindings that give them default behavior:

Moving
Click and drag over the Pod borders or any internal zone.

Starting from Pod 1.1, you can start dragging the whole Pod by simply pressing Button-1 over ANY point inside the Pod, PROVIDED THAT the cursor is not over an internal widget having its own binding with Button-1 (e.g. scrollbars, button, ....).

Every time you click within the Pod, a check is performed whether the cursor is over a passive or an active sub-widget:

Resizing
Click and drag on the bottom-left corner (if not disabled, see -resizable option).

EXAMPLE

Create a new Pod named .myPod

   package require Pod
   Pod .myPod -bg blue 

or you can adapt an existing toplevel window

     # .. create a toplevel ".myWin", add some internal widgets,
     #    customize it ....
    Pod adapt .myWin
     # change the color and make it non-resizable
    .myWin configure -color orange -resizable false

NOTES

In order to display its typical rounded borders, Pod creates some internal widgets. For each Pod $win, some labels named $win.pod_* are created (and automatically destroyed when the Pod is destroyed). You should not modify these internal components.

Also a lot of images are automatically created/destroyed. Although they are visible to programmers, they should not be directly altered.

HISTORY