![]() |
![]() |
![]() |
hildon 2.0.6 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
HildonCalendarPopupHildonCalendarPopup — CalendarPopup allows choosing a date from a popup calendar. |
![]() |
HildonCalendarPopup; HildonCalendarPopupClass; 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 7. HildonCalendarPopup example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
... 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); ... |
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 window for dialog |
|
initial year |
|
initial month |
|
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.
|
the HildonCalendarPopup widget
|
|
year |
|
month |
|
day |
void hildon_calendar_popup_get_date (HildonCalendarPopup *cal
,guint *year
,guint *month
,guint *day
);
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.
|
the HildonCalendarPopup widget
|
|
year |
|
month |
|
day |