Next: , Previous: Package_Gtk.GLArea, Up: Top



Package Gtk.GRange

This widget provides a low level graphical representation of a range of values. It is used by other widgets such as Gtk_Scale and Gtk_Scrollbar.

Widget Hierarchy
     GObject                       (see Package_Glib.Object)
     Gtk_Object                    (see Package_Gtk.Object)
        \___ Gtk_Widget            (see Package_Gtk.Widget)
           \___ Gtk_Range          (see Package_Gtk.Grange)
     

Types

subtype Gtk_GRange is Gtk_Range;




Subprograms
function Get_Type return Gtk.Gtk_Type;
Return the internal value associated with a Gtk_Range.

procedure Set_Update_Policy (The_Range : access Gtk_Range_Record; Policy : Gtk_Update_Type);
Set the update policy for the range.
Update_Continuous means that anytime the range slider is moved, the range value will change and the value_changed signal will be emitted. Update_Delayed means that the value will be updated after a brief timeout where no slider motion occurs, so updates are spaced by a short time rather than continuous. Update_Discontinuous means that the value will only be updated when the user releases the button and ends the slider drag operation.

function Get_Update_Policy (The_Range : access Gtk_Range_Record) return Gtk_Update_Type;
Return the current update policy.

procedure Set_Adjustment (The_Range : access Gtk_Range_Record; Adjustment : Gtk.Adjustment.Gtk_Adjustment);
Set the adjustment to be used as the "model" object for this range
widget. The adjustment indicates the current range value, the minimum and maximum range values, the step/page increments used for keybindings and scrolling, and the page size. The page size is normally 0 for Gtk_Scale and nonzero for Gtk_Scrollbar, and indicates the size of the visible area of the widget being scrolled. The page size affects the size of the scrollbar slider.

function Get_Adjustment (The_Range : access Gtk_Range_Record) return Gtk.Adjustment.Gtk_Adjustment;
Return the adjustment associated with the range widget.

procedure Set_Inverted (The_Range : access Gtk_Range_Record; Setting : Boolean := True);
Ranges normally move from lower to higher values as the slider moves
from top to bottom or left to right. Inverted ranges have higher values at the top or on the right rather than on the bottom or left.

function Get_Inverted (The_Range : access Gtk_Range_Record) return Boolean;
Return whether the range is inverted.

procedure Set_Increments (The_Range : access Gtk_Range_Record; Step : Gdouble; Page : Gdouble);
Set the Step and the Page size for the range. The Step size is used when
the user clicks on the Gtk_Scrollbar arrows or moves the Gtk_Scale via the arrow keys. The Page size is used when moving by pages via the Page-Up and Page-Down keys for instance.

procedure Set_Range (The_Range : access Gtk_Range_Record; Min : Gdouble; Max : Gdouble);
Set the allowable values in the Gtk_Range, and clamps the range value to
the between Min and Max.

procedure Set_Value (The_Range : access Gtk_Range_Record; Value : Gdouble);
Set the current value of the given Range. If the value is outside the
minimum or the maximum value range, it will be clamped to fit inside the range. Cause the "value_changed" signal to be emitted if the value is different.

function Get_Value (The_Range : access Gtk_Range_Record) return Gdouble;
Return the current value of the range.