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

Gtk::ColorButton

Gtk::ColorButton クラス

The Gtk::ColorButton is a button which displays the currently selected color an allows to open a color selection dialog to change the color. It is suitable widget for selecting a color in a preference dialog.

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

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

クラスメソッド

Gtk::ColorButton.new(color = nil)
Creates a new color button. This returns a widget in the form of a small button containing a swatch representing the current selected color. When the button is clicked, a color-selection dialog will open, allowing the user to select a color. The swatch will be updated to reflect the new color when the user finishes. Since 2.4
  • color: A Gdk::Color to set the current color with.
  • Returns: a new color button.

インスタンスメソッド

color
Gets the current color. Since 2.4
color=(color)
Sets the current color. Since 2.4
set_color(color)
Same as Gtk::ColorButton#color=. Since 2.4
alpha
Gets the current opacity value (0 fully transparent, 65535 fully opaque). Since 2.4
  • Returns: The current opacity value (0 fully transparent, 65535 fully opaque)
alpha=(alpha)
Sets the current opacity value (0 fully transparent, 65535 fully opaque). Since 2.4
  • alpha: The current opacity value (0 fully transparent, 65535 fully opaque)
  • Returns: alpha
set_alpha(alpha)
Same as Gtk::ColorButton#alpha=. Since 2.4
  • alpha: The current opacity value (0 fully transparent, 65535 fully opaque)
  • Returns: self
use_alpha?
Does the color selection dialog use the alpha channel? Since 2.4
  • Returns: true if color button should use alpha channel, false if not.
use_alpha=(use_alpha)
Sets whether or not the color button uses the alpha channel. Since 2.4
  • use_alpha: true if color button should use alpha channel, false if not.
  • Returns: use_alpha
set_use_alpha(use_alpha)
Same as Gtk::ColorButton#use_alpha=. Since 2.4
  • use_alpha: true if color button should use alpha channel, false if not.
  • Returns: self
title
Gets the title of the color selection dialog. Since 2.4
  • Returns: The title of the color selection dialog
title=(title)
Sets the title for the color selection dialog. Since 2.4
  • title: The title of the color selection dialog
  • Returns: title
set_title(title)
Same as Gtk::ColorButton#title=. Since 2.4
  • title: The title of the color selection dialog
  • Returns: self

プロパティ

alpha: Integer (Read/Write)
The selected opacity value (0 fully transparent, 65535 fully opaque) Since 2.4
color: Gdk::Color (Read/Write)
The selected color Since 2.4
title: String (Read/Write)
The title of the color selection dialog Since 2.4
use-alpha: true or false (Read/Write)
Whether or not to give the color an alpha value Since 2.4

シグナル

color-set: self
The ::color-set signal is emitted when the user selects a color. When handling this signal, use Gtk::ColorButton#color and Gtk::ColorButton#alpha to find out which color was just selected. Since 2.4

更新履歴

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