![]() |
![]() |
![]() |
GPE Manual: libgpewidget Reference | ![]() |
---|---|---|---|---|
Top | Description |
GtkDateCombo; GtkWidget * gtk_date_combo_new (void); void gtk_date_combo_set_date (GtkDateCombo *, guint year, guint month, guint day); void gtk_date_combo_clear (GtkDateCombo *dp); void gtk_date_combo_week_starts_monday (GtkDateCombo *, gboolean ); void gtk_date_combo_ignore_year (GtkDateCombo *, gboolean );
The GtkDateCombo widget is used to display a formated date value. The display format used for the date depends on the locale setting. Additionally this widget provides a calendar popup for easy value changes. Direct editing of the date value in the display entry of the widget is supported too.
typedef struct { GtkHBox hbox; GtkWidget *cal; GtkWidget *calw; GtkWidget *entry; GtkWidget *button; gboolean cal_open; guint year, month, day; gboolean set; gboolean ignore_year; } GtkDateCombo;
GtkWidget * gtk_date_combo_new (void);
Creates a new GtkDateCombo widget.
Returns : |
New Widget |
void gtk_date_combo_set_date (GtkDateCombo *, guint year, guint month, guint day);
Set the date of a GtkDateCombo widget. The date is defined with three separate values representating year, month and date.
|
Widget |
|
Year value to set |
|
Month value |
|
Day |
void gtk_date_combo_clear (GtkDateCombo *dp);
Remove all settings/values from a date combo.
|
Widget |
void gtk_date_combo_week_starts_monday (GtkDateCombo *, gboolean );
This method changes the display behaviour of the calendar popup. It will display a week starting sunday if set to FALSE, if set to TRUE weeks will be displayed starting monday.
|
Widget |
|
TRUE to have weeks starting monday, FALSE otherwise. |
void gtk_date_combo_ignore_year (GtkDateCombo *, gboolean );
If this function is enabled the widget will show and take dates without a year value. This is used for recurring events like holidays and birthdays. Default behaviour is to have dates including a year.
|
Widget |
|
TRUE to enable, FALSE to disable |