NAME

Tk::AppWindow::BaseClasses::Plugin - Baseclass for all plugins.

SYNOPSIS

#This is useless
my $plug = Tk::AppWindow::BaseClasses::Plugin->new($frame);

#This is what you should do
package My::App::Path::Plugins::MyPlugin
use base(Tk::AppWindow::BaseClasses::Plugin);
sub new {
   my $class = shift;
   my $self = $class->SUPER::new(@_); #$mainwindow should be the first in @_
   ...
   return $self
}

DESCRIPTION

A plugin is different from an extension in a couple of ways:

- A plugin can be loaded and unloaded by the end user.
  If they do not desire the functionality they can simply 
  unload it.
- A plugin can not define config variables

METHODS

CanQuit

Returns 1. It is there for you to overwrite. It is called when you attempt to close the window or execute the quit command. Overwrite it to check for unsaved data and possibly veto these commands by returning a 0.

GetAppWindow

Returns a reference to the toplevel frame. The toplevel frame should be a Tk::AppWindow class.

Returns and empty list. It is there for you to overwrite. It is called by the Plugins extension. You can return a list with menu items here. For details on the format see Tk::AppWindow::Ext::MenuBar

Name

returns the module name of $self, without the path. So, if left uninherited, it returns 'Plugin'.

ReConfigure

Does nothing. It is called when the user clicks the Apply button in the settings dialog. Overwrite it to act on modified settings.

ToolItems

Returns and empty list. It is there for you to overwrite. It is called by the Plugins extension. You can return a list with menu items here. For details on the format see Tk::AppWindow::Ext::MenuBar

Quit

Does nothing. It is there for you to overwrite. Here you do everything needed to terminate.

UnLoad

Returns 1. For you to overwrite. Do here what needs to be done to safely destroy the plugin.

AUTHOR

Hans Jeuken (hanje at cpan dot org)

BUGS

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

SEE ALSO

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