SystemTray::Applet - OS agnostic system tray applets
Version 0.02
This code wraps existing gui toolkits and lets you create a system tray applet that doesn't require knowledge of the users toolkit.
use SystemTray::Applet; my $foo = SystemTray::Applet->new("text" => "hello world");
$applet = SystemTray::Applet->new( "text" => "hello world" );
This method looks for the highest priority plugin under the SystemTray::Applet namespace and passes the plugin name and any arguments passed in to create. This allows developers to use SystemTray::Applet to construct one of its system specific subclasses without knowing which ones may be installed.
If no plugins are found or object construction fails undef is returned.
$applet = System::Tray::Applet::CmdLine->create( "text" => "hello world" );
This method is the SystemTray applet constructor. It should not be called directly. It should be called via SystemTray::Applet->new or as a subclasses constructor e.g. SystemTray::Applet::Create->create();
The following arguments can be passed as name value pairs
Note : The callback does not need to call $self->display() or $self->schedule() as the module takes care of that.
If the object can not be constucted undef is returned.
$self->init();
Subclass specific init method for object initialization.
This should not be call directly as it is only used by system specific subclasses.
This should return true in subclasses.
$self->icon("foo.ico");
This method sets the objects icon by calling the system specific create icon method in the subclass
$self->create_icon();
Subclass specific create_icon method for creating an icon class used by the system specific gui code.
This should not be called directly as it is only provided by the system specific subclass.
$self->display();
Subclass specific display method for updating the GUI representation of the applet.
$self->schedule();
Subclass specific schedule method for scheduling the callback.
$self->start();
Subclass specific method for starting the gui up. This never returns.
Peter Sinnott, <psinnott at cpan.org>
<psinnott at cpan.org>
Please report any bugs or feature requests to bug-systemtray-applet at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SystemTray-Applet. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-systemtray-applet at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc SystemTray::Applet
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=SystemTray-Applet
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/SystemTray-Applet
CPAN Ratings
http://cpanratings.perl.org/d/SystemTray-Applet
Search CPAN
http://search.cpan.org/dist/SystemTray-Applet
Copyright 2008 Peter Sinnott, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install SystemTray::Applet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SystemTray::Applet
CPAN shell
perl -MCPAN -e shell install SystemTray::Applet
For more information on module installation, please visit the detailed CPAN module installation guide.