|  |  |  | hildon 2.1.24 Reference Manual |  | 
|---|---|---|---|---|
| HildonDateEditorHildonDateEditor — A widget which queries a date from user or opens a HildonCalendarPopup. |  | 
                    HildonDateEditor;
GtkWidget*          hildon_date_editor_new              (void);
void                hildon_date_editor_set_date         (HildonDateEditor *date,
                                                         guint year,
                                                         guint month,
                                                         guint day);
void                hildon_date_editor_get_date         (HildonDateEditor *date,
                                                         guint *year,
                                                         guint *month,
                                                         guint *day);
gboolean            hildon_date_editor_set_year         (HildonDateEditor *editor,
                                                         guint year);
gboolean            hildon_date_editor_set_month        (HildonDateEditor *editor,
                                                         guint month);
gboolean            hildon_date_editor_set_day          (HildonDateEditor *editor,
                                                         guint day);
guint               hildon_date_editor_get_year         (HildonDateEditor *editor);
guint               hildon_date_editor_get_month        (HildonDateEditor *editor);
guint               hildon_date_editor_get_day          (HildonDateEditor *editor);
  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----HildonDateEditor
"day" guint : Read / Write "max-year" guint : Read / Write "min-year" guint : Read / Write "month" guint : Read / Write "year" guint : Read / Write
HildonDateEditor is a widget with three entry fields (day, month, year) and an icon (button): clicking on the icon opens up a HildonCalendarPopup.
Example 18.
guint y, m, d;
GtkDialog *dialog;
GtkWidget *date_editor;
dialog = GTK_DIALOG (gtk_dialog_new ());
date_editor = hildon_date_editor_new ();
gtk_box_pack_start (GTK_BOX (dialog->vbox), gtk_label_new ("Choose a date"), FALSE, FALSE, 10);
gtk_box_pack_start (GTK_BOX (dialog->vbox), date_editor, FALSE, FALSE, 10);
gtk_dialog_add_button (dialog, "Close", GTK_RESPONSE_CANCEL);
gtk_widget_show_all (GTK_WIDGET (dialog));
gtk_dialog_run (dialog);
hildon_date_editor_get_date (HILDON_DATE_EDITOR (date_editor), &y, &m, &d);
g_debug ("Date: %u-%u-%u", y, m, d);
typedef struct _HildonDateEditor HildonDateEditor;
HildonDateEditor is deprecated and should not be used in newly-written code.
GtkWidget* hildon_date_editor_new (void);
hildon_date_editor_new is deprecated and should not be used in newly-written code.
Creates a new date editor. The current system date is shown in the editor.
| Returns : | pointer to a new HildonDateEditorwidget. | 
void hildon_date_editor_set_date (HildonDateEditor *date, guint year, guint month, guint day);
hildon_date_editor_set_date is deprecated and should not be used in newly-written code.
Sets the date shown in the editor.
| date: | the HildonDateEditorwidget | 
| year: | year | 
| month: | month | 
| day: | day | 
void hildon_date_editor_get_date (HildonDateEditor *date, guint *year, guint *month, guint *day);
hildon_date_editor_get_date is deprecated and should not be used in newly-written code.
Gets the date represented by the date editor. You can pass NULL to any of the pointers if you're not interested in obtaining it.
| date: | the HildonDateEditorwidget | 
| year: | year | 
| month: | month | 
| day: | day | 
gboolean hildon_date_editor_set_year (HildonDateEditor *editor, guint year);
hildon_date_editor_set_year is deprecated and should not be used in newly-written code.
Sets the year shown in the editor.
| editor: | the HildonDateEditorwidget | 
| year: | year | 
| Returns : | TRUE if the year is valid and has been set. | 
gboolean hildon_date_editor_set_month (HildonDateEditor *editor, guint month);
hildon_date_editor_set_month is deprecated and should not be used in newly-written code.
Sets the month shown in the editor.
| editor: | the HildonDateEditorwidget | 
| month: | month | 
| Returns : | TRUE if the month is valid and has been set. | 
gboolean hildon_date_editor_set_day (HildonDateEditor *editor, guint day);
hildon_date_editor_set_day is deprecated and should not be used in newly-written code.
Sets the day shown in the editor.
| editor: | the HildonDateEditorwidget | 
| day: | day | 
| Returns : | TRUE if the day is valid and has been set. | 
guint hildon_date_editor_get_year (HildonDateEditor *editor);
hildon_date_editor_get_year is deprecated and should not be used in newly-written code.
| editor: | the HildonDateEditorwidget | 
| Returns : | the current year shown in the editor. | 
guint hildon_date_editor_get_month (HildonDateEditor *editor);
hildon_date_editor_get_month is deprecated and should not be used in newly-written code.
Gets the month shown in the editor.
| editor: | the HildonDateEditorwidget | 
| Returns : | the current month shown in the editor. | 
guint hildon_date_editor_get_day (HildonDateEditor *editor);
hildon_date_editor_get_day is deprecated and should not be used in newly-written code.
Gets the day shown in the editor.
| editor: | the HildonDateEditorwidget | 
| Returns : | the current day shown in the editor | 
"max-year" property"max-year" guint : Read / Write
Maximum valid year.
Allowed values: [1,10000]
Default value: 2037
"min-year" property"min-year" guint : Read / Write
Minimum valid year.
Allowed values: [1,10000]
Default value: 1970
"month" property"month" guint : Read / Write
Current month.
Allowed values: [1,12]
Default value: 1
"date-error" signalgboolean user_function (HildonDateEditor *hildondateeditor, HildonDateTimeError arg1, gpointer user_data) : Run Last
| hildondateeditor: | the object which received the signal. | 
| arg1: | |
| user_data: | user data set when the signal handler was connected. | 
| Returns : |