NAME
Tk::DockFrame - A multicolumn list widget with sortable & sizeable columns
SYNOPSIS
use Tk::DockFrame;
$DockPort = $parent->DockPort();
$DockPort->pack();
$DockFrame = $parent->DockFrame
(
'-dock' => $DockPort,
'-trimcount' => 1,
'-sensitivity' => 10,
'-decorate' => 0,
'-trimgap' => 2
);
$DockFrame->Widget (...)->pack();
...
Tk::MainLoop;
DESCRIPTION
The two public classes in this module combine to implement a dockable widget subsystem.
Objects of class DockFrame are simple frames which can be made to "float" free as Toplevel widgets or packed as Frames. Dockframes can have any number of direct children but the favored use is to pack a single Frame based child widget and add widgets to that using any geometry manager.
DockPorts are simple frame widgets which must be managed by the packer. They normally have no width or height and are thus rendered invisible. DockFrame children of the same parentage, when dragged over them, will be converted from "floating" Toplevels into Frame widgets rendered within the DockPort, resizing it accordingly.
- IMPORTANT UPDATE
-
The DockFrames are now managed WITHIN the DockPorts, therefore any geometry manager can be used with all the widgets described here
STANDARD OPTIONS
- DockFrame
-
-background -borderwidth -relief -bg -width -height
- DockPort
-
none
See Tk for details of the standard options.
WIDGET-SPECIFIC OPTIONS
- Name: dock
- Class: Dock
- Switch: -dock
-
Used to "dock" a DockFrame to a DockPort. The parameter passed must be a reference to a DockPort and nothing else. If a DockPort is not specified in this manner on creation, then the DockFrame will initially "float" free.
- Name: trimcount
- Class: TrimCount
- Switch: -trimcount
-
Specifies the number of button trim drag 'handles'. Specifying 0 will prevent attachment/detachment of the DockFrame.
- Name: sensitivity
- Class: Sensitivity
- Switch: -sensitivity
-
The DockFrame will "dock" when it gets within the specified number of pixels of the DockPort.
- Name: decorate
- Class: Decorate
- Switch: -decorate
-
Boolean value indicating whether or not to instruct the window manager to add decoration (titlebar, etc) to the undocked DockFrame. It is important to note here that, due to the nature of the event handling, dragging the DockFrame by the titlebar will not cause it to dock.
- Name: trimgap
- Class: Trimgap
- Switch: -trimgap
-
This option specifies the number of pixels to leave between the "handles" and the first child widget
WIDGET METHODS
BINDINGS
- [1]
-
Pressing and holding the left mouse button on a DockFrame trim element allows movement of that DockFrame. If the DockFrame is "dragged" over a DockPort, it will "dock" and dragging will cease until the "handle" is released and then selected again.
AUTHORS
Damion K. Wilson, dwilson@ibl.bm, http://pwp.ibl.bm/~dkw
COPYRIGHT
Copyright (c) 1999 Damion K. Wilson.
All rights reserved.
This program is free software, you may redistribute it and/or modify it under the same terms as Perl itself.
HISTORY
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 622:
=cut found outside a pod block. Skipping to next block.
- Around line 665:
'=item' outside of any '=over'
- Around line 670:
You forgot a '=back' before '=head1'