NAME

ZConf::RSS::GUI::GTK - Providees the GTK backend for ZConf::RSS::GUI.

VERSION

Version 0.0.1

SYNOPSIS

use ZConf::RSS::GUI::GTK;

my $zcrssgtk = ZConf::RSS::GUI::GTK->new();
...

METHODS

new

args hash

obj

This is object returned by ZConf::RSS.

my $zcrssgtk=ZConf::RSS::GUI::GTK->new({obj=>$obj});
if($zcrssgtk->{error}){
     print "Error!\n";
}

addFeed

This calls a dialog for creating a new feed. It will also init Gtk2 and start it's main loop.

If GTK is already inited and you don't want the main loop exited, use addFeedDialog.

One agruement is accepted and it is the URL to set it to by default. If not specified, '' is used.

$zcrssgtk->addFeed('http://foo.bar/rss.xml');
if($zcrssgtk->{error}){
    print "Error!\n";
}

addFeedDialog

A dialog for adding a new feed.

One arguement is taken and it is a hash.

hash args

id

This is GUI ID to update after it is called. If this is not defined, no attempted to update it will be made.

url

This is the URL to set it to initially. If this is not defined, it is set to ''.

$zcrssgtk->addFeedDialog({
                         url=>'http://foo.bar/rss.xml',
                         })
if($zcrssgtk->{error}){
    print "Error!\n";
}

addTemplateDialog

A dialog for adding a new feed.

One arguement is taken and it is a the GUI ID for the manage VBox in question.

$zcrssgtk->addFeedDialog( $guiID );
if($zcrssgtk->{error}){
    print "Error!\n";
}

manage

Invokes the view window.

$zcrssgtk->manage;
if($zcrssgtk->{error}){
    print "Error!\n";
}

manageVBox

This creates a VBox for the manage GUI and returns the GUI ID of it.

args hash

disableQuit

If this is set to true, the quit selection under the misc functions menu will not be present.

    my $guiID=$zcrssgtk->manageVBox;
    if($zcrssgtk->{error}){
        print "Error!\n";
    }else{
 	    $window=Gtk2::Window->new;
	    $window->set_default_size(750, 400);
	    $window->set_title('ZConf::RSS: manage');
        $window->add($zcrssgtk->{gui}{$guiID}{vbox});
    }

manageWindow

This generates the manage window.

args hash

disableQuit

Do not show the quit selection in the menu.

quitOnClose

If the window is closed, quit the main GTK loop.

removeOnClose

Removes the GUI upon close.

Gtk2->init;
my $guiID=$zcrssgtk->manageWindow;
if($zcrssgtk->{error}){
    print "Error!\n";
}else{
    $zcrssgtk->{gui}{$guiID}{window}->show;
    $Gtk2->main;
}

modifyFeedDialog

This is the modifies the currently selected feed.

Only one arguement is required and it is GUI ID.

$zcrssgtk->modifyFeedDialog($guiID);
if($zcrssgtk->{error}){
    print "Error!\n";
}

removeFeedDialog

A dialog for adding a new feed.

One arguement is taken and it is the GUI ID.

$zcrssgtk->removeFeedDialog($guiID);
if($zcrssgtk->{error}){
    print "Error!\n";
}

removeTemplateDialog

A dialog for adding a new feed.

One arguement is taken and it is the GUI ID.

$zcrssgtk->removeTemplateDialog($guiID);
if($zcrssgtk->{error}){
    print "Error!\n";
}

view

Invokes the view window.

$zcrssgtk->view;
if($zcrssgtk->{error}){
    print "Error!\n";
}

viewVBox

This creates a VBox for the view GUI and returns the GUI ID of it.

args hash

disableQuit

If this is set to true, the quit selection under the misc functions menu will not be present.

    my $guiID=$zcrssgtk->viewVBox;
    if($zcrssgtk->{error}){
        print "Error!\n";
    }else{
	    $window=Gtk2::Window->new;
	    $window->set_default_size(750, 400);
	    $window->set_title('ZConf::RSS: view');
        $window->add($zcrssgtk->{gui}{$guiID}{vbox});
    }

viewWindow

This generates the view window.

args hash

disableQuit

Do not show the quit selection the menu.

quitOnClose

If the window is closed, quit the main GTK loop.

removeOnClose

Removes the GUI upon close.

Gtk2->init;
my $guiID=$zcrssgtk->viewWindow;
if($zcrssgtk->{error}){
    print "Error!\n";
}else{
    $zcrssgtk->{gui}{$guiID}{window}->show;
    $Gtk2->main;
}

updateFeed

This updates the updates the feed view.

$zcrssgtk->updateFeed($guiID);

updateFeedList

This updates the feed list.

$zcrssgtk->updateFeed($guiID);

updateTemplateList

This updates the template list for a manage window.

One arguement is required and it is a GUI ID for the manage window in question.

$zcrssgtk->updateTemplateList($guiID);
if($zcrssgtk->{error}){
    print "Error!\n";
}

updateTemplateText

This updates template text for the specified GUI ID.

$zcrssgtl->updateTemplateText($guiID);
if($zcrssgtk->{error}){
    print "Error!\n";
}

dialogs

This returns a array of available dialogs.

my @dialogs=$zcrssgtk->dialogs;
if($zcrssgtk->{error}){
    print "Error!\n";
}

windows

This returns a array of available dialogs.

my @windows=$zcrssGui->windows;
if($zcrssGui->{error}){
    print "Error!\n";
}

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

Failed to initiate ZConf::RSS.

2

Failed to initiate ZConf::GUI.

3

Adding the new feed failed.

4

No GUI ID specified.

5

Backend errored.

6

Removing the old feed for the purpose of renaming it failed.

WINDOWS

Please not that unless working directly and specifically with a backend, windows and dialogs are effectively the same in that they don't return until the window exits, generally.

add

This adds a new a new feed.

manage

This allows the RSS feeds to be managed along with the templates.

view

This allows the RSS feeds to be viewed.

AUTHOR

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

BUGS

Please report any bugs or feature requests to bug-zconf-devtemplate at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ZConf-RSS-GUI-GTK. 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 ZConf::RSS::GUI

You can also look for information at:

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.