hildon-libs 0.14.11 Reference Manual |
---|
HildonDateEditorHildonDateEditor — A widget which queries a date from user or opens a HildonCalendarPopup |
#define HILDON_DATE_EDITOR_TYPE enum HildonDateEditorErrorType; 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);
HildonDateEditor is a widget with three entry fields (day, month, year) and an icon (button): clicking on the icon opens up a HildonCalendarPopup.
gint y, m, d;
..
date_editor = hildon_date_editor_new()
;
..
hildon_date_editor_get_date(date_editor, &y, &m, &d);
..
#define HILDON_DATE_EDITOR_TYPE HILDON_TYPE_DATE_EDITOR
HILDON_DATE_EDITOR_TYPE
is deprecated and should not be used in newly-written code. use HILDON_TYPE_DATE_EDITOR instead
typedef enum { NO_ERROR = -1, MAX_DAY, MAX_MONTH, MAX_YEAR, MIN_DAY, MIN_MONTH, MIN_YEAR, EMPTY_DAY, EMPTY_MONTH, EMPTY_YEAR, INVALID_DATE, INVALID_CHAR }HildonDateEditorErrorType;
GtkWidget* hildon_date_editor_new (void);
Creates a new date editor. The current system date is shown in the editor.
Returns : | pointer to a new HildonDateEditor widget.
|
void hildon_date_editor_set_date (HildonDateEditor *date, guint year, guint month, guint day);
Sets the date shown in the editor.
date : |
the HildonDateEditor widget
|
year : |
year |
month : |
month |
day : |
day |
void hildon_date_editor_get_date (HildonDateEditor *date, guint *year, guint *month, guint *day);
date : |
the HildonDateEditor widget
|
year : |
year |
month : |
month |
day : |
day |
gboolean hildon_date_editor_set_year (HildonDateEditor *editor, guint year);
Sets the year shown in the editor.
editor : |
the HildonDateEditor widget
|
year : |
year |
Returns : | TRUE if the year is valid |
gboolean hildon_date_editor_set_month (HildonDateEditor *editor, guint month);
Sets the month shown in the editor.
editor : |
the HildonDateEditor widget
|
month : |
month |
Returns : | TRUE if the month is valid |
gboolean hildon_date_editor_set_day (HildonDateEditor *editor, guint day);
Sets the day shown in the editor.
editor : |
the HildonDateEditor widget
|
day : |
day |
Returns : | TRUE if the day is valid |
guint hildon_date_editor_get_year (HildonDateEditor *editor);
editor : |
the HildonDateEditor widget
|
Returns : | the current year shown in the editor. |
guint hildon_date_editor_get_month (HildonDateEditor *editor);
Gets the month shown in the editor.
editor : |
the HildonDateEditor widget
|
Returns : | the current month shown in the editor. |
<< HildonTimeEditor | Miscellaneous controls >> |