Hildon Reference Manual | ||||
---|---|---|---|---|
#include <hildon/hildon.h> HildonDateSelector; GtkWidget* hildon_date_selector_new (void); GtkWidget* hildon_date_selector_new_with_year_range (gint min_year, gint max_year); gboolean hildon_date_selector_select_month (HildonDateSelector *selector, guint month, guint year); void hildon_date_selector_select_day (HildonDateSelector *selector, guint day); gboolean hildon_date_selector_select_current_date (HildonDateSelector *selector, guint year, guint month, guint day); void hildon_date_selector_get_date (HildonDateSelector *selector, guint *year, guint *month, guint *day);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----HildonTouchSelector +----HildonDateSelector
"max-year" gint : Read / Write / Construct Only "min-year" gint : Read / Write / Construct Only
HildonDateSelector is a date widget with multiple columns. Users can choose a date by selecting values in the day, month and year columns.
The currently selected month and year can be altered with
hildon_date_selector_select_month()
. The day can be selected from
the active month using hildon_date_selector_select_day()
.
GtkWidget* hildon_date_selector_new (void);
Creates a new HildonDateSelector
Returns : | a new HildonDateSelector |
Since 2.2
GtkWidget* hildon_date_selector_new_with_year_range (gint min_year, gint max_year);
Creates a new HildonDateSelector with a specific year range.
If min_year
or max_year
are set to -1, then the default
upper or lower bound will be used, respectively.
min_year : |
the minimum available year or -1 to ignore |
max_year : |
the maximum available year or -1 to ignore |
Returns : | a new HildonDateSelector |
Since 2.2
gboolean hildon_date_selector_select_month (HildonDateSelector *selector, guint month, guint year);
Modify the current month and year on the current active date
Utility function to keep this API similar to the previously existing HildonCalendar widget.
selector : |
the HildonDateSelector |
month : |
the current month (0-11) |
year : |
the current year |
Returns : | TRUE on success, FALSE otherwise
|
Since 2.2
void hildon_date_selector_select_day (HildonDateSelector *selector, guint day);
Modify the current day on the current active date
Utility function to keep this API similar to the previously existing HildonCalendar widget.
selector : |
the HildonDateSelector |
day : |
the current day (between 1 and 31) |
Since 2.2
gboolean hildon_date_selector_select_current_date (HildonDateSelector *selector, guint year, guint month, guint day);
Sets the current active date on the HildonDateSelector widget
selector : |
the HildonDateSelector |
year : |
the current year |
month : |
the current month (between 0 and 11) |
day : |
the current day (between 1 and 31) |
Returns : | TRUE on success, FALSE otherwise
|
Since 2.2
void hildon_date_selector_get_date (HildonDateSelector *selector, guint *year, guint *month, guint *day);
Gets the current active date on the HildonDateSelector widget
selector : |
the HildonDateSelector |
year : |
location of the current year, or NULL |
month : |
location of the current month (between 0 and 11), or NULL |
day : |
location of the current day (between 1 and 31), or NULL |
Since 2.2
"max-year"
property"max-year" gint : Read / Write / Construct Only
The maximum available year in the selector.
Allowed values: [1900,2100]
Default value: 2037
"min-year"
property"min-year" gint : Read / Write / Construct Only
The minimum available year in the selector.
Allowed values: [1900,2100]
Default value: 1970