Gtk2::Ex::Email::Compose - Presents a email compose window.
Version 0.1.0
use Gtk2::Ex::Email::Compose; use Gtk2; use Data::Dumper; Gtk2->init; my $ecw=Gtk2::Ex::Email::Compose->new; my $window=$ecw->window({title=>'some thing'}); my $addressVBox=$ecw->getAddressVBox; my $attachmentVBox=$ecw->getAttachmentVBox; $ecw->setAddressbookCB(sub{ use Data::Dumper; print Dumper($_[1]); }, { ecw=>$ecw, addresses=>$addressVBox, } ); $ecw->setCloseCB(sub{ use Data::Dumper; print Dumper($_[1]); }, { ecw=>$ecw, } ); $ecw->setDraftCB(sub{ use Data::Dumper; print Dumper($_[1]); }, { ecw=>$ecw, addresses=>$addressVBox, attachment=>$attachmentVBox } ); $ecw->setSendCB(sub{ use Data::Dumper; print Dumper($_[1]{addresses}); }, { ecw=>$ecw, addresses=>$addressVBox, attachment=>$attachmentVBox, } ); $ecw->setSpellcheckCB(sub{ use Data::Dumper; print Dumper($_[1]); }, { ecw=>$ecw, } ); Gtk2->main;
This initiates the object.
my $ecw=Gtk2::Ex::Email::Compose->new;
This gets the notebook created by Gtk2::Ex::Email::AAnotebook.
my $notebook=$ecw->getAAnotebook;
This gets the Gtk2::Ex::Email::AddressVBox object created by Gtk2::Ex::Email::AAnotebook.
my $addressVBox=$ecw->getAddressVBox;
This gets the Gtk2::Ex::Email::AttachmentVBox object created by Gtk2::Ex::Email::AAnotebook.
my $attachmentVBox=$ecw->getAttachmentVBox;
This gets the body.
my $body=$ecw->getBody;
This gets the subject.
my $subject=$ecw->getSubject;
This sets the callback for when the addressbook button is clicked.
Two options are taken. The first is the callback and the second is any data to be passed to the callback.
$ecw->setAddressbookCB(sub{ use Data::Dumper; print Dumper($_[1]); }, { ecw=>$ecw, } );
This sets the body.
One arguement is taken and that is the body to set. If it is not defined, '' will be used.
$ecw->setBody($body);
This sets the callback for when the close button is clicked.
$ecw->setCloseCB(sub{ use Data::Dumper; print Dumper($_[1]); }, { ecw=>$ecw, } );
This sets the callback for when the draft button is clicked.
$ecw->setDraftCB(sub{ use Data::Dumper; print Dumper($_[1]); }, { ecw=>$ecw, } );
This sets the callback for when the send button is clicked.
$ecw->setSendCB(sub{ use Data::Dumper; print Dumper($_[1]); }, { ecw=>$ecw, } );
This sets the callback for when the spell check button is clicked.
$ecw->setSpellcheckCB(sub{ use Data::Dumper; print Dumper($_[1]); }, { ecw=>$ecw, } );
This sets the subject.
One arguement is taken and that is the subject to set. If it is not defined, '' will be used.
my $subject=$ecw->getSubject('some subject');
This builds the compose window and returns a Gtk2::Window object.
One arguement is taken and it is a hash.
This is the hash that contains the addresses to pass to Gtk2::Ex::Email::AddressVBox->vbox.
If set to true, it displays the 'Addressbook' button.
The default is true.
If set to true, it displays the 'Close' button.
If set to true, it displays the 'Draft' button.
If set to true, it displays the 'Send' button.
If set to true, it displays the 'Spell Check' button.
This is the array that contains the files to pass to Gtk2::Ex::Email::AttachmentVBox->vbox.
If this is defined, the subject will be set to it.
The window title.
my $window=$ecm->window(\%args);
Zane C. Bowers, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please report any bugs or feature requests to bug-gtk2-ex-email-compose at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Gtk2-Ex-Email-Compose. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-gtk2-ex-email-compose at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Gtk2::Ex::Email::Compose
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Gtk2-Ex-Email-Compose
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Gtk2-Ex-Email-Compose
CPAN Ratings
http://cpanratings.perl.org/d/Gtk2-Ex-Email-Compose
Search CPAN
http://search.cpan.org/dist/Gtk2-Ex-Email-Compose/
Copyright 2009 Zane C. Bowers, 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 Gtk2::Ex::Email::Compose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gtk2::Ex::Email::Compose
CPAN shell
perl -MCPAN -e shell install Gtk2::Ex::Email::Compose
For more information on module installation, please visit the detailed CPAN module installation guide.