HildonDateEditor

HildonDateEditor — A widget which queries a date from user or opens a HildonCalendarPopup

Synopsis




#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);

Description

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);
..

Details

HILDON_DATE_EDITOR_TYPE

#define HILDON_DATE_EDITOR_TYPE HILDON_TYPE_DATE_EDITOR

Warning

HILDON_DATE_EDITOR_TYPE is deprecated and should not be used in newly-written code. use HILDON_TYPE_DATE_EDITOR instead


enum HildonDateEditorErrorType

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;


hildon_date_editor_new ()

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.

hildon_date_editor_set_date ()

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

hildon_date_editor_get_date ()

void        hildon_date_editor_get_date     (HildonDateEditor *date,
                                             guint *year,
                                             guint *month,
                                             guint *day);

date : the HildonDateEditor widget
year : year
month : month
day : day

hildon_date_editor_set_year ()

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

hildon_date_editor_set_month ()

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

hildon_date_editor_set_day ()

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

hildon_date_editor_get_year ()

guint       hildon_date_editor_get_year     (HildonDateEditor *editor);

editor : the HildonDateEditor widget
Returns : the current year shown in the editor.

hildon_date_editor_get_month ()

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.

hildon_date_editor_get_day ()

guint       hildon_date_editor_get_day      (HildonDateEditor *editor);

Gets the day shown in the editor.

editor : the HildonDateEditor widget
Returns : the current day shown in the editor

See Also

HildonCalendarPopup, HildonTimeEditor