[ruby-gnome2-doc-cvs] [Hiki] update - Gtk::SpinButton

Zurück zum Archiv-Index

ruby-****@sourc***** ruby-****@sourc*****
2003年 8月 25日 (月) 10:29:28 JST


-------------------------
REMOTE_ADDR = 61.204.181.66
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?Gtk%3A%3ASpinButton
-------------------------
  = class Gtk::SpinButton
  A Gtk::SpinButton is an ideal way to allow the user to set the value of some attribute. Rather than having to directly type a number into a Gtk::Entry, Gtk::SpinButton allows the user to click on one of two arrows to increment or decrement the displayed value. A value can still be typed in, with the bonus that it can be checked to ensure it is in a given range.
  
  The main properties of a Gtk::SpinButton are through a Gtk::Adjustment. See the Gtk::Adjustment section for more details about an adjustment's properties.
  
- == Super Class
- * Gtk::Entry
+ == Object Hierarchy
+ * Object
+   * GLib::Instantiatable
+     * GLib::Object
+       * Gtk::Object
+         * Gtk::Widget
+           * Gtk::Entry
+             * Gtk::SpinButton
  
  == Class Methods
  --- Gtk::SpinButton.new
      Creates a new Gtk::SpinButton.
      * Returns: The new spin button.  
  
  --- Gtk::SpinButton.new(adjustment, climb_rate, digits)
      Creates a new Gtk::SpinButton with Gtk::Adjustment.
      * adjustment: the Gtk::Adjustment object that this spin button should use. 
      * climb_rate: specifies how much the spin button changes when an arrow is clicked on.(Float)
      * digits: the number of decimal places to display. (Integer)
      * Returns: The new spin button.  
  
  --- Gtk::SpinButton.new(min, max, step)
      This is a convenience constructor that allows creation of a numeric Gtk::SpinButton without manually creating an adjustment. The value is initially set to the minimum value and a page increment of 10 * step is the default. The precision of the spin button is equivalent to the precision of step.
      * min: Minimum allowable value(Float)
      * max: Maximum allowable value(Float) 
      * step: Increment added or subtracted by spinning the widget(Float)
      * Returns: The new spin button. 
  
  == Instance Methods
  --- configure(adjustment, climb_rate, digits)
      Changes the properties of an existing spin button. The adjustment, climb rate, and number of decimal places are all changed accordingly, after this function call.
      * adjustment: a GtkAdjustment. 
      * climb_rate: the new climb rate. 
      * digits: the number of decimal places to display in the spin button.  
      * Returns: self
  
  --- adjustment
      Get the adjustment associated with a Gtk::SpinButton
      * Returns : the GtkAdjustment of spin_button 
  --- adjustment=(adjustment)
      Replaces the Gtk::Adjustment associated with spin_button.
      * adjustment: a Gtk::Adjustment to replace the existing adjustment 
      * Returns: adjustment
  --- set_adjustment(adjustment)
      Same as adjustment=.
      * adjustment: a Gtk::Adjustment to replace the existing adjustment 
      * Returns: self
  
  --- climb_rate
      Gets the value which specifies how much the spin button changes when an arrow is clicked on.
      * Returns: the value specifies how much the spin button changes when an arrow is clicked on.(Float)
  --- climb_rate=(climb_rate)
      Sets the value which specifies how much the spin button changes when an arrow is clicked on.
      * climb_rate: specifies how much the spin button changes when an arrow is clicked on.(Float)
      * Returns: climb_rate
  --- set_climb_rate(climb_rate)
      Same as climb_rate=.
      * climb_rate: specifies how much the spin button changes when an arrow is clicked on.(Float)
      * Returns: self
  
  --- digits
      Fetches the precision of spin_button. See Gtk::SpinButton#digits=.
      * Returns: the current precision 
  --- digits=(digits)
      Set the precision to be displayed by spin_button. Up to 20 digit precision is allowed.
      * digits: the number of digits to be displayed for the spin button's value 
      * Returns: digits
  --- set_digits(digits)
      Same as digits=.
      * digits: the number of digits to be displayed for the spin button's value 
      * Returns: self
  
  --- increments
      Gets the current step and page the increments used by spin_button. See Gtk::SpinButton#set_increments().
      * Returns: [step, page]
         * step: location to store step increment or nil
         * page: location to store page increment or nil
  --- set_increments(step, page)
      Sets the step and page increments for spin_button. This affects how quickly the value changes when the spin button's arrows are activated.
      * step: increment applied for a button 1 press. (Float)
      * page: increment applied for a button 2 press. (Float)
      * Returns: self
  
  --- numeric?
      Returns whether non-numeric text can be typed into the spin button. See Gtk::SpinButton#numeric=.
      * Returns: true if only numeric text can be entered 
  --- numeric=(numeric)
      Sets the flag that determines if non-numeric text can be typed into the spin button.
      * numeric : flag indicating if only numeric entry is allowed. 
      * Returns: numeric
  --- set_numeric(numeric)
      Same as numeric=.
      * numeric : true if only numeric entry is allowed. 
      * Returns: self
  
  --- range
      Gets the range allowed for spin_button. See Gtk::SpinButton#set_range.
      * Returns: [min, max]
         * min: location to store minimum allowed value, or nil 
         * max: location to store maximum allowed value, or nil 
  --- set_range(min, max)
      Sets the minimum and maximum allowable values for spin_button
      * min : minimum allowable value (Float)
      * max : maximum allowable value (Float)
      * Returns: self
  
  --- snap_to_ticks?
      Returns whether the values are corrected to the nearest step. See Gtk::SpinButton#snap_to_ticks=.
      * Returns: true if values are snapped to the nearest step. 
  --- snap_to_ticks=(snap_to_ticks)
      Sets the policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value.
      * snap_to_ticks : true if invalid values should be corrected. 
      * Returns: snap_to_ticks
  --- set_snap_to_ticks
      Same as snap_to_ticks=.
      * snap_to_ticks : true if invalid values should be corrected. 
      * Returns: self
  
  --- update
      Manually force an update of the spin button.
      * spin_button: a Gtk::SpinButton  
  
  --- update_policy
      Gets the update behavior of a spin button. See Gtk::SpinButton#update_policy=.
      * Returns : the current update policy(((<GtkSpinButtonUpdatePolicy|URL:#GtkSpinButtonUpdatePolicy>)))
  --- update_policy=(policy)
      Sets the update behavior of a spin button. This determines whether the spin button is always updated or only when a valid value is set.
      * policy: a ((<GtkSpinButtonUpdatePolicy|URL:#GtkSpinButtonUpdatePolicy>)) value 
      * Returns: policy
  --- set_update_policy(policy)
      Same as update_policy=.
      * policy: a ((<GtkSpinButtonUpdatePolicy|URL:#GtkSpinButtonUpdatePolicy>)) value 
      * Returns: self
  
  --- value
      Get the value in the spin_button.
      * Returns: the value of spin_button 
  --- value=(value)
      Set the value of spin_button.
      * value: the new value(Float)
      * Returns: value
  --- set_value(value)
      Same as value=.
      * value: the new value(Float)
      * Returns: self
  
  --- value_as_int
      Get the value spin_button represented as an integer.
      * Returns: the value of spin_button 
  
  --- spin(direction, increment)
      Increment or decrement a spin button's value in a specified direction by a specified amount.
      * direction: a ((<GtkSpinType|URL:#GtkSpinType>)) indicating the direction to spin. 
      * increment: step increment to apply in the specified direction. 
      * Returns: self
  
  --- wrap?
      Returns whether the spin button's value wraps around to the opposite limit when the upper or lower limit of the range is exceeded. See Gtk::SpinButton#wrap=.
      * Returns: true if the spin button wraps around 
  --- wrap=(wrap)
      Sets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.
      * wrap: true if wrapping behavior is performed. 
      * Returns: wrap
  --- set_wrap
      Same as wrap=.
      * wrap: true if wrapping behavior is performed. 
      * Returns: self
  
  == Constants
  === GtkSpinButtonUpdatePolicy
  --- UPDATE_ALWAYS
      When refreshing your Gtk::SpinButton, the value is always displayed.
  --- UPDATE_IF_VALID
      When refreshing your Gtk::SpinButton, the value is only displayed if it is valid within the bounds of the spin button's Gtk::Adjustment.
  
  === GtkSpinType
  --- STEP_FORWARD
      This value spin a Gtk::SpinButton by the relevant values of the spin button's Gtk::Adjustment.
  --- STEP_BACKWARD
      This value spin a Gtk::SpinButton by the relevant values of the spin button's Gtk::Adjustment.
  --- PAGE_FORWARD
      This value spin a Gtk::SpinButton by the relevant values of the spin button's Gtk::Adjustment.
  --- PAGE_BACKWARD
      This value spin a Gtk::SpinButton by the relevant values of the spin button's Gtk::Adjustment.
  --- HOME
      HOME and END set the spin button's value to the minimum or maxmimum possible values, (set by it's Gtk::Adjustment), respectively.
  --- END
      HOME and END set the spin button's value to the minimum or maxmimum possible values, (set by it's Gtk::Adjustment), respectively.
  --- USER_DEFINED
      The programmer must specify the exact amount to spin the Gtk::SpinButton.
+ 
+ == Properties
+ --- adjustment: Gtk::Adjustment (Read/Write)
+     The adjustment that holds the value of the spinbutton
+ 
+ --- climb-rate: Float (Read/Write)
+     The acceleration rate when you hold down a button
+ 
+ --- digits: Integer (Read/Write)
+     The number of decimal places to display
+ 
+ --- numeric: true or false (Read/Write)
+     Whether non-numeric characters should be ignored
+ 
+ --- snap-to-ticks: true or false (Read/Write)
+     Whether erroneous values are automatically changed to a spin button's nearest step increment
+ 
+ --- update-policy: Integer (Read/Write)
+     Whether the spin button should update always, or only when the value is legal
+ 
+ --- value: Float (Read/Write)
+     Reads the current value, or sets a new value
+ 
+ --- wrap: true or false (Read/Write)
+     Whether a spin button should wrap upon reaching its limits
  
  == Signals
  --- change-value: self, arg1
       * self: Gtk::SpinButton
       * arg1:
  
  --- input: self, arg1
       * self: Gtk::SpinButton
       * arg1:
  
  --- output: self, arg1
       * self: Gtk::SpinButton
       * arg1:
  --- value-changed: self
       * self: Gtk::SpinButton
  
  == See Also
  * Gtk::Entry - retrieve text rather than numbers.
  
  
  ((<Masao>))





ruby-gnome2-cvs メーリングリストの案内
Zurück zum Archiv-Index