| Tk-Multi documentation | view source | Contained in the Tk-Multi distribution. |
Tk::Multi::Toplevel - Toplevel MultiManager
use Tk::Multi::Toplevel ;
my $mw = MainWindow-> new ;
my $p = $mw->MultiTop();
# If Multi::Toplevel is the only Tk window of your application
$mw -> withdraw ; # hide the main window
# destroy the main window when close is called
$p -> OnDestroy(sub{$mw->destroy});
# add a 'bar' menu with a 'foo' button on the menu bar
$p->menuCommand(name => 'foo', menu => 'bar',
sub => sub{warn "invoked bar->foo\n";});
# add a menu button on the 'File' menu
$p->add(
'command',
-label => 'baz',
-command => sub {warn "invoked File->baz\n";}
);
This class is a Tk::Multi::Manager packed in a Toplevel window. It features also :
Object reference that will be scanned by the ObjScanner. Usefull when you want to debug the object that actually use the Multi::TopLevel. By default the ObjScanner will scan the Multi::TopLevel object.
This the name of the pod file that will be displayed with the 'Help'->'global' button. This should be set to the pod file name of the class or the application using this widget.
By default, the help button will display the pod file of Multi::TopLevel.
This the section of the pod file that will be displayed with the 'Help'->'global' button.
By default, the help button will display the 'DESCRIPTION' pod section.
Users menus are also advertised (See below)
Parameters are :
Will invoke the Tk::Pod documentation widget of the specified pod file and pod section.
Users menu does not fold when you insert a lot of buttons.
Tk::Pod 0.10 does not display the specified section. Use a later version or this patch (http://www.xray.mpe.mpg.de/mailing-lists/ptk/1998-11/msg00033.html)
Dominique Dumont, domi@komarr.grenoble.hp.com
Copyright (c) 1997-1998,2004 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl(1), Tk(3), Tk::Multi::Manager(3), Tk::Pod(3), Tk::ObjScanner(3), Tk::mega(3)
| Tk-Multi documentation | view source | Contained in the Tk-Multi distribution. |