multi::manager(3)

NAME

Tk::Multi::Manager - Tk composite widget managing
Tk::Multi slaves

SYNOPSIS

use Tk::Multi::Manager ;
use Tk::Multi::Text ; # if you use MultiText as a slave
my $manager = yourWindow -> MultiManager
 (
  menu => $menu_ref , # optionnal
  title => "windows", # optionnal
  help => "Explain what your set of widget do" #optionnal
 ) -> pack ();
# Don't pack it, the managet will do it
my $w1 = $manager -> newSlave
 (
  'type' => 'MultiText',
  'title' => 'a_label',
  help  => "Explain what your slave widget does" #optionnal
 );

DESCRIPTION

The manager is a composite widget made of a menu cascade
of check buttons and slaves which can be Tk::Multi::Text.

The user can add windows to the manager. Each window visi
bility is controled by a check button in the menu cascade.
The check button actually tells the packer to forget the
window. note that the window object is not destroyed.

The main menu bar will feature a 'Help' menu on the right.
If the main help which explain the purpose of the
Multi::Manager and its slaves is provided when creating
the widget, the Help sub-menu will feature a 'global'
label.

Each slave widget which is created with a help will have
its own label in the help menu.

Multi widgets

This package features the following Multi widgets:

· Tk::Multi::Text

· Tk::Multi::Canvas

Constructor configuration options

menu

The widget may use a 'menu' argument which will be used to
create a menu item and releveant sub-menus to control the
sub-window. If not provided, the widget will create a its
own menu.

title

The optionnal title argument contains the title of the
menu created by the manager.

help

The argument may be a string or a sub reference.

When the help menu is invoked, either the help string will
be displayed in a Tk::Dialog box or the sub will be run.
In this case it is the user's responsability to provide a
readable help from the sub.

Methods

newSlave(...) ;

Create a new slave to manager. Returns the slave widget
object. Parameters are:

· type: specifies the kind of Multi widget (e.g. Multi
Text).
· title: specifies the title of the widget (mandatory).
· before: specify that you want this new slave to be
packed before (well, above) another widget. This
parameter will be set to the 'title' of this other
widget.
· side: when set to 'top', the widget will be packed on
top of the others. (default to 'bottom').
· hidden: specifies whether the widget is to be packed
right now or not (default 0)
· destroyable: a 'destroy' button is created if this
parameter is defined (default no). Returns the slave
widget reference.
· help: This argument may be specified like the help
parameter defined above for the constructor.
getSlave('name of the slave');
Return the slave widget or undef.
hide('name of the slave');
Hide the slave.
show('name of the slave');
Show the slave.
destroySlave( 'name of the slave') ;
Destroy the slave

AUTHOR

Dominique Dumont, Dominique_Dumont@grenoble.hp.com

Copyright (c) 1997-1999 Dominique Dumont. All rights
reserved. This program is free software; you can redis
tribute it and/or modify it under the same terms as Perl
itself.

SEE ALSO

perl(1), Tk(3), Tk::Multi::Text(3), Tk::Multi::Canvas(3)
Copyright © 2010-2025 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout