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

Gtk::Scale

Gtk::Scale クラス

A Gtk::Scale is a slider control used to select a numeric value. To use it, you'll probably want to investigate the methods on its base class, Gtk::Range, in addition to the methods for Gtk::Scale itself. To set the value of a scale, you would normally use Gtk::Range#value=. To detect changes to the value, you would normally use the "value_changed" signal.

The Gtk::Scale widget is an abstract class, used only for deriving the subclasses Gtk::HScale and Gtk::VScale. To create a scale widget, call Gtk::HScale.new or Gtk::VScale.new.

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

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

インスタンスメソッド

digits
Gets the number of decimal places that are displayed in the value.
  • Returns: the number of decimal places that are displayed.
digits=(digits)
Sets the number of decimal places that are displayed in the value. Also causes the value of the adjustment to be rounded off to this number of digits, so the retrieved value matches the value the user saw.
  • digits: the number of decimal places to display, e.g. use 1 to display 1.0, 2 to display 1.00 etc.
  • Returns: digits
set_digits(digits)
Same as Gtk::Scale#digits=.
  • digits: the number of decimal places to display, e.g. use 1 to display 1.0, 2 to display 1.00 etc.
  • Returns: self
draw_value?
Returns whether the current value is displayed as a string next to the slider.
  • Returns: whether the current value is displayed as a string.
draw_value=(draw_value)
Specifies whether the current value is displayed as a string next to the slider.
  • draw_value : true or false
  • Returns: draw_value
set_draw_value(draw_value)
Same as Gtk::Scale#draw_value=.
  • draw_value : true or false
  • Returns: self
value_pos
Gets the position in which the current value is displayed.
  • Returns: the position in which the current value is displayed.
value_pos=(pos)
Sets the position in which the current value is displayed.
  • pos: the position in which the current value is displayed.
  • Returns: pos
set_value_pos(pos)
Same as Gtk::Scale#value_pos=.
  • pos: the position in which the current value is displayed.
  • Returns: self
layout_offsets()
要編集
layout()
要編集

プロパティ

digits: Integer (Read/Write)
The number of decimal places that are displayed in the value
draw-value: true or false (Read/Write)
Whether the current value is displayed as a string next to the slider
value-pos: Integer (Read/Write)
The position in which the current value is displayed

シグナル

format-value: self, digits
  • self: Gtk::Scale
  • digits: the number of decimal places to display.
  • widget: the child widget of the handlebox. (this argument provides no extra information and is here only for backwards-compatibility)

更新履歴

  • 2014-06-16 クラスのメンで漏れていたものを追加。 - きたがわ
  • Masao?
更新日時:2014/06/16 17:18:12
キーワード:
参照:[Gtk::Range] [Gtk::VScale] [Gtk::HScale] [Gtk::Scale] [Ruby/GTK] [Ruby/GTK Object Hierarchy] [Gtk]