NAME

X11::Fvwm::Tk - X11::Fvwm with the Tk widget library attached

SYNOPSIS

use Tk;
use X11::Fvwm::Tk;

$top = new MainWindow;
$handle = new X11::Fvwm::Tk $top;

$handle->initModule;

$handle->addHandler(M_CONFIGURE_WINDOW, \&configure_Toplevel);
$handle->addHandler(M_CONFIG_INFO, \&some_other_sub);

$handle->eventLoop;

$handle->endModule;

DESCRIPTION

The X11::Fvwm package is designed to provide access via Perl 5 to the module API of Fvwm 2. This code is based upon Fvwm 2.0.45 beta.

The X11::Fvwm::Tk package is a sub-class of X11::Fvwm that overloads the methods new and eventLoop to manage Tk objects as well.

This manual page details only those differences. For details on the API itself, see X11::Fvwm.

METHODS

Only those methods that are not available in X11::Fvwm, or are overloaded are covered here:

new

$self = new X11::Fvwm::Tk $top, %params

Create and return an object of the X11::Fvwm::Tk class. The return value is the blessed reference. This new method is identical to the parent class method, with the exception that a Tk top-level of some sort (MainWindow, TopLevel, Frame, etc.) must be passed before the hash of options. The options themselves are as specified in X11::Fvwm.

eventLoop

$self->eventLoop

From outward appearances, this methods operates just as the parent eventLoop does. It is worth mentioning, however, that this version enters into the Tk MainLoop subroutine, ostensibly not to return.

toplevel

$self->toplevel

Returns the Tk toplevel that this object was created with. Unlike other instance variable-related methods, the toplevel cannot be changed, so this method ignores any arguments passed to it.

Instance Variables

The following are instance variables not present in the parent class:

topLevel

The Tk object that was passed as the toplevel this object will use, should it need to call any Tk widget methods (such as dialog creation). It is recommended that you use the access method toplevel instead of reading this directly.

EXAMPLES

Examples are provided in the scripts directory of the distribution. These are:

PerlTkWL

A much more robust WinList clone, it looks and acts very much like the FvwmWinList module that comes with Fvwm. It differs in some subtle ways, however. This one handles more packet types, as well as demonstrating the interaction between X11::Fvwm and the Tk extension. Requires Tk 400.200 or better.

PerlTkConsole

A combination of the FvwmConsole and FvwmDebug modules from the extras directory of the Fvwm distribution. Allows the user to send commands to Fvwm, and if the debugging is enabled, also shows traffic from Fvwm in a format slightly cleaned up for ease of reading.

BUGS

Would not surprise me in the least.

CAVEATS

In keeping with the UNIX philosophy, X11::Fvwm does not keep you from doing stupid things, as that would also keep you from doing clever things. What this means is that there are several areas with which you can hang your module or even royally confuse your running Fvwm process. This is due to flexibility, not bugs.

AUTHOR

Randy J. Ray <randy@byz.org>

ADDITIONAL THANKS TO

Nick Ing-Simmons <Nick.Ing-Simmons@tiuk.ti.com> for the incredible Tk Perl extension.

SEE ALSO

For more information, see fvwm, X11::Fvwm and Tk