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

Gtk::Ruler

Gtk::Ruler クラス

The Gtk::Ruler widget is a base class for horizontal and vertical rulers. Rulers are used to show the mouse pointer's location in a window. The ruler can either be horizontal or vertical on the window. Within the ruler a small triangle indicates the location of the mouse relative to the horizontal or vertical ruler. See Gtk::HRuler to learn how to create a new horizontal ruler. See Gtk::VRuler to learn how to create a new vertical ruler.

Note

This widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it's just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution.

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

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

インスタンスメソッド

metric
Gets the metric. See metric= for more details.
metric=(metric)
This calls the GtkMetricType to set the ruler to units defined. Available units are Gtk::PIXELS, Gtk::INCHES, or Gtk::CENTIMETERS. The default unit of measurement is Gtk::PIXELS.
set_metric(metric)
Same as Gtk::Ruler#metric=.
range
Retrieves values indicating the range and current position of a Gtk::Ruler. See Gtk::Ruler#range=.
  • [lower, upper, position, max_size]
    • lower: lower limit of the ruler
    • upper: upper limit of the ruler
    • position: the current position of the mark on the ruler
    • max_size: the maximum size of the ruler used when calculating the space to leave for the text
  • Returns: self
set_range(lower, upper, position, max_size)
This sets the range of the ruler using Float lower, Float upper, Float position, and Float max_size.
  • lower: the upper limit of the ruler (Float)
  • upper: the lower limit of the ruler (Float)
  • position: the mark on the ruler (Float)
  • max_size: the maximum size of the ruler (Float)
  • Returns: self
draw_pos
Draw the position mark on the ruler. This method is not used by applications.
  • Returns: self
draw_ticks
Draw the tick marks on the ruler. This method is not used by applications.
  • Returns: self
lower
Gets the Lower limit of ruler.
  • Returns: Lower limit of ruler(Float)
lower=(lower)
Sets the Lower limit of ruler.
  • lower: Lower limit of ruler(Float)
  • Returns: lower
set_lower(lower)
Same as Gtk::Ruler#lower=.
  • lower: Lower limit of ruler(Float)
  • Returns: self
max_size
Gets the Maximum size of the ruler.
  • Returns: Maximum size of the ruler(Float)
max_size=(max_size)
Sets the Maximum size of the ruler.
  • max_size: Maximum size of the ruler(Float)
  • Returns: max_size
set_max_size(max_size)
Same as Gtk::Ruler#max_size=.
  • max_size: Maximum size of the ruler(Float)
  • Returns: self
position
Gets the Position of mark on the ruler.
  • Returns: Position of mark on the ruler(Float)
position=(position)
Sets the Position of mark on the ruler.
  • position: Position of mark on the ruler(Float)
  • Returns: position
set_position(position)
Same as Gtk::Ruler#position=.
  • position: Position of mark on the ruler(Float)
  • Returns: self
upper
Gets the Upper limit of ruler.
  • Returns: Upper limit of ruler(Float)
upper=(upper)
Sets the Upper limit of ruler.
  • upper: Upper limit of ruler(Float)
  • Returns: upper
set_upper(upper)
Same as Gtk::Ruler#upper=.
  • upper: Upper limit of ruler(Float)
  • Returns: self
range=()
要編集

プロパティ

lower: Float (Read/Write)
Lower limit of ruler
  • Default value: 0
max-size: Float (Read/Write)
Maximum size of the ruler
  • Default value: 0
position: Float (Read/Write)
Position of mark on the ruler
  • Default value: 0
upper: Float (Read/Write)
Upper limit of ruler
  • Default value: 0
metric:
要編集

更新履歴

  • 2014-06-16 クラスのメンで漏れていたものを追加。 - きたがわ
  • 2005-03-21 Added. - Masao?
更新日時:2014/06/16 17:16:06
キーワード:
参照:[Ruby/GTK Object Hierarchy] [Gtk::HRuler] [Gtk] [gtk2-tut-ruler] [Ruby/GTK] [Gtk::VRuler] [Gtk::Ruler]