NAME
Gtk2::Ex::TimeEntry -- Widget for entering times
SYNOPSIS
use Gtk2::Ex::TimeEntry;
$te = Gtk2::Ex::TimeEntry->new (value => '13:00:00');
$te->set_value('1pm');
$te->get_value;
WIDGET HIERARCHY
Gtk2::Widget
Gtk2::Entry
Gtk2::Ex::TimeEntry
DESCRIPTION
Gtk2::Ex::TimeEntry
displays and edits a time in HH::MM PM format with some convienence functions.
Use the up and down keys to modify the invidual components of the value, and the left and right keys to navigate between them. Pressing up or down while the entire contents of the entry is selected (such as when you focus-in) modifies the value in 15 minute increments.
The time is stored in HH:MM:SS format (but display in HH:MM PM format). If you entry a value 24:00:00 or higher, it will loop back around t
You can also type a time into the entry into various formats, which will be parsed and then displayed in the entry in HH:MM PM format. Here are some examples of things you can enter into the widget and the resulting internal and display values.
INPUT VALUE DISPLAY 1 01:00:00 01:00 AM 10 10:00:00 10:00 AM 420 04:20:00 04:20 AM 4:20 04:20:00 04:20 AM 420pm 16:20:00 04:20 PM 04:20 PM 16:20:00 04:20 PM 30:20:00 04:20:00 04:20 AM
FUNCTIONS
$te = Gtk2::Ex::TimeEntry->new (key=>value,...)
-
Create and return a new DateSpinner widget. Optional key/value pairs set initial properties per
Glib::Object->new
. Eg.my $te = Gtk2::Ex::TimeEntry->new (value => '16:00:00');
$te->get_selected_component
-
Returns the currently selected component - any of hours, minutes, meridiem, all or an emptry string. An emptry string will be returned if the selection bounds contains more or less than 1 individual component, and will return all if all componentes are selected.
$te->set_selected_component($component)
-
Highlights the given component, which can then be edited by typing over it or pressing the arrow keys up or down. You can pass the values all, hours, minutes, meridiem, an emptry string, or undef.
$te->set_now
-
Set the widget value to the current time.
PROPERTIES
value
(string, default '')-
The current time format in ISO format HH:MM:SS. Can be set to an empty string for no time. When setting the value you, you may pass any acceptable value outlined in the widget description, but the time will always be stored in HH:MM:SS format.
SIGNALS
SEE ALSO
Gtk2::Ex::TimeEntry::CellRenderer
AUTHOR
Jeffrey Hallock <jeffrey dot hallock at gmail dot com>
BUGS
None known. Please send bugs to <jeffrey dot hallock at gmail dot org>. Patches and suggestions welcome.
LICENSE
Gtk2-Ex-TimeEntry is Copyright 2009 Jeffrey Hallock
Gtk2-Ex-TimeEntry is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Gtk2-Ex-TimeEntry 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with Gtk2-Ex-TimeEntry. If not, see http://www.gnu.org/licenses/.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 462:
=back doesn't take any parameters, but you said =back 4