The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Gtk2::ImageView::Browser - A image browser and widget based off of 'Gtk2::ImageView'

VERSION

Version 0.0.0

SYNOPSIS

    use Gtk2::ImageView::Browser;

    my $ivb = Gtk2::ImageView::Browser->new();
    ...

METHODES

new

    my $ivb = = Gtk2::ImageView::Browser->new();

dirchanged

A internal function that is called when a directory is double clicked on.

dotfiles

Determines if it should show files matching /^./ or not.

If a arguement is given, it will set it to that. The value is a perl boolean.

With out an arguement, it gets the current setting.

When the object is originally created, this defaults to 0.

    #don't displat dot files
    $ivb->dotfiles(0);

    #displat dot files
    $ivb->dotfiles(0);

    my $dotfiles=$ivb->dotfiles();

filechangedA

A internal function that is called when a file is double clicked on.

filechangedC

A internal function that is called when a file selection is changed.

fullscreen

Minimizes the sidebar, by setting HPaned to a position of 1. If the position of the the HPaned is greater than 1, it sets it to 1, else it sets it to a position of 230.

   $ivb->fullscreen;

fullscreenA

Called by the 'f' button.

next

This causes it to move to the next image. If there is no next image, it goes back to the first one.

    $ivb->next;

nextA

This is called by the 'n' button.

resize

This is called by various things when it is resized.

run

This calls invokes the windows methode and runs it.

    #starts it in the current directory
    my $ivb->run;

    #starts it in a different directory
    my $ivb->run('/arc/pics');

prev

This causes it to move to the previous image.

    $ivb->prev;

prevA

This is called by the 'p' button.

setdir

This sets the directory to the specified one.

    $ivb->setdir('/arc/pics');
    if($self->{error}){
        print "Error!\n";
    }

quit

This is called by the window created by run when it is closed.

widget

This returns the widget that contains it all.

If this is called manually, you will need to add the accel stuff to the windows you use for the hot keys to work.

    #starts it in the current directory
    my $widget=$ivb->widget();

    #starts it in '/arc/pics'
    my $widget=$ivb->widget('/arc/pics');
    
    #adds the accel stuff to the window for the hot keys to work.
    $window->add($ivb->{widget});
        $window->add_accel_group($ivb->{widgets}{accels});

window

This retuns a window with the widget in it.

    #starts it in the current direcotry
    my $window=$ivb->window();
    
    #starts it in '/arc/pics'
    my $window=$ivb->window('/arc/pics');

zoomchange

This is called when the zoom button is clicked.

zoomreset

This is called by the 'zr' button for resetting the zoom.

zoomget

This returns the current zoom type.

    my $zoom=$ivb->zoomget;

zoomset

This sets the zoom to a desired type.

    #sets the zoom type to fit it to width
    $ivb->zoomset('w')
    #this only happens if you set it to something it does not support
    if($ivb->{error}){
        print "Error!\n";
    }

    #reset the zoom of the current image to
    $ivb->zoomset;

errorblank

This blanks the error storage and is only meant for internal usage.

It does the following.

    $self->{error}=undef;
    $self->{errorString}="";

ERROR CODES

1

The file path specified does not exist.

2

Invalid zoom type.

HOT KEYS

control+f

Toggle minimizing of the sidebar.

control+r

Resize the image to what the zoom level should be.

control+z

Cycle zoom types.

control+up

Go to the previous image.

control+down

Go to the next image.

ZOOM TYPES

The current level will be displayed to the right of the equals sign on the zoom button or may be fetched using '$ivb->zoomget'.

w

This zooms it to the width of the image.

f

This zooms the image to fit the window.

1

This sets the zoom to 1.

AUTHOR

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

BUGS

Please report any bugs or feature requests to bug-gtk2-imageview-browser at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Gtk2-ImageView-Browser. 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::ImageView::Browser

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.