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

Gtk::FontSelection

Gtk::FontSelection クラス

The Gtk::FontSelection widget lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the Gtk::FontSelectionDialog widget to provide a dialog box for selecting fonts. To set the font which is initially selected, use Gtk::FontSelection#font_name=. To get the selected font use Gtk::FontSelection#font_name. To change the text which is shown in the preview area, use Gtk::FontSelection#preview_text=.

Filters can be used to limit the fonts shown. There are 2 filters in the Gtk::FontSelection - a base filter and a user filter. The base filter can not be changed by the user, so this can be used when the user must choose from the restricted set of fonts (e.g. for a terminal-type application you may want to force the user to select a fixed-width font). The user filter can be changed or reset by the user, by using the 'Reset Filter' button or changing the options on the 'Filter' page of the widget.

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

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

インスタンスメソッド

font_name
Gets the currently-selected font name.
  • Returns: the font name.
font_name=(name)
Sets the currently-selected font.
  • name : a fontname.
  • Returns: name
set_font_name
Same as Gtk::FontSelection#font_name=.
  • name : a fontname.
  • Returns: self
preview_text
Gets the text displayed in the preview area.
  • Returns: the text displayed in the preview area.
preview_text=(text)
Sets the text displayed in the preview area.
  • text: the text to display in the preview area.
set_preview_text(text)
Same as Gtk::FontSelection#preview_text=.
  • text: the text to display in the preview area.

プロパティ

font: #<Class 0lxa2d3158> (Read)
The Gdk::Font? that is currently selected
font-name: String (Read/Write)
The X string that represents this font
preview-text: String (Read/Write)
The text to display in order to demonstrate the selected font

更新履歴

  • 2014-06-16 インクルードされているモジュールの項目を追加。 - きたがわ
  • - Masao?
更新日時:2014/06/16 08:12:31
キーワード:
参照:[Gtk::FontSelection] [Ruby/GTK] [Ruby/GTK Object Hierarchy] [Gtk::FontSelectionDialog]