hildon-libs 0.14.11 Reference Manual |
---|
HildonTimePickerHildonTimePicker — A dialog popup widget which lets the user set the time |
HildonTimePickerPrivate; 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);
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.
... 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 ); ...
GtkWidget* hildon_time_picker_new (GtkWindow *parent);
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);
Sets the time of the HildonTimePicker widget.
picker : |
the HildonTimePicker widget |
hours : |
hours |
minutes : |
minutes |
<< HildonWeekdayPicker | HildonGrid >> |