Class

GtkCalendar

[]

Description [src]

class Gtk.Calendar : Gtk.Widget
  implements Atk.ImplementorIface, Gtk.Buildable {
  GtkCalendarPrivate* priv
}

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.

[]

Hierarchy

hierarchy this GtkCalendar implements_0 AtkImplementorIface this--implements_0 implements_1 GtkBuildable this--implements_1 ancestor_0 GtkWidget ancestor_0--this ancestor_1 GInitiallyUnowned ancestor_1--ancestor_0 ancestor_2 GObject ancestor_2--ancestor_1
[]

Constructors

gtk_calendar_new

Creates a new calendar, with the current date being selected.

[]

Instance methods

gtk_calendar_clear_marks

Remove all visual markers.

gtk_calendar_get_date

Obtains the selected date from a GtkCalendar.

gtk_calendar_get_day_is_marked

Returns if the day of the calendar is already marked.

since: 3.0

gtk_calendar_get_detail_height_rows

Queries the height of detail cells, in rows. See GtkCalendar:detail-width-chars.

since: 2.14

gtk_calendar_get_detail_width_chars

Queries the width of detail cells, in characters. See GtkCalendar:detail-width-chars.

since: 2.14

gtk_calendar_get_display_options

Returns the current display options of calendar.

since: 2.4

gtk_calendar_mark_day

Places a visual marker on a particular day.

gtk_calendar_select_day

Selects a day from the current month.

gtk_calendar_select_month

Shifts the calendar to a different month.

gtk_calendar_set_detail_func

Installs 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 GtkCalendar:show-details is set. A tooltip containing with full detail information is provided, if the entire text should not fit into the details area, or if GtkCalendar:show-details is not set.

since: 2.14

gtk_calendar_set_detail_height_rows

Updates the height of detail cells. See GtkCalendar:detail-height-rows.

since: 2.14

gtk_calendar_set_detail_width_chars

Updates the width of detail cells. See GtkCalendar:detail-width-chars.

since: 2.14

gtk_calendar_set_display_options

Sets display options (whether to display the heading and the month headings).

since: 2.4

gtk_calendar_unmark_day

Removes the visual marker from a particular day.

Methods inherited from GtkWidget (263)
Methods inherited from GObject (43)
Methods inherited from GtkBuildable (10)
[]

Properties

Gtk.Calendar:day

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.

Gtk.Calendar:detail-height-rows

Height of a detail cell, in rows. A value of 0 allows any width. See gtk_calendar_set_detail_func().

since: 2.14

Gtk.Calendar:detail-width-chars

Width of a detail cell, in characters. A value of 0 allows any width. See gtk_calendar_set_detail_func().

since: 2.14

Gtk.Calendar:month

The selected month (as a number between 0 and 11). This property gets initially set to the current month.

Gtk.Calendar:no-month-change

Determines whether the selected month can be changed.

since: 2.4

Gtk.Calendar:show-day-names

Determines whether day names are displayed.

since: 2.4

Gtk.Calendar:show-details

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.

since: 2.14

Gtk.Calendar:show-heading

Determines whether a heading is displayed.

since: 2.4

Gtk.Calendar:show-week-numbers

Determines whether week numbers are displayed.

since: 2.4

Gtk.Calendar:year

The selected year. This property gets initially set to the current year.

Properties inherited from GtkWidget (39)
[]

Signals

Gtk.Calendar::day-selected

Emitted when the user selects a day.

Gtk.Calendar::day-selected-double-click

Emitted when the user double-clicks a day.

Gtk.Calendar::month-changed

Emitted when the user clicks a button to change the selected month on a calendar.

Gtk.Calendar::next-month

Emitted when the user switched to the next month.

Gtk.Calendar::next-year

Emitted when user switched to the next year.

Gtk.Calendar::prev-month

Emitted when the user switched to the previous month.

Gtk.Calendar::prev-year

Emitted when user switched to the previous year.

Signals inherited from GtkWidget (69)
Signals inherited from GObject (1)

Class structure

[]

Virtual methods

Gtk.CalendarClass.day_selected
No description available.

Gtk.CalendarClass.month_changed
No description available.

Gtk.CalendarClass.next_month
No description available.

Gtk.CalendarClass.next_year
No description available.

Gtk.CalendarClass.prev_month
No description available.

Gtk.CalendarClass.prev_year
No description available.