| hildon-libs 0.14.11 Reference Manual |
|---|
HildonCalendarPopupHildonCalendarPopup — |
#define HILDON_CALENDAR_POPUP_TYPE GtkWidget* hildon_calendar_popup_new (GtkWindow *parent, guint year, guint month, guint day); void hildon_calendar_popup_set_date (HildonCalendarPopup *cal, guint year, guint month, guint day); void hildon_calendar_popup_get_date (HildonCalendarPopup *cal, guint *year, guint *month, guint *day);
seealso: HildonDateEditor, HildonTimeEditor
HildonCalendarPopup is a dialog which contains a GtkCalendar. It also contains arrow buttons for changing the month/year. If an entered date is invalid, an information message will be shown.
...
gint y, m, d;
GtkWidget *parent, *popup;
/* get current date
into &y, &m, &d... */
gtk_widget_get_ancestor(GTK_WIDGET(data), GTK_TYPE_WINDOW);
popup = hildon_calendar_popup_new(GTK_WINDOW (parent), y, m, d);
result = gtk_dialog_run(GTK_DIALOG(popup));
switch(result)
{
case GTK_RESPONSE_OK:
case GTK_RESPONSE_ACCEPT:
hildon_calendar_popup_get_date(HILDON_CALENDAR_POPUP(popup), &y, &m, &d);
/* here set the new date*/
}
gtk_widget_destroy(popup);
...
#define HILDON_CALENDAR_POPUP_TYPE HILDON_TYPE_CALENDAR_POPUP
HILDON_CALENDAR_POPUP_TYPE is deprecated and should not be used in newly-written code. use HILDON_TYPE_CALENDAR_POPUP instead
GtkWidget* hildon_calendar_popup_new (GtkWindow *parent,
guint year,
guint month,
guint day);
This function returns a new HildonCalendarPopup. The initially selected date is specified by the parameters (year, month, day). If the specified date is invalid, the current date is used.
parent : |
parent window for dialog |
year : |
initial year |
month : |
initial month |
day : |
initial day |
| Returns : | new HildonCalendarPopup widget
|
void hildon_calendar_popup_set_date (HildonCalendarPopup *cal,
guint year,
guint month,
guint day);
activates a new date on the calendar popup.
cal : |
the HildonCalendarPopup widget
|
year : |
year |
month : |
month |
day : |
day |
| << HildonSeekbar | HildonWeekdayPicker >> |