Gtk2::Ex::Email::AttachmentVBox - Creates a VBox for handling attachments.


Gtk2-Ex-Email-AttachmentVBox documentation  | view source Contained in the Gtk2-Ex-Email-AttachmentVBox distribution.

Index


NAME

Top

Gtk2::Ex::Email::AttachmentVBox - Creates a VBox for handling attachments.

VERSION

Top

Version 0.0.0

SYNOPSIS

Top

    use Gtk2::Ex::Email::AttachmentVBox;
    use Gtk2;
    use Data::Dumper;

    Gtk2->init;

    #init it
    my $avb=Gtk2::Ex::Email::AddressVBox->new();

    #get the VBox and add it
    my $vbox=Gtk2::VBox->new;
    $vbox->show;
    my $vbox2=$avb->vbox;
    $vbox->pack_start($vbox2, 1, 1, 1);

    #adds a button that calls getFiles
    my $button=Gtk2::Button->new;
    $button->show;
    my $buttonLabel=Gtk2::Label->new('get files');
    $buttonLabel->show;
    $button->add($buttonLabel);
    $vbox->pack_start($button, 1, 1, 1);
    $button->signal_connect(activated=>{
	    								my @files=$avb->getFiles;
		    							print Dumper(\@files);
			    						}
				    		);

    #add the VBox to the window
    my $window=Gtk2::Window->new;
    $window->add($vbox);
    $window->show;

    #run it
    Gtk2->main;

METHODS

Top

new

This initiates the object.

    my $avb=Gtk2::Ex::Email::AttachmentVBox->new();

addFile

This adds a file to the list.

One arguement is required and it is the file to add.

If it fails, it returns undef, otherwise '1'.

    my $returned=$avb->addFile($someFile);
    if(!$returned){
        print "Error!\n";
    }

addFileDialog

This calls Gtk2::FileChooserDialog and the file to the list.

A return of undef means the user canceled. A return of '1' means a file was added.

    my $returned=$avb->addFileDialog;
    if($returned){
        print "added a file\n";
    }else{
        print "user canceled\n";
    }

getFiles

Gets a list of the files that should be attached.

    my @files=$avb->getFiles;

removeSelected

This removes the currently selected file from the list.

    my $returned=$avb->removeSelected;
    if($returned){
        print "removed\n";
    }else{
        print "nothing selected\n";
    }

vbox

This creates the VBox that contains the widgets.

One arguement is taken and it is a array of files to initially attach.

    $avb->vbox(\@files);

AUTHOR

Top

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

BUGS

Top

Please report any bugs or feature requests to bug-gtk2-ex-email-attachmentvbox at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Gtk2-Ex-Email-AttachmentVBox. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

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

    perldoc Gtk2::Ex::Email::AttachmentVBox




You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Gtk2-Ex-Email-AttachmentVBox

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Gtk2-Ex-Email-AttachmentVBox

* CPAN Ratings

http://cpanratings.perl.org/d/Gtk2-Ex-Email-AttachmentVBox

* Search CPAN

http://search.cpan.org/dist/Gtk2-Ex-Email-AttachmentVBox/

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


Gtk2-Ex-Email-AttachmentVBox documentation  | view source Contained in the Gtk2-Ex-Email-AttachmentVBox distribution.