NAME

Tk::AppWindow::Ext::Panels - manage the layout of your application

SYNOPSIS

my $app = new Tk::AppWindow(@options,
   -extensions => ['Panels'],
);
$app->MainLoop;

DESCRIPTION

Adds a layout of Frame objects to the main window. You can specify which frames should have a slider. Each Frame can be in a shown or hidden state.

CONFIG VARIABLES

-panelgeometry

Specifies the geometry manager used for the panel layout. Possible values are 'pack' and 'grid'. Default value 'pack'.

-panellayout

Specify the structure of your layout.

The keys used below are all home to the geometry manager used. Plus a few more. These are:

-canhide

Specify if a panel is capable of hiding and showing. By default 0.

-adjuster

If specified the panel is adjustable. The value is transferred to the -side option of the adjuster.

Default value:

[
   CENTER => {
      -in => 'MAIN',
      -side => 'top',
      -fill => 'both',
      -expand => 1,
   },
   WORK => {
      -in => 'CENTER',
      -side => 'left',
      -fill => 'both',
      -expand => 1,
   },
   TOP => {
      -in => 'MAIN',
      -side => 'top',
      -before => 'CENTER',
      -fill => 'x',
      -canhide => 1,
   },
   BOTTOM => {
      -in => 'MAIN',
      -after => 'CENTER',
      -side => 'top',
      -fill => 'x',
      -canhide => 1,
   },
   LEFT => {
      -in => 'CENTER',
      -before => 'WORK',
      -side => 'left',
      -fill => 'y',
      -canhide => 1,
      -adjuster => 'left',
   },
   RIGHT => {
      -in => 'CENTER',
      -after => 'WORK',
      -side => 'left',
      -fill => 'y',
      -canhide => 1,
      -adjuster => 'right',
   },
]
-workspace

Specifies the central workspace of your application. Default value is WORK.

METHODS

panelAssign($name, ?$panel?)

Returns the panel assigned to $name.

If $panel is specified assigns $name to <$panel> and creates a menu entry for $name> in the View menu.

panelDelete($name)

Deletes $name from the list of assigned panels and removes its menu entry in the View menu.

panelGet($name)

Returns the name of the assigned panel to $name

panelHide($panel)

panelHide $panel and its adjuster if any.

panelIsHidden($panel)

Returns the state of $panel. 1 if hidden, 0 if not.

panelList

Returns a list of assigned panels

panelShow($panel)

Show $panel and its adjuster if any.

AUTHOR

Hans Jeuken (hanje at cpan dot org)

BUGS

Unknown. If you find any, please contact the author.

SEE ALSO

Tk::AppWindow
Tk::AppWindow::BaseClasses::Extension