summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-02-13 17:53:42 +0100
committerTimm Bäder <mail@baedert.org>2020-02-15 17:18:26 +0100
commit43a9f9bd028dfd17c5c5d9c5b3dd77f6fbf3d08b (patch)
treea94757b36736970de6f8568732303ef679706a23 /gtk/gtkcalendar.c
parente5d83eea301cc253f712d5e7731a451ddd616666 (diff)
downloadgtk+-43a9f9bd028dfd17c5c5d9c5b3dd77f6fbf3d08b.tar.gz
calendar: Document style classes
Fixes #790
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r--gtk/gtkcalendar.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 6a67548648..0b13b5fe64 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -40,9 +40,6 @@
* 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().
*
@@ -50,6 +47,32 @@
* legal calendar in most countries, it was adopted progressively
* between 1582 and 1929. Display before these dates is likely to be
* historically incorrect.
+ *
+ * # CSS nodes
+ *
+ * |[<!-- language="plain" -->
+ * calendar.view
+ * ├── header
+ * │ ├── button
+ * │ ├── stack.month
+ * │ ├── button
+ * │ ├── button
+ * │ ├── label.year
+ * │ ╰── button
+ * ╰── grid
+ * ╰── label[.day-name][.week-number][.day-number][.other-month]
+ * ]|
+ *
+ * GtkCalendar has a main node with name calendar. It contains a subnode called header
+ * containing the widgets for switching between years and months.
+ *
+ * The grid subnode contains all day labels, including week numbers on the left (marked
+ * with the .week-number css class) and day names on top (marked with the .day-name
+ * css class).
+ *
+ * Day labels that belong to the previous or next month get the .other-month style class.
+ *
+ * Marked day labels get the :selected state assigned.
*/
#include "config.h"