NAME

Gtk2::Ex::Email::Compose - Presents a email compose window.

VERSION

Version 0.1.0

SYNOPSIS

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;

METHODS

new

This initiates the object.

my $ecw=Gtk2::Ex::Email::Compose->new;

getAAnotebook

This gets the notebook created by Gtk2::Ex::Email::AAnotebook.

my $notebook=$ecw->getAAnotebook;

getAddressVBox

This gets the Gtk2::Ex::Email::AddressVBox object created by Gtk2::Ex::Email::AAnotebook.

my $addressVBox=$ecw->getAddressVBox;

getAttachmentVBox

This gets the Gtk2::Ex::Email::AttachmentVBox object created by Gtk2::Ex::Email::AAnotebook.

my $attachmentVBox=$ecw->getAttachmentVBox;

getBody

This gets the body.

my $body=$ecw->getBody;

getSubject

This gets the subject.

my $subject=$ecw->getSubject;

setAddressbookCB

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,
                          }
                       );

setBody

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);

setCloseCB

This sets the callback for when the close 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->setCloseCB(sub{
                     use Data::Dumper;
                     print Dumper($_[1]);
                    },
                    {
                     ecw=>$ecw,
                    }
                 );

setDraftCB

This sets the callback for when the draft 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->setDraftCB(sub{
                     use Data::Dumper;
                     print Dumper($_[1]);
                    },
                    {
                     ecw=>$ecw,
                    }
                  );

setSendCB

This sets the callback for when the send 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->setSendCB(sub{
                    use Data::Dumper;
                    print Dumper($_[1]);
                   },
                   {
                    ecw=>$ecw,
                   }
                 );

setSpellcheckCB

This sets the callback for when the spell check 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->setSpellcheckCB(sub{
                    use Data::Dumper;
                    print Dumper($_[1]);
                   },
                   {
                    ecw=>$ecw,
                   }
                 );

setSubject

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');

window

This builds the compose window and returns a Gtk2::Window object.

One arguement is taken and it is a hash.

hash args

addresses

This is the hash that contains the addresses to pass to Gtk2::Ex::Email::AddressVBox->vbox.

displayAddressbook

If set to true, it displays the 'Addressbook' button.

The default is true.

displayClose

If set to true, it displays the 'Close' button.

The default is true.

displayDraft

If set to true, it displays the 'Draft' button.

The default is true.

displaySend

If set to true, it displays the 'Send' button.

The default is true.

displaySpellcheck

If set to true, it displays the 'Spell Check' button.

The default is true.

files

This is the array that contains the files to pass to Gtk2::Ex::Email::AttachmentVBox->vbox.

subject

If this is defined, the subject will be set to it.

title

The window title.

my $window=$ecm->window(\%args);

AUTHOR

Zane C. Bowers, <vvelox at vvelox.net>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Gtk2::Ex::Email::Compose

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

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.