Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | gtk_calendar_new () |
void | gtk_calendar_select_day () |
void | gtk_calendar_mark_day () |
void | gtk_calendar_unmark_day () |
gboolean | gtk_calendar_get_day_is_marked () |
void | gtk_calendar_clear_marks () |
GDateTime * | gtk_calendar_get_date () |
gint | day | Read |
gint | month | Read |
gboolean | show-day-names | Read / Write |
gboolean | show-heading | Read / Write |
gboolean | show-week-numbers | Read / Write |
gint | year | Read |
void | day-selected | Run First |
void | next-month | Run First |
void | next-year | Run First |
void | prev-month | Run First |
void | prev-year | Run First |
GtkCalendar implements AtkImplementorIface, GtkBuildable and GtkConstraintTarget.
GtkCalendar is a widget that displays a Gregorian calendar, one month
at a time. It can be created with gtk_calendar_new()
.
The month and year currently displayed can be altered with
gtk_calendar_select_month()
. The exact day can be selected from the
displayed month using gtk_calendar_select_day()
.
To place a visual marker on a particular day, use gtk_calendar_mark_day()
and to remove the marker, gtk_calendar_unmark_day()
. Alternative, all
marks can be cleared with gtk_calendar_clear_marks()
.
The way in which the calendar itself is displayed can be altered using
gtk_calendar_set_display_options()
.
The selected date can be retrieved from a GtkCalendar using
gtk_calendar_get_date()
.
Users should be aware that, although the Gregorian calendar is the legal calendar in most countries, it was adopted progressively between 1582 and 1929. Display before these dates is likely to be historically incorrect.
GtkWidget *
gtk_calendar_new (void
);
Creates a new calendar, with the current date being selected.
void gtk_calendar_select_day (GtkCalendar *self
,GDateTime *date
);
Will switch to date
's year and month and select its day.
void gtk_calendar_mark_day (GtkCalendar *calendar
,guint day
);
Places a visual marker on a particular day.
void gtk_calendar_unmark_day (GtkCalendar *calendar
,guint day
);
Removes the visual marker from a particular day.
gboolean gtk_calendar_get_day_is_marked (GtkCalendar *calendar
,guint day
);
Returns if the day
of the calendar
is already marked.
void
gtk_calendar_clear_marks (GtkCalendar *calendar
);
Remove all visual markers.
“day”
property “day” gint
The selected day (as a number between 1 and 31, or 0 to unselect the currently selected day). This property gets initially set to the current day.
Owner: GtkCalendar
Flags: Read
Allowed values: [0,31]
Default value: 0
“month”
property “month” gint
The selected month (as a number between 0 and 11). This property gets initially set to the current month.
Owner: GtkCalendar
Flags: Read
Allowed values: [0,11]
Default value: 0
“show-day-names”
property “show-day-names” gboolean
Determines whether day names are displayed.
Owner: GtkCalendar
Flags: Read / Write
Default value: TRUE
“show-heading”
property “show-heading” gboolean
Determines whether a heading is displayed.
Owner: GtkCalendar
Flags: Read / Write
Default value: TRUE
“show-week-numbers”
property “show-week-numbers” gboolean
Determines whether week numbers are displayed.
Owner: GtkCalendar
Flags: Read / Write
Default value: FALSE
“day-selected”
signalvoid user_function (GtkCalendar *calendar, gpointer user_data)
Emitted when the user selects a day.
calendar |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“next-month”
signalvoid user_function (GtkCalendar *calendar, gpointer user_data)
Emitted when the user switched to the next month.
calendar |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“next-year”
signalvoid user_function (GtkCalendar *calendar, gpointer user_data)
Emitted when user switched to the next year.
calendar |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“prev-month”
signalvoid user_function (GtkCalendar *calendar, gpointer user_data)
Emitted when the user switched to the previous month.
calendar |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“prev-year”
signalvoid user_function (GtkCalendar *calendar, gpointer user_data)
Emitted when user switched to the previous year.
calendar |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First