package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Scale_Record, Gtk_Scale);
package Implements_Gtk_Orientable is new Glib.Types.Implements (Gtk.Orientable.Gtk_Orientable, Gtk_Scale_Record, Gtk_Scale);
type Gtk_Scale_Record is new Gtk_Range_Record with null record;
type Gtk_Scale is access all Gtk_Scale_Record'Class;
subtype Gtk_Hscale_Record is Gtk_Scale_Record;
subtype Gtk_Hscale is Gtk_Scale;
subtype Gtk_Vscale_Record is Gtk_Scale_Record;
subtype Gtk_Vscale is Gtk_Scale;
type Cb_Gtk_Scale_Gdouble_UTF8_String is not null access function (Self : access Gtk_Scale_Record'Class; Value : Gdouble) return UTF8_String;
type Cb_GObject_Gdouble_UTF8_String is not null access function (Self : access Glib.Object.GObject_Record'Class; Value : Gdouble) return UTF8_String;
The_Digits_Property : constant Glib.Properties.Property_Int;
Draw_Value_Property : constant Glib.Properties.Property_Boolean;
Has_Origin_Property : constant Glib.Properties.Property_Boolean;
Value_Pos_Property : constant Gtk.Enums.Property_Gtk_Position_Type;
Signal_Format_Value : constant Glib.Signal_Name := "format-value";
procedure Gtk_New
( | Scale | : out Gtk_Scale; |
Orientation | : Gtk.Enums.Gtk_Orientation; | |
Adjustment | : access Gtk.Adjustment.Gtk_Adjustment_Record'Class); |
procedure Initialize
( | Scale | : not null access Gtk_Scale_Record'Class; |
Orientation | : Gtk.Enums.Gtk_Orientation; | |
Adjustment | : access Gtk.Adjustment.Gtk_Adjustment_Record'Class); |
function Gtk_Scale_New
( | Orientation | : Gtk.Enums.Gtk_Orientation; |
Adjustment | : access Gtk.Adjustment.Gtk_Adjustment_Record'Class) return Gtk_Scale; |
procedure Gtk_New_With_Range
( | Scale | : out Gtk_Scale; |
Orientation | : Gtk.Enums.Gtk_Orientation; | |
Min | : Gdouble; | |
Max | : Gdouble; | |
Step | : Gdouble); |
procedure Initialize_With_Range
( | Scale | : not null access Gtk_Scale_Record'Class; |
Orientation | : Gtk.Enums.Gtk_Orientation; | |
Min | : Gdouble; | |
Max | : Gdouble; | |
Step | : Gdouble); |
function Gtk_Scale_New_With_Range
( | Orientation | : Gtk.Enums.Gtk_Orientation; |
Min | : Gdouble; | |
Max | : Gdouble; | |
Step | : Gdouble) return Gtk_Scale; |
function Get_Type return Glib.GType;
procedure Gtk_New_Hscale
( | Scale | : out Gtk_Hscale; |
Adjustment | : Gtk.Adjustment.Gtk_Adjustment := null); |
procedure Initialize_Hscale
( | Scale | : not null access Gtk_Hscale_Record'Class; |
Adjustment | : Gtk.Adjustment.Gtk_Adjustment := null); |
procedure Gtk_New_Hscale
( | Scale | : out Gtk_Hscale; |
Min | : Gdouble; | |
Max | : Gdouble; | |
Step | : Gdouble); |
procedure Initialize_Hscale
( | Scale | : not null access Gtk_Hscale_Record'Class; |
Min | : Gdouble; | |
Max | : Gdouble; | |
Step | : Gdouble); |
function Gtk_Hscale_New
( | Adjustment | : Gtk.Adjustment.Gtk_Adjustment := null) return Gtk_Hscale; |
function Gtk_Hscale_New_With_Range
( | Min | : Gdouble; |
Max | : Gdouble; | |
Step | : Gdouble) return Gtk_Hscale; |
function Hscale_Get_Type return Glib.GType;
procedure Gtk_New_Vscale
( | Scale | : out Gtk_Vscale; |
Adjustment | : Gtk.Adjustment.Gtk_Adjustment := null); |
procedure Initialize_Vscale
( | Scale | : not null access Gtk_Vscale_Record'Class; |
Adjustment | : Gtk.Adjustment.Gtk_Adjustment := null); |
procedure Gtk_New_Vscale
( | Scale | : out Gtk_Vscale; |
Min | : Gdouble; | |
Max | : Gdouble; | |
Step | : Gdouble); |
procedure Initialize_Vscale
( | Scale | : not null access Gtk_Vscale_Record'Class; |
Min | : Gdouble; | |
Max | : Gdouble; | |
Step | : Gdouble); |
function Gtk_Vscale_New
( | Adjustment | : Gtk.Adjustment.Gtk_Adjustment := null) return Gtk_Vscale; |
function Gtk_Vscale_New_With_Range
( | Min | : Gdouble; |
Max | : Gdouble; | |
Step | : Gdouble) return Gtk_Vscale; |
function Vscale_Get_Type return Glib.GType;
procedure Add_Mark
( | Scale | : not null access Gtk_Scale_Record; |
Value | : Gdouble; | |
Position | : Gtk.Enums.Gtk_Position_Type; | |
Markup | : UTF8_String := ""); |
procedure Clear_Marks
( | Scale | : not null access Gtk_Scale_Record); |
function Get_Digits
( | Scale | : not null access Gtk_Scale_Record) return Gint; |
procedure Set_Digits
( | Scale | : not null access Gtk_Scale_Record; |
The_Digits | : Gint); |
function Get_Draw_Value
( | Scale | : not null access Gtk_Scale_Record) return Boolean; |
procedure Set_Draw_Value
( | Scale | : not null access Gtk_Scale_Record; |
Draw_Value | : Boolean); |
function Get_Has_Origin
( | Scale | : not null access Gtk_Scale_Record) return Boolean; |
procedure Set_Has_Origin
( | Scale | : not null access Gtk_Scale_Record; |
Has_Origin | : Boolean); |
function Get_Layout
( | Scale | : not null access Gtk_Scale_Record) return Pango.Layout.Pango_Layout; |
procedure Get_Layout_Offsets
( | Scale | : not null access Gtk_Scale_Record; |
X | : out Gint; | |
Y | : out Gint); |
function Get_Value_Pos
( | Scale | : not null access Gtk_Scale_Record) return Gtk.Enums.Gtk_Position_Type; |
procedure Set_Value_Pos
( | Scale | : not null access Gtk_Scale_Record; |
Pos | : Gtk.Enums.Gtk_Position_Type); |
function Get_Orientation
( | Self | : not null access Gtk_Scale_Record) return Gtk.Enums.Gtk_Orientation; |
procedure Set_Orientation
( | Self | : not null access Gtk_Scale_Record; |
Orientation | : Gtk.Enums.Gtk_Orientation); |
procedure On_Format_Value
( | Self | : not null access Gtk_Scale_Record; |
Call | : Cb_Gtk_Scale_Gdouble_UTF8_String; | |
After | : Boolean := False); |
procedure On_Format_Value
( | Self | : not null access Gtk_Scale_Record; |
Call | : Cb_GObject_Gdouble_UTF8_String; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_Scale_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Scale renames Implements_Gtk_Buildable.To_Object; |
function "+"
( | Widget | : access Gtk_Scale_Record'Class) return Gtk.Orientable.Gtk_Orientable renames Implements_Gtk_Orientable.To_Interface; |
function "-"
( | Interf | : Gtk.Orientable.Gtk_Orientable) return Gtk_Scale renames Implements_Gtk_Orientable.To_Object; |
A GtkScale is a slider control used to select a numeric value. To use it, you'll probably want to investigate the methods on its base class, Gtk.GRange.Gtk_Range, in addition to the methods for GtkScale itself. To set the value of a scale, you would normally use Gtk.GRange.Set_Value. To detect changes to the value, you would normally use the Gtk.GRange.Gtk_Range::value-changed signal.
Note that using the same upper and lower bounds for the Gtk.Scale.Gtk_Scale (through the Gtk.GRange.Gtk_Range methods) will hide the slider itself. This is useful for applications that want to show an undeterminate value on the scale, without changing the layout of the application (such as movie or music players). == GtkScale as GtkBuildable == GtkScale supports a custom <marks> element, which can contain multiple <mark> elements. The "value" and "position" attributes have the same meaning as Gtk.Scale.Add_Mark parameters of the same name. If the element is not empty, its content is taken as the markup to show at the mark. It can be translated with the usual "translatable and "context" attributes.