Hildon Reference Manual | ||||
---|---|---|---|---|
HildonTimePicker; GtkWidget* hildon_time_picker_new (GtkWindow *parent); void hildon_time_picker_set_time (HildonTimePicker *picker, guint hours, guint minutes); void hildon_time_picker_get_time (HildonTimePicker *picker, guint *hours, guint *minutes);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----HildonTimePicker
HildonTimePicker is a dialog popup widget which lets the user set the time, using up/down arrows on hours and minutes. There are two arrows for minutes, so that minutes can be added also in 10 min increments.This widget is mainly used as a part of HildonTimeEditor implementation.
HildonTimePicker has been deprecated since Hildon 2.2 and should not be used in newly written code. See Migrating Time Widgets section to know how to migrate this deprecated widget.
Example 22. HildonTimePicker example
parent = gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_WINDOW); picker = hildon_time_picker_new (GTK_WINDOW (parent)); hildon_time_editor_get_time (editor, &h, &m, &s); hildon_time_picker_set_time( HILDON_TIME_PICKER( picker ), h, m ); result = gtk_dialog_run (GTK_DIALOG (picker)); switch (result) { case GTK_RESPONSE_OK: case GTK_RESPONSE_ACCEPT: hildon_time_picker_get_time(HILDON_TIME_PICKER (picker), &h, &m ); foo_set_time(h,m); break; default: break; } gtk_widget_destroy( picker );
typedef struct _HildonTimePicker HildonTimePicker;
HildonTimePicker
is deprecated and should not be used in newly-written code.
GtkWidget* hildon_time_picker_new (GtkWindow *parent);
hildon_time_picker_new
is deprecated and should not be used in newly-written code.
HildonTimePicker shows time picker dialog. The close button is placed in the dialog's action area and time picker is placed in dialogs vbox. The actual time picker consists of two GtkLabel fields - one for hours and one for minutes - and an AM/PM button. A colon (:) is placed between hour and minute fields.
parent : |
parent window |
Returns : | pointer to a new HildonTimePicker widget. |
void hildon_time_picker_set_time (HildonTimePicker *picker, guint hours, guint minutes);
hildon_time_picker_set_time
is deprecated and should not be used in newly-written code.
Sets the time of the HildonTimePicker widget.
picker : |
the HildonTimePicker widget |
hours : |
hours |
minutes : |
minutes |
void hildon_time_picker_get_time (HildonTimePicker *picker, guint *hours, guint *minutes);
hildon_time_picker_get_time
is deprecated and should not be used in newly-written code.
Gets the time of the HildonTimePicker widget.
picker : |
the HildonTimePicker widget |
hours : |
hours |
minutes : |
minutes |
"minutes"
property"minutes" guint : Read / Write
Currently selected time in minutes since midnight.
Allowed values: <= 1440
Default value: 0