1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 display a calendar and/or allow the user to select a date.
7 <!-- ##### SECTION Long_Description ##### -->
9 #GtkCalendar is a widget that displays a calendar, one month at a time.
10 It can be created with gtk_calendar_new().
13 The month and year currently displayed can be altered with
14 gtk_calendar_select_month(). The exact day can be selected from the displayed
15 month using gtk_calendar_select_day().
18 To place a visual marker on a particular day, use gtk_calendar_mark_day()
19 and to remove the marker, gtk_calendar_unmark_day().
20 Alternative, all marks can be cleared with gtk_calendar_clear_marks().
23 The way in which the calendar itself is displayed can be altered using
24 gtk_calendar_set_display_options().
27 The selected date can be retrieved from a #GtkCalendar using
28 gtk_calendar_get_date().
31 If performing many 'mark' operations, the calendar can be frozen to prevent
32 flicker, using gtk_calendar_freeze(), and 'thawed' again using
36 <!-- ##### SECTION See_Also ##### -->
41 <!-- ##### STRUCT GtkCalendar ##### -->
43 <structfield>num_marked_dates</structfield> is an integer containing the
44 number of days that have a mark over them.
47 <structfield>marked_date</structfield> is an array containing the day numbers
48 that currently have a mark over them.
51 <structfield>month</structfield>, <structfield>year</structfield>, and
52 <structfield>selected_day</structfield> contain the currently visible month,
53 year, and selected day respectively.
56 All of these fields should be considered read only, and everything in this
57 struct should only be modified using the functions provided below.
61 Note that <structfield>month</structfield> is zero-based (i.e it allowed values
62 are 0-11) while <structfield>selected_day</structfield> is one-based
63 (i.e. allowed values are 1-31).
68 <!-- ##### SIGNAL GtkCalendar::day-selected ##### -->
70 Emitted when the user selects a day.
73 @calendar: the object which received the signal.
75 <!-- ##### SIGNAL GtkCalendar::day-selected-double-click ##### -->
80 @calendar: the object which received the signal.
82 <!-- ##### SIGNAL GtkCalendar::month-changed ##### -->
84 Emitted when the user clicks a button to change the selected month on a
88 @calendar: the object which received the signal.
90 <!-- ##### SIGNAL GtkCalendar::next-month ##### -->
95 @calendar: the object which received the signal.
97 <!-- ##### SIGNAL GtkCalendar::next-year ##### -->
102 @calendar: the object which received the signal.
104 <!-- ##### SIGNAL GtkCalendar::prev-month ##### -->
109 @calendar: the object which received the signal.
111 <!-- ##### SIGNAL GtkCalendar::prev-year ##### -->
116 @calendar: the object which received the signal.
118 <!-- ##### ARG GtkCalendar:day ##### -->
123 <!-- ##### ARG GtkCalendar:month ##### -->
128 <!-- ##### ARG GtkCalendar:no-month-change ##### -->
133 <!-- ##### ARG GtkCalendar:show-day-names ##### -->
138 <!-- ##### ARG GtkCalendar:show-heading ##### -->
143 <!-- ##### ARG GtkCalendar:show-week-numbers ##### -->
148 <!-- ##### ARG GtkCalendar:year ##### -->
153 <!-- ##### ENUM GtkCalendarDisplayOptions ##### -->
155 These options can be used to influence the display and behaviour of a #GtkCalendar.
158 @GTK_CALENDAR_SHOW_HEADING: Specifies that the month and year should be displayed.
159 @GTK_CALENDAR_SHOW_DAY_NAMES: Specifies that three letter day descriptions should be present.
160 @GTK_CALENDAR_NO_MONTH_CHANGE: Prevents the user from switching months with the calendar.
161 @GTK_CALENDAR_SHOW_WEEK_NUMBERS: Displays each week numbers of the current year, down the left side
163 @GTK_CALENDAR_WEEK_START_MONDAY: Since GTK+ 2.4, this option is deprecated and ignored by GTK+.
164 The information on which day the calendar week starts is derived from the locale.
166 <!-- ##### FUNCTION gtk_calendar_new ##### -->
168 Creates a new calendar, with the current date being selected.
171 @Returns: a #GtkCalendar.
174 <!-- ##### FUNCTION gtk_calendar_select_month ##### -->
176 Shifts the calendar to a different month.
179 @calendar: a #GtkCalendar.
180 @month: a month number between 0 and 11.
181 @year: the year the month is in.
185 <!-- ##### FUNCTION gtk_calendar_select_day ##### -->
187 Selects a day from the current month.
190 @calendar: a #GtkCalendar.
191 @day: the day number between 1 and 31, or 0 to unselect
192 the currently selected day.
195 <!-- ##### FUNCTION gtk_calendar_mark_day ##### -->
197 Places a visual marker on a particular day.
200 @calendar: a #GtkCalendar.
201 @day: the day number to mark between 1 and 31.
205 <!-- ##### FUNCTION gtk_calendar_unmark_day ##### -->
207 Removes the visual marker from a particular day.
210 @calendar: a #GtkCalendar.
211 @day: the day number to unmark between 1 and 31.
215 <!-- ##### FUNCTION gtk_calendar_clear_marks ##### -->
217 Remove all visual markers.
220 @calendar: a #GtkCalendar.
223 <!-- ##### FUNCTION gtk_calendar_get_display_options ##### -->
232 <!-- ##### FUNCTION gtk_calendar_set_display_options ##### -->
241 <!-- ##### FUNCTION gtk_calendar_display_options ##### -->
243 Sets display options (whether to display the heading and the month headings).
246 @calendar: a #GtkCalendar.
247 @flags: the display options to set.
248 @Deprecated: Use gtk_calendar_set_display_options() instead
251 <!-- ##### FUNCTION gtk_calendar_get_date ##### -->
253 Obtains the selected date from a #GtkCalendar.
256 @calendar: a #GtkCalendar.
257 @year: location to store the year number.
258 @month: location to store the month number.
259 @day: location to store the day number.
262 <!-- ##### FUNCTION gtk_calendar_freeze ##### -->
264 Locks the display of the calendar until it is thawed with gtk_calendar_thaw().
267 @calendar: a #GtkCalendar.
270 <!-- ##### FUNCTION gtk_calendar_thaw ##### -->
272 Defrosts a calendar; all the changes made since the last
273 gtk_calendar_freeze() are displayed.
276 @calendar: a #GtkCalendar.