_
ButtonA Gtk_Spin_Button is a single line text editing widget for text that represents a number. At the right hand side of the text line there are small up- and down arrow buttons for incrementing or decrementing (spinning) the number within a given range. It allows the value to have zero or a number of decimal places and to be incremented/decremented in configurable steps. The action of holding down one of the buttons optionally results in an acceleration of change in the value according to how long it is depressed.
see section Package Gtk.GEntry for a text editing widget without spin buttons.
Widget Hierarchy |
---|
Gtk_Object (see section Package Gtk.Object)
\___ Gtk_Widget (see section Package Gtk.Widget)
\___ Gtk_Editable (see section Package Gtk.Editable)
\___ Gtk_Entry (see section Package Gtk.GEntry)
\___ Gtk_Spin_Button (see section Package Gtk.Spin
|
Subprograms |
---|
procedure Gtk_New (Spin_Button : out Gtk_Spin_Button; Adjustment : Gtk.Adjustment.Gtk_Adjustment; Climb_Rate : in Gfloat; The_Digits : in Gint); | ||
Create a spin button with the given parameters. | ||
function Get_Type return Gtk.Gtk_Type; | ||
Return the internal value associated with a Gtk_Spin_Button.
| ||
function Get_Adjustment (Spin_Button : access Gtk_Spin_Button_Record) return Gtk.Adjustment.Gtk_Adjustment; | ||
Return the adjustment settings of the spin button.
| ||
function Get_Value_As_Float (Spin_Button : access Gtk_Spin_Button_Record) return Gfloat; | ||
Return the current value of the spin button in a float.
| ||
function Get_Value_As_Int (Spin_Button : access Gtk_Spin_Button_Record) return Gint; | ||
Return the current value of the spin button in an integer.
| ||
procedure Set_Adjustment (Spin_Button : access Gtk_Spin_Button_Record; Adjustment : Gtk.Adjustment.Gtk_Adjustment); | ||
Set the adjustment settings of the spin button.
| ||
procedure Set_Digits (Spin_Button : access Gtk_Spin_Button_Record; The_Digits : in Gint); | ||
Set number of decimals of the spin button.
| ||
procedure Set_Numeric (Spin_Button : access Gtk_Spin_Button_Record; Numeric : in Boolean); | ||
If Numeric is True, then only a numeric value can be typed in the | ||
procedure Set_Snap_To_Ticks (Spin_Button : access Gtk_Spin_Button_Record; Snap_To_Ticks : in Boolean); | ||
Set the spin button to round the value to the nearest step value | ||
procedure Set_Update_Policy (Spin_Button : access Gtk_Spin_Button_Record; Policy : in Gtk_Spin_Button_Update_Policy); | ||
Set the update policy of the spin button which affects the behaviour | ||
procedure Set_Value (Spin_Button : access Gtk_Spin_Button_Record; Value : in Gfloat); | ||
Set the current value of the spin button.
| ||
procedure Set_Wrap (Spin_Button : access Gtk_Spin_Button_Record; Wrap : in Boolean); | ||
Set whether the spin button should "wrap around" when exceeding the | ||
procedure Spin (Spin_Button : access Gtk_Spin_Button_Record; Direction : in Gtk.Enums.Gtk_Arrow_Type; Step : in Gfloat); | ||
Set the value of the spin button relative to its current value. |