gtk.calendar

Module for [Calendar] class

Types 3

#GtkCalendar is a widget that displays a Gregorian calendar, one month at a time. It can be created with gtk.calendar.Calendar.new_.

The month and year currently displayed can be altered with gtk.calendar.Calendar.selectMonth. The exact day can be selected from the displayed month using gtk.calendar.Calendar.selectDay.

To place a visual marker on a particular day, use gtk.calendar.Calendar.markDay and to remove the marker, gtk.calendar.Calendar.unmarkDay. Alternative, all marks can be cleared with gtk.calendar.Calendar.clearMarks.

The way in which the calendar itself is displayed can be altered using gtk.calendar.Calendar.setDisplayOptions.

The selected date can be retrieved from a #GtkCalendar using gtk.calendar.Calendar.getDate.

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.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Calendar self() nothrowReturns `this`, for use in `with` statements.
CalendarGidBuilder builder() static nothrowGet builder for [gtk.calendar.Calendar] Returns: New builder object
int day() @property nothrowGet `day` property. Returns: 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.
void day(int propval) @property nothrowSet `day` property. Params: propval = 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.
int detailHeightRows() @property nothrowGet `detailHeightRows` property. Returns: Height of a detail cell, in rows. A value of 0 allows any width. See [gtk.calendar.Calendar.setDetailFunc].
void detailHeightRows(int propval) @property nothrowSet `detailHeightRows` property. Params: propval = Height of a detail cell, in rows. A value of 0 allows any width. See [gtk.calendar.Calendar.setDetailFunc].
int detailWidthChars() @property nothrowGet `detailWidthChars` property. Returns: Width of a detail cell, in characters. A value of 0 allows any width. See [gtk.calendar.Calendar.setDetailFunc].
void detailWidthChars(int propval) @property nothrowSet `detailWidthChars` property. Params: propval = Width of a detail cell, in characters. A value of 0 allows any width. See [gtk.calendar.Calendar.setDetailFunc].
int month() @property nothrowGet `month` property. Returns: The selected month (as a number between 0 and 11). This property gets initially set to the current month.
void month(int propval) @property nothrowSet `month` property. Params: propval = The selected month (as a number between 0 and 11). This property gets initially set to the current month.
bool noMonthChange() @property nothrowGet `noMonthChange` property. Returns: Determines whether the selected month can be changed.
void noMonthChange(bool propval) @property nothrowSet `noMonthChange` property. Params: propval = Determines whether the selected month can be changed.
bool showDayNames() @property nothrowGet `showDayNames` property. Returns: Determines whether day names are displayed.
void showDayNames(bool propval) @property nothrowSet `showDayNames` property. Params: propval = Determines whether day names are displayed.
bool showDetails() @property nothrowGet `showDetails` property. Returns: Determines whether details are shown directly in the widget, or if they are available only as tooltip. When this property is set days with details are marked.
void showDetails(bool propval) @property nothrowSet `showDetails` property. Params: propval = Determines whether details are shown directly in the widget, or if they are available only as tooltip. When this property is set days with details are ...
bool showHeading() @property nothrowGet `showHeading` property. Returns: Determines whether a heading is displayed.
void showHeading(bool propval) @property nothrowSet `showHeading` property. Params: propval = Determines whether a heading is displayed.
bool showWeekNumbers() @property nothrowGet `showWeekNumbers` property. Returns: Determines whether week numbers are displayed.
void showWeekNumbers(bool propval) @property nothrowSet `showWeekNumbers` property. Params: propval = Determines whether week numbers are displayed.
int year() @property nothrowGet `year` property. Returns: The selected year. This property gets initially set to the current year.
void year(int propval) @property nothrowSet `year` property. Params: propval = The selected year. This property gets initially set to the current year.
void clearMarks() nothrowRemove all visual markers.
void getDate(out uint year, out uint month, out uint day) nothrowObtains the selected date from a #GtkCalendar.
bool getDayIsMarked(uint day) nothrowReturns if the day of the calendar is already marked.
int getDetailHeightRows() nothrowQueries the height of detail cells, in rows. See #GtkCalendar:detail-width-chars. Returns: The height of detail cells, in rows.
int getDetailWidthChars() nothrowQueries the width of detail cells, in characters. See #GtkCalendar:detail-width-chars. Returns: The width of detail cells, in characters.
gtk.types.CalendarDisplayOptions getDisplayOptions() nothrowReturns the current display options of calendar. Returns: the display options.
void markDay(uint day) nothrowPlaces a visual marker on a particular day.
void selectDay(uint day) nothrowSelects a day from the current month.
void selectMonth(uint month, uint year) nothrowShifts the calendar to a different month.
void setDetailFunc(gtk.types.CalendarDetailFunc func) nothrowInstalls a function which provides Pango markup with detail information for each day. Examples for such details are holidays or appointments. That information is shown below each day when #GtkCalen...
void setDetailHeightRows(int rows) nothrowUpdates the height of detail cells. See #GtkCalendar:detail-height-rows.
void setDetailWidthChars(int chars) nothrowUpdates the width of detail cells. See #GtkCalendar:detail-width-chars.
void setDisplayOptions(gtk.types.CalendarDisplayOptions flags) nothrowSets display options (whether to display the heading and the month headings).
void unmarkDay(uint day) nothrowRemoves the visual marker from a particular day.
gulong connectDaySelected(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.calendar.Calendar))) && Parameters!T.length < 2) nothrowConnect to `DaySelected` signal.
gulong connectDaySelectedDoubleClick(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.calendar.Calendar))) && Parameters!T.length < 2) nothrowConnect to `DaySelectedDoubleClick` signal.
gulong connectMonthChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.calendar.Calendar))) && Parameters!T.length < 2) nothrowConnect to `MonthChanged` signal.
gulong connectNextMonth(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.calendar.Calendar))) && Parameters!T.length < 2) nothrowConnect to `NextMonth` signal.
gulong connectNextYear(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.calendar.Calendar))) && Parameters!T.length < 2) nothrowConnect to `NextYear` signal.
gulong connectPrevMonth(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.calendar.Calendar))) && Parameters!T.length < 2) nothrowConnect to `PrevMonth` signal.
gulong connectPrevYear(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.calendar.Calendar))) && Parameters!T.length < 2) nothrowConnect to `PrevYear` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new calendar, with the current date being selected. Returns: a newly #GtkCalendar widget

Fluent builder implementation template for gtk.calendar.Calendar

Methods
T day(int propval) nothrowSet `day` property. Params: propval = 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. Returns: Bui...
T detailHeightRows(int propval) nothrowSet `detailHeightRows` property. Params: propval = Height of a detail cell, in rows. A value of 0 allows any width. See [gtk.calendar.Calendar.setDetailFunc]. Returns: Builder instance for fluent c...
T detailWidthChars(int propval) nothrowSet `detailWidthChars` property. Params: propval = Width of a detail cell, in characters. A value of 0 allows any width. See [gtk.calendar.Calendar.setDetailFunc]. Returns: Builder instance for flu...
T month(int propval) nothrowSet `month` property. Params: propval = The selected month (as a number between 0 and 11). This property gets initially set to the current month. Returns: Builder instance for fluent chaining
T noMonthChange(bool propval) nothrowSet `noMonthChange` property. Params: propval = Determines whether the selected month can be changed. Returns: Builder instance for fluent chaining
T showDayNames(bool propval) nothrowSet `showDayNames` property. Params: propval = Determines whether day names are displayed. Returns: Builder instance for fluent chaining
T showDetails(bool propval) nothrowSet `showDetails` property. Params: propval = Determines whether details are shown directly in the widget, or if they are available only as tooltip. When this property is set days with details are ...
T showHeading(bool propval) nothrowSet `showHeading` property. Params: propval = Determines whether a heading is displayed. Returns: Builder instance for fluent chaining
T showWeekNumbers(bool propval) nothrowSet `showWeekNumbers` property. Params: propval = Determines whether week numbers are displayed. Returns: Builder instance for fluent chaining
T year(int propval) nothrowSet `year` property. Params: propval = The selected year. This property gets initially set to the current year. Returns: Builder instance for fluent chaining

Fluent builder for gtk.calendar.Calendar

Methods
Calendar build() nothrowCreate object from builder. Returns: New object