| hildon 2.1.42 Reference Manual | ||||
|---|---|---|---|---|
HildonCalendarPopupHildonCalendarPopup — CalendarPopup allows choosing a date from a popup calendar. |
![]() |
HildonCalendarPopup;
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);
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkWindow
+----GtkDialog
+----HildonCalendarPopup
"day" gint : Read / Write "max-year" guint : Write "min-year" guint : Write "month" gint : Read / Write "year" gint : Read / Write
HildonCalendarPopup is a dialog which contains a HildonCalendar. It also contains arrow buttons for changing the month/year. If an entered date is invalid, an information message will be shown.
Example 10. HildonCalendarPopup example
...
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);
...
typedef struct _HildonCalendarPopup HildonCalendarPopup;
HildonCalendarPopup is deprecated and should not be used in newly-written code.
GtkWidget* hildon_calendar_popup_new (GtkWindow *parent,
guint year,
guint month,
guint day);
hildon_calendar_popup_new is deprecated and should not be used in newly-written code.
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);
hildon_calendar_popup_set_date is deprecated and should not be used in newly-written code.
Activates a new date on the calendar popup.
cal : |
the HildonCalendarPopup widget
|
year : |
year |
month : |
month |
day : |
day |
void hildon_calendar_popup_get_date (HildonCalendarPopup *cal, guint *year, guint *month, guint *day);
hildon_calendar_popup_get_date is deprecated and should not be used in newly-written code.
Gets the currently selected year, month, and day. It's possible to pass NULL to any of the pointers if you don't need that data.
cal : |
the HildonCalendarPopup widget
|
year : |
year |
month : |
month |
day : |
day |