新規作成  編集  Ruby-GNOME2 Project Website  ページ一覧  検索  更新履歴  編集履歴  RSS  ログイン

Gtk::Calendar

Gtk::Calendar クラス

Gtk::Calendar is a widget that displays a 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#display_options.

The selected date can be retrieved from a Gtk::Calendar using Gtk::Calendar#date.

If performing many 'mark' operations, the calendar can be frozen to prevent flicker, using Gtk::Calendar#freeze, and 'thawed' again using Gtk::Calendar#thaw.

インクルードされているモジュール

  • Gtk::Buildable?
  • Atk::Implementor
  • GLib::Interface?

クラスメソッド

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

インスタンスメソッド

select_month(month, year)
Shifts the calendar to a different month.
  • month: a month number between 1 and 12.
  • year: the year the month is in.
  • Returns: self
select_day(day)
Selects a day from the current month.
  • day: the day number between 1 and 31, or 0 to unselect the currently selected day.
  • Returns: self
mark_day(day)
Places a visual marker on a particular day.
  • day: the day number to mark between 1 and 31.
  • Returns: self
unmark_day(day)
Removes the visual marker from a particular day.
  • day: the day number to unmark between 1 and 31.
  • Returns: self
clear_marks
Remove all visual markers.
  • Returns: self
display_options(flags)
Sets display options (whether to display the heading and the month headings).
date
Obtains the selected date from a Gtk::Calendar.
  • Returns: [year, month, day]
freeze
Locks the display of the calendar until it is thawed with Gtk::Calendar#thaw.
  • Returns: self
thaw
Defrosts a calendar; all the changes made since the last Gtk::Calendar#freeze are displayed.
display_options=()
要編集
set_display_options()
要編集
detail_height_rows=()
要編集
set_detail_height_rows()
要編集
detail_height_rows()
要編集
detail_width_chars=()
要編集
set_detail_width_chars()
要編集
detail_width_chars()
要編集
show_details=()
要編集
set_show_details()
要編集
show_details?()
要編集
show_week_numbers=()
要編集
set_show_week_numbers()
要編集
show_week_numbers?()
要編集
no_month_change=()
要編集
set_no_month_change()
要編集
no_month_change?()
要編集
show_day_names=()
要編集
set_show_day_names()
要編集
show_day_names?()
要編集
show_heading=()
要編集
set_show_heading()
要編集
show_heading?()
要編集
day=()
要編集
set_day()
要編集
day()
要編集
month=()
要編集
set_month()
要編集
month()
要編集
year=()
要編集
set_year()
要編集
year()
要編集

プロパティ

detail-height-rows:
要編集
detail-width-chars:
要編集
show-details:
要編集
show-week-numbers:
要編集
no-month-change:
要編集
show-day-names:
要編集
show-heading:
要編集
day:
要編集
month:
要編集
year:
要編集

定数

GtkCalendarDisplayOptions

NO_MONTH_CHANGE
Prevents the user from switching months with the calendar.
SHOW_DAY_NAMES
Specifies that three letter day descriptions should be present.
SHOW_HEADING
Specifies that the month and year should be displayed.
SHOW_WEEK_NUMBERS
Displays each week numbers of the current year, down the left side of the calendar.
WEEK_START_MONDAY
Starts the calendar week on Monday, instead of the default Sunday.

その他

SHOW_DETAILS (Gtk::Calendar::DisplayOptions)
要編集

更新履歴

  • 2014-06-15 クラスのメンバ項目でリストから漏れているものを追加。 - きたがわ
  • - Masao?
更新日時:2014/06/15 20:18:47
キーワード:
参照:[Ruby/GTK Object Hierarchy] [gtk2-tut-calendar] [Gtk::Calendar] [Ruby/GTK]