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_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 <!-- ##### ENUM GtkCalendarDisplayOptions ##### -->
63 <informaltable pgwide=1 frame="none" role="enum">
64 <tgroup cols="2"><colspec colwidth="*"><colspec colwidth="8*">
68 <entry>GTK_CALENDAR_SHOW_HEADING</entry>
69 <entry>Specifies that the month and year should be displayed.</entry>
72 <entry>GTK_CALENDAR_SHOW_DAY_NAMES</entry>
73 <entry>Specifies that three letter day descriptions should be present.</entry>
76 <entry>GTK_CALENDAR_NO_MONTH_CHANGE</entry>
77 <entry>Prevents the user from switching months with the calendar.</entry>
80 <entry>GTK_CALENDAR_SHOW_WEEK_NUMBERS</entry>
81 <entry>Displays each week numbers of the current year, down the left side of
85 <entry>GTK_CALENDAR_WEEK_START_MONDAY</entry>
86 <entry>Starts the calendar week on Monday, instead of the default Sunday.</entry>
89 </tbody></tgroup></informaltable>
92 @GTK_CALENDAR_SHOW_HEADING:
93 @GTK_CALENDAR_SHOW_DAY_NAMES:
94 @GTK_CALENDAR_NO_MONTH_CHANGE:
95 @GTK_CALENDAR_SHOW_WEEK_NUMBERS:
96 @GTK_CALENDAR_WEEK_START_MONDAY:
98 <!-- ##### FUNCTION gtk_calendar_new ##### -->
100 Creates a new calendar, with the current date being selected.
103 @Returns: a #GtkCalendar.
106 <!-- ##### FUNCTION gtk_calendar_select_month ##### -->
108 Shifts the calendar to a different month.
111 @calendar: a #GtkCalendar.
112 @month: a month number.
113 @year: the year the month is in.
117 <!-- ##### FUNCTION gtk_calendar_select_day ##### -->
119 Selects a day from the current month.
122 @calendar: a #GtkCalendar.
123 @day: the day number to select.
126 <!-- ##### FUNCTION gtk_calendar_mark_day ##### -->
128 Places a visual marker on a particular day.
131 @calendar: a #GtkCalendar.
132 @day: the day number to mark.
136 <!-- ##### FUNCTION gtk_calendar_unmark_day ##### -->
138 Removes the visual marker from a particular day.
141 @calendar: a #GtkCalendar.
142 @day: the day number to unmark.
146 <!-- ##### FUNCTION gtk_calendar_clear_marks ##### -->
148 Remove all visual markers.
151 @calendar: a #GtkCalendar.
154 <!-- ##### FUNCTION gtk_calendar_display_options ##### -->
156 Sets display options (whether to display the heading and the month headings).
159 @calendar: a #GtkCalendar.
160 @flags: the display options to set.
163 <!-- ##### FUNCTION gtk_calendar_get_date ##### -->
165 Obtains the selected date from a #GtkCalendar.
168 @calendar: a #GtkCalendar.
169 @year: location to store the year number.
170 @month: location to store the month number.
171 @day: location to store the day number.
174 <!-- ##### FUNCTION gtk_calendar_freeze ##### -->
176 Locks the display of the calendar until it is thawed with gtk_calendar_thaw().
179 @calendar: a #GtkCalendar.
182 <!-- ##### FUNCTION gtk_calendar_thaw ##### -->
184 Defrosts a calendar; all the changes made since the last
185 gtk_calendar_freeze() are displayed.
188 @calendar: a #GtkCalendar.
191 <!-- ##### SIGNAL GtkCalendar::day-selected ##### -->
193 Emitted when the user selects a day.
196 @calendar: the object which received the signal.
198 <!-- ##### SIGNAL GtkCalendar::day-selected-double-click ##### -->
203 @calendar: the object which received the signal.
205 <!-- ##### SIGNAL GtkCalendar::month-changed ##### -->
207 Emitted when the user clicks a button to change the selected month on a
211 @calendar: the object which received the signal.
213 <!-- ##### SIGNAL GtkCalendar::next-month ##### -->
218 @calendar: the object which received the signal.
220 <!-- ##### SIGNAL GtkCalendar::next-year ##### -->
225 @calendar: the object which received the signal.
227 <!-- ##### SIGNAL GtkCalendar::prev-month ##### -->
232 @calendar: the object which received the signal.
234 <!-- ##### SIGNAL GtkCalendar::prev-year ##### -->
239 @calendar: the object which received the signal.