Toc Gallery Index Tree Gtk.Scale

Screenshot

No screeshot

Hierarchy

Description

A scale is a horizontal or vertical widget that a user can slide to choose a value in a given range. This is a kind of cursor, similar to what one finds on audio systems to select the volume for instance.

Types

  • type Gtk_Hscale is Gtk_Scale;
  • type Gtk_Hscale_Record is Gtk_Scale_Record;
  • type Gtk_Scale is access all Gtk_Scale_Record'Class;
  • type Gtk_Scale_Record is new Gtk.GRange.Gtk_Range_Record with private;
  • type Gtk_Vscale is Gtk_Scale;
  • type Gtk_Vscale_Record is Gtk_Scale_Record;

Subprograms

  • procedure Gtk_New_Hscale (Scale : out Gtk_Scale; Adjustment : Gtk.Adjustment.Gtk_Adjustment);
    procedure Gtk_New_Hscale (Scale : out Gtk_Scale; Min : Gdouble; Max : Gdouble; Step : Gdouble);
    Create a new horizontal scale widget that lets the user input a number between Min and Max with an increment of Step. Step must be non-zero; it is the distance the slider moves when using the arrow keys to adjust the scale value. An adjustment can be used to specify the range instead.
  • procedure Gtk_New_Vscale (Scale : out Gtk_Scale; Adjustment : Gtk.Adjustment.Gtk_Adjustment);
    procedure Gtk_New_Vscale (Scale : out Gtk_Scale; Min : Gdouble; Max : Gdouble; Step : Gdouble);
    Create a new vertical scale widget that lets the user input a number between Min and Max with an increment of Step. Step must be non-zero; it is the distance the slider moves when using the arrow keys to adjust the scale value. An adjustment can be used to specify the range instead.
  • function Get_Type return Gtk.Gtk_Type;
    function Hscale_Get_Type return GType;
    function Vscale_Get_Type return GType;
    Return the internal value associated with a Gtk_Scale, a Gtk_Hscale or a Gtk_Vscale.
  • procedure Initialize_Hscale (Scale : access Gtk_Scale_Record'Class; Adjustment : Gtk.Adjustment.Gtk_Adjustment);
    procedure Initialize_Hscale (Scale : access Gtk_Scale_Record'Class; Min : Gdouble; Max : Gdouble; Step : Gdouble);
    Internal initialization procedure.
  • procedure Initialize_Vscale (Scale : access Gtk_Scale_Record'Class; Adjustment : Gtk.Adjustment.Gtk_Adjustment);
    procedure Initialize_Vscale (Scale : access Gtk_Scale_Record'Class; Min : Gdouble; Max : Gdouble; Step : Gdouble);
    Internal initialization procedure.
  • procedure Set_Digits (Scale : access Gtk_Scale_Record; The_Digits : Gint);
    function Get_Digits (Scale : access Gtk_Scale_Record) return Gint;
    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.
  • procedure Set_Draw_Value (Scale : access Gtk_Scale_Record; Draw_Value : Boolean);
    function Get_Draw_Value (Scale : access Gtk_Scale_Record) return Boolean;
    Specifies whether the current value is displayed as a string next to the slider.
  • procedure Set_Value_Pos (Scale : access Gtk_Scale_Record; Pos : Gtk_Position_Type);
    function Get_Value_Pos (Scale : access Gtk_Scale_Record) return Gtk_Position_Type;
    Sets the position in which the current value is displayed.
  • function Get_Layout (Scale : access Gtk_Scale_Record) return Pango.Layout.Pango_Layout;
    Gets the Pango_Layout used to display the scale. The returned object is owned by the scale so does not need to be freed by the caller.
  • procedure Get_Layout_Offsets (Scale : access Gtk_Scale_Record; X, Y : out Gint);
    Obtains the coordinates where the scale will draw the Pango_Layout representing the text in the scale. Remember when using the Pango_Layout functions you need to convert to and from pixels using Pango.Enums.To_Pixels If the draw_value property is False, the return values are undefined.

Signals

  • format_value
    function Handler (Scale : access Gtk_Scale_Record'Class; Value : Gdouble) return Interfaces.C.Strings.chars_ptr;
    Emitted by the scale to request a formating of its value. The handler should return the string representing the value. The returned value will be freed by gtk+

Properties

  • Digits_Property
    Int
    The number of decimal places that are displayed in the value
  • Draw_Value_Property
    Boolean
    Whether the current value is displayed as a string next to the
  • Value_Pos_Property
    Gtk_Position_Type
    The position in which the current value is displayed

Style Properties

  • Slider_Length_Property
    Int
    Length of scale's slider
  • Value_Spacing_Property
    Int
    Space between value text and the slider/trough area

Alphabetical Index