Class: Gtk::Calendar

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#clear_marksnil

Remove all visual markers.

Returns:

  • (nil)

#dayInteger

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:

  • (Integer)

    day

#day=(day) ⇒ Integer

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.

Parameters:

  • day (Integer)

Returns:

  • (Integer)

    day

  • (Integer)

    day

#detail_height_rowsInteger

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

Returns:

  • (Integer)

    detail-height-rows

#detail_height_rows=(detail_height_rows) ⇒ Integer

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

Parameters:

  • detail_height_rows (Integer)

Returns:

  • (Integer)

    detail-height-rows

  • (Integer)

    detail-height-rows

#detail_width_charsInteger

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

Returns:

  • (Integer)

    detail-width-chars

#detail_width_chars=(detail_width_chars) ⇒ Integer

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

Parameters:

  • detail_width_chars (Integer)

Returns:

  • (Integer)

    detail-width-chars

  • (Integer)

    detail-width-chars

#display_optionsGtk::CalendarDisplayOptions

Returns the current display options of calendar.

Returns:

#display_options=(flags) ⇒ nil

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

Parameters:

Returns:

  • (nil)

#get_date(year, month, day) ⇒ nil

Obtains the selected date from a Gtk::Calendar.

Parameters:

  • year (Integer)

    location to store the year as a decimal number (e.g. 2011), or nil

  • month (Integer)

    location to store the month number (between 0 and 11), or nil

  • day (Integer)

    location to store the day number (between 1 and 31), or nil

Returns:

  • (nil)

#get_day_is_marked(day) ⇒ TrueClass

Returns if the day of the calendar is already marked.

Parameters:

  • day (Integer)

    the day number between 1 and 31.

Returns:

  • (TrueClass)

    whether the day is marked.

#mark_day(day) ⇒ nil

Places a visual marker on a particular day.

Parameters:

  • day (Integer)

    the day number to mark between 1 and 31.

Returns:

  • (nil)

#monthInteger

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

Returns:

  • (Integer)

    month

#month=(month) ⇒ Integer

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

Parameters:

  • month (Integer)

Returns:

  • (Integer)

    month

  • (Integer)

    month

#newGtk::Widget

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

Returns:

#no_month_change=(no_month_change) ⇒ TrueClass

Determines whether the selected month can be changed.

Parameters:

  • no_month_change (TrueClass)

Returns:

  • (TrueClass)

    no-month-change

  • (TrueClass)

    no-month-change

#no_month_change?TrueClass

Determines whether the selected month can be changed.

Returns:

  • (TrueClass)

    no-month-change

#select_day(day) ⇒ nil

Selects a day from the current month.

Parameters:

  • day (Integer)

    the day number between 1 and 31, or 0 to unselect the currently selected day.

Returns:

  • (nil)

#select_month(month, year) ⇒ nil

Shifts the calendar to a different month.

Parameters:

  • month (Integer)

    a month number between 0 and 11.

  • year (Integer)

    the year the month is in.

Returns:

  • (nil)

#set_detail_func(func, data, destroy) ⇒ nil

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 Gtk::Calendar: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 Gtk::Calendar:show-details is not set.

The size of the details area can be restricted by setting the Gtk::Calendar:detail-width-chars and #GtkCalendar:detail-height-rows properties.

Parameters:

  • func (Gtk::CalendarDetailFunc)

    a function providing details for each day.

  • data (GObject)

    data to pass to func invokations.

  • destroy (GLib::DestroyNotify)

    a function for releasing data.

Returns:

  • (nil)

#show_day_names=(show_day_names) ⇒ TrueClass

Determines whether day names are displayed.

Parameters:

  • show_day_names (TrueClass)

Returns:

  • (TrueClass)

    show-day-names

  • (TrueClass)

    show-day-names

#show_day_names?TrueClass

Determines whether day names are displayed.

Returns:

  • (TrueClass)

    show-day-names

#show_details=(show_details) ⇒ TrueClass

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.

Parameters:

  • show_details (TrueClass)

Returns:

  • (TrueClass)

    show-details

  • (TrueClass)

    show-details

#show_details?TrueClass

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.

Returns:

  • (TrueClass)

    show-details

#show_heading=(show_heading) ⇒ TrueClass

Determines whether a heading is displayed.

Parameters:

  • show_heading (TrueClass)

Returns:

  • (TrueClass)

    show-heading

  • (TrueClass)

    show-heading

#show_heading?TrueClass

Determines whether a heading is displayed.

Returns:

  • (TrueClass)

    show-heading

#show_week_numbers=(show_week_numbers) ⇒ TrueClass

Determines whether week numbers are displayed.

Parameters:

  • show_week_numbers (TrueClass)

Returns:

  • (TrueClass)

    show-week-numbers

  • (TrueClass)

    show-week-numbers

#show_week_numbers?TrueClass

Determines whether week numbers are displayed.

Returns:

  • (TrueClass)

    show-week-numbers

#unmark_day(day) ⇒ nil

Removes the visual marker from a particular day.

Parameters:

  • day (Integer)

    the day number to unmark between 1 and 31.

Returns:

  • (nil)

#yearInteger

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

Returns:

  • (Integer)

    year

#year=(year) ⇒ Integer

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

Parameters:

  • year (Integer)

Returns:

  • (Integer)

    year

  • (Integer)

    year