NAME

Gtk2::Ex::ICal::Recur - A widget for scheduling a recurring set of 'events' (events in the calendar sense). Like a meeting appointment for example, on all mondays and thursdays for the next 3 months. Kinda like Evolution or Outlook meeting schedule.

DESCRIPTION

SYNOPSIS

my $recur = Gtk2::Ex::ICal::Recur->new;
my $model = {
	'dtstart' => { 
		year => 2000,
		month  => 6,
		day    => 20,
	},
	'count' => 17,
	'freq' => 'yearly',
	'interval' => '5',
	'byweekno' => [1, -1],
	'byday' => ['su','fr', 'mo'],
};
$recur->set_model($model);

my $window = Gtk2::Window->new;
$window->signal_connect(destroy => sub { Gtk2->main_quit; });

my $vbox = Gtk2::VBox->new(FALSE);
my $hbox = Gtk2::HBox->new(FALSE);
my $preview = Gtk2::Button->new_from_stock('gtk-preview');
$preview->signal_connect('clicked' => 
	sub {
		$recur->update_preview;		
	}
);

my $done = Gtk2::Button->new_from_stock('gtk-done');
$done->signal_connect('clicked' => 
	sub {
		print Dumper $recur->get_model;
	}
);

METHODS

Gtk2::Ex::ICal::Recur->new()

Accepts no arguments. Returns the object.

Gtk2::Ex::ICal::Recur->set_model($model)

The model is designed based on the the ICal spec. Please look at the DateTime::Event::ICal. The structure of this hash is based on that module.

my $model = {
	'dtstart' => { 
		year => 2000,
		month  => 6,
		day    => 20,
	},
	'count' => 17,
	'freq' => 'yearly',
	'interval' => '5',
	'byweekno' => [1, -1],
	'byday' => ['su','fr', 'mo'],
};
$recur->set_model($model);

Gtk2::Ex::ICal::Recur->get_model()

Returns a model as described in the section above.

Gtk2::Ex::ICal::Recur->update_preview()

This method retrieves the model and sends it to an instance of DateTime::Event::ICal internally and gets a list of dates. The list is then displayed in a listview.

AUTHOR

Ofey Aikon, <ofey.aikon at gmail dot com>

BUGS

You tell me. Send me an email !

ACKNOWLEDGEMENTS

To the wonderful gtk-perl-list.

COPYRIGHT & LICENSE

Copyright 2004 Ofey Aikon, All Rights Reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation;

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.

SEE ALSO

DateTime::Event::ICal