## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Scale

- Goto spec source

# Description

    package Gtk.Scale is

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.

### Screenshot

# Packages

### Implements_Buildable (new Glib.Types.Implements)

    package Implements_Buildable is new Glib.Types.Implements
         (Gtk.Buildable.Gtk_Buildable, Gtk_Scale_Record, Gtk_Scale);

### Implements_Orientable (new Glib.Types.Implements)

    package Implements_Orientable is new Glib.Types.Implements
         (Gtk.Orientable.Gtk_Orientable, Gtk_Scale_Record, Gtk_Scale);

# Classes

### Gtk_Scale_Record

- Goto declaration in source

    type Gtk_Scale_Record is new Gtk_Range_Record with null record;

#### Ancestors:

Gtk.GRange.Gtk_Range_Record
Gtk.Widget.Gtk_Widget_Record
Glib.Object.GObject_Record

#### Immediate Children:

Gtk.Scale.Gtk_Hscale_Record
Gtk.Scale.Gtk_Vscale_Record

#### Primitive operations:

Add_Mark

- To API doc
- To spec

Clear_Marks

- To API doc
- To spec

Get_Digits

- To API doc
- To spec

Get_Draw_Value

- To API doc
- To spec

Get_Layout

- To API doc
- To spec

Get_Layout_Offsets

- To API doc
- To spec

Get_Orientation

- To API doc
- To spec

(overriding Gtk.GRange.Get_Orientation)
Get_Value_Pos

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Adjustment

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Fill_Level

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Flippable

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Inverted

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Lower_Stepper_Sensitivity

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Min_Slider_Size

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Range_Rect

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Restrict_To_Fill_Level

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Round_Digits

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Show_Fill_Level

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Slider_Range

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Slider_Size_Fixed

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Update_Policy

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Upper_Stepper_Sensitivity

- To API doc
- To spec

(Inherited)
Gtk.GRange.Get_Value

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Adjustment

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Fill_Level

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Flippable

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Increments

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Inverted

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Lower_Stepper_Sensitivity

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Min_Slider_Size

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Range

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Restrict_To_Fill_Level

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Round_Digits

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Show_Fill_Level

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Slider_Size_Fixed

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Update_Policy

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Upper_Stepper_Sensitivity

- To API doc
- To spec

(Inherited)
Gtk.GRange.Set_Value

- To API doc
- To spec

(Inherited)
Gtk.Widget.Activate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Accelerator

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Mnemonic_Label

- To API doc
- To spec

(Inherited)
Gtk.Widget.Can_Activate_Accel

- To API doc
- To spec

(Inherited)
Gtk.Widget.Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Class_Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Class_Path_Reversed

- To API doc
- To spec

(Inherited)
Gtk.Widget.Create_Pango_Context

- To API doc
- To spec

(Inherited)
Gtk.Widget.Create_Pango_Layout

- To API doc
- To spec

(Inherited)
Gtk.Widget.Destroy

- To API doc
- To spec

(Inherited)
Gtk.Widget.Draw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Ensure_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Error_Bell

- To API doc
- To spec

(Inherited)
Gtk.Widget.Flag_Is_Set

- To API doc
- To spec

(Inherited)
Gtk.Widget.Flags

- To API doc
- To spec

(Inherited)
Gtk.Widget.Freeze_Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Height

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Width

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_X

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Y

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Ancestor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Child_Requisition

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Child_Visible

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Colormap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Composite_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Direction

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Extension_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Has_Tooltip

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_No_Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Pango_Context

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Parent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Parent_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Pointer

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Root_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Snapshot

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_State

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Markup

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Toplevel

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Visual

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Grab_Default

- To API doc
- To spec

(Inherited)
Gtk.Widget.Grab_Focus

- To API doc
- To spec

(Inherited)
Gtk.Widget.Has_Screen

- To API doc
- To spec

(Inherited)
Gtk.Widget.Hide

- To API doc
- To spec

(Inherited)
Gtk.Widget.Hide_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Input_Shape_Combine_Mask

- To API doc
- To spec

(Inherited)
Gtk.Widget.Intersect

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Ancestor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Composited

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Focus

- To API doc
- To spec

(Inherited)
Gtk.Widget.Keynav_Failed

- To API doc
- To spec

(Inherited)
Gtk.Widget.List_Mnemonic_Labels

- To API doc
- To spec

(Inherited)
Gtk.Widget.Map

- To API doc
- To spec

(Inherited)
Gtk.Widget.Mnemonic_Activate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Base

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Bg

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Cursor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Fg

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Font

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Path_Reversed

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Clear

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Clear_Area

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Draw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Draw_Area

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Resize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Resize_No_Redraw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Realize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Region_Intersect

- To API doc
- To spec

(Inherited)
Gtk.Widget.Remove_Accelerator

- To API doc
- To spec

(Inherited)
Gtk.Widget.Remove_Mnemonic_Label

- To API doc
- To spec

(Inherited)
Gtk.Widget.Render_Icon

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reparent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reset_Rc_Styles

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reset_Shapes

- To API doc
- To spec

(Inherited)
Gtk.Widget.Restore_Default_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Send_Expose

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Accel_Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_App_Paintable

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Child_Visible

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Colormap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Composite_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Direction

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Double_Buffered

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Extension_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Flags

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Has_Tooltip

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_No_Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Parent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Parent_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Redraw_On_Allocate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Scroll_Adjustments

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Sensitive

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_State

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Markup

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_UPosition

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_USize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Shape_Combine_Mask

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show_Now

- To API doc
- To spec

(Inherited)
Gtk.Widget.Size_Allocate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Style_Get_Property

- To API doc
- To spec

(Inherited)
Gtk.Widget.Thaw_Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Trigger_Tooltip_Query

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unmap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unrealize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unset_Flags

- To API doc
- To spec

(Inherited)
Set_Digits

- To API doc
- To spec

Set_Draw_Value

- To API doc
- To spec

Set_Orientation

- To API doc
- To spec

(overriding Gtk.GRange.Set_Orientation)
Set_Value_Pos

- To API doc
- To spec

# Types

### Gtk_Scale

- Goto declaration in source

    type Gtk_Scale is access all Gtk_Scale_Record'Class;

### Gtk_Hscale_Record

- Goto declaration in source

    subtype Gtk_Hscale_Record is Gtk_Scale_Record;

### Gtk_Hscale

- Goto declaration in source

    subtype Gtk_Hscale is Gtk_Scale;

### Gtk_Vscale_Record

- Goto declaration in source

    subtype Gtk_Vscale_Record is Gtk_Scale_Record;

### Gtk_Vscale

- Goto declaration in source

    subtype Gtk_Vscale is Gtk_Scale;

# Constants & Global variables

### Number_Of_Digits_Property

- Goto declaration in source

(Glib.Properties.Property_Int)

    Number_Of_Digits_Property : constant Glib.Properties.Property_Int;

### Draw_Value_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Draw_Value_Property : constant Glib.Properties.Property_Boolean;

### Value_Pos_Property

- Goto declaration in source

(Gtk.Enums.Property_Gtk_Position_Type)

    Value_Pos_Property : constant Gtk.Enums.Property_Gtk_Position_Type;

### Signal_Format_Value

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Format_Value : constant Glib.Signal_Name := "format-value";

# Subprograms & Entries

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return Glib.GType;

### Gtk_New_Hscale

- Goto spec in source

    procedure Gtk_New_Hscale (Scale: out Gtk_Hscale;Adjustment: Gtk.Adjustment.Gtk_Adjustment := null);

### Initialize_Hscale

- Goto spec in source

    procedure Initialize_Hscale (Scale: access Gtk_Hscale_Record'Class;Adjustment: Gtk.Adjustment.Gtk_Adjustment := null);

### Gtk_New_Hscale

- Goto spec in source

    procedure Gtk_New_Hscale (Scale: out Gtk_Hscale;Min: Gdouble;Max: Gdouble;Step: Gdouble);

### Initialize_Hscale

- Goto spec in source

    procedure Initialize_Hscale (Scale: access Gtk_Hscale_Record'Class;Min: Gdouble;Max: Gdouble;Step: Gdouble);

Creates a new horizontal scale widget that lets the user input a number between Min and Max (including Min and Max) with the increment Step. Step must be nonzero; it's the distance the slider moves when using the arrow keys to adjust the scale value. Note that the way in which the precision is derived works best if Step is a power of ten. If the resulting precision is not suitable for your needs, use Gtk.Scale.Set_Digits to correct it. "min": minimum value "max": maximum value "step": step increment (tick size) used with keyboard shortcuts

### Hscale_Get_Type

- Goto spec in source
- Goto body in source

    function Hscale_Get_Type return Glib.GType;

### Gtk_New_Vscale

- Goto spec in source

    procedure Gtk_New_Vscale (Scale: out Gtk_Vscale;Adjustment: Gtk.Adjustment.Gtk_Adjustment := null);

### Initialize_Vscale

- Goto spec in source

    procedure Initialize_Vscale (Scale: access Gtk_Vscale_Record'Class;Adjustment: Gtk.Adjustment.Gtk_Adjustment := null);

### Gtk_New_Vscale

- Goto spec in source

    procedure Gtk_New_Vscale (Scale: out Gtk_Vscale;Min: Gdouble;Max: Gdouble;Step: Gdouble);

### Initialize_Vscale

- Goto spec in source

    procedure Initialize_Vscale (Scale: access Gtk_Vscale_Record'Class;Min: Gdouble;Max: Gdouble;Step: Gdouble);

Creates a new vertical scale widget that lets the user input a number between Min and Max (including Min and Max) with the increment Step. Step must be nonzero; it's the distance the slider moves when using the arrow keys to adjust the scale value. Note that the way in which the precision is derived works best if Step is a power of ten. If the resulting precision is not suitable for your needs, use Gtk.Scale.Set_Digits to correct it. "min": minimum value "max": maximum value "step": step increment (tick size) used with keyboard shortcuts

### Vscale_Get_Type

- Goto spec in source
- Goto body in source

    function Vscale_Get_Type return Glib.GType;

### Add_Mark

- Goto spec in source

    procedure Add_Mark (Scale: access Gtk_Scale_Record;Value: Gdouble;Position: Gtk.Enums.Gtk_Position_Type;Markup: UTF8_String);

Adds a mark at Value. A mark is indicated visually by drawing a tick mark next to the scale, and GTK+ makes it easy for the user to position the scale exactly at the marks value. If Markup is not null, text is shown next to the tick mark. To remove marks from a scale, use Gtk.Scale.Clear_Marks. Since: gtk+ 2.16 "value": the value at which the mark is placed, must be between the lower and upper limits of the scales' adjustment "position": where to draw the mark. For a horizontal scale, GTK_POS_TOP is drawn above the scale, anything else below. For a vertical scale, GTK_POS_LEFT is drawn to the left of the scale, anything else to the right. "markup": Text to be shown at the mark, using <link linkend="PangoMarkupFormat">Pango markup</link>, or null

### Clear_Marks

- Goto spec in source

    procedure Clear_Marks (Scale: access Gtk_Scale_Record);

Removes any marks that have been added with Gtk.Scale.Add_Mark. Since: gtk+ 2.16

### Get_Digits

- Goto spec in source

    function Get_Digits (Scale: access Gtk_Scale_Record) return Gint;

### Set_Digits

- Goto spec in source

    procedure Set_Digits (Scale: access Gtk_Scale_Record;Number_Of_Digits: 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. "digits": the number of decimal places to display, e.g. use 1 to display 1.0, 2 to display 1.00, etc

### Get_Draw_Value

- Goto spec in source

    function Get_Draw_Value (Scale: access Gtk_Scale_Record) return Boolean;

### Set_Draw_Value

- Goto spec in source

    procedure Set_Draw_Value (Scale: access Gtk_Scale_Record;Draw_Value: Boolean);

Specifies whether the current value is displayed as a string next to the slider. "draw_value": True to draw the value

### Get_Layout

- Goto spec in source

    function Get_Layout (Scale: access Gtk_Scale_Record) return Pango.Layout.Pango_Layout;

Gets the Pango.Layout.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. or null if the Gtk.Scale.Gtk_Scale:draw-value property is False. Since: gtk+ 2.4

### Get_Layout_Offsets

- Goto spec in source

    procedure Get_Layout_Offsets (Scale: access Gtk_Scale_Record;X: out Gint;Y: out Gint);

Obtains the coordinates where the scale will draw the Pango.Layout.Pango_Layout representing the text in the scale. Remember when using the Pango.Layout.Pango_Layout function you need to convert to and from pixels using PANGO_PIXELS or PANGO_SCALE. If the Gtk.Scale.Gtk_Scale:draw-value property is False, the return values are undefined. Since: gtk+ 2.4 "x": location to store X offset of layout, or null "y": location to store Y offset of layout, or null

### Get_Value_Pos

- Goto spec in source

    function Get_Value_Pos (Scale: access Gtk_Scale_Record) return Gtk.Enums.Gtk_Position_Type;

### Set_Value_Pos

- Goto spec in source

    procedure Set_Value_Pos (Scale: access Gtk_Scale_Record;Pos: Gtk.Enums.Gtk_Position_Type);

Sets the position in which the current value is displayed. "pos": the position in which the current value is displayed

### Get_Orientation

- Goto spec in source

    function Get_Orientation (Self: access Gtk_Scale_Record) return Gtk.Enums.Gtk_Orientation;

### Set_Orientation

- Goto spec in source

    procedure Set_Orientation (Self: access Gtk_Scale_Record;Orientation: Gtk.Enums.Gtk_Orientation);

### +

- Goto spec in source

    function "+" (Widget: access Gtk_Scale_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Buildable.To_Interface;

### -

- Goto spec in source

    function "-" (Interf: Gtk.Buildable.Gtk_Buildable) return Gtk_Scale renames Implements_Buildable.To_Object;

### +

- Goto spec in source

    function "+" (Widget: access Gtk_Scale_Record'Class) return Gtk.Orientable.Gtk_Orientable renames Implements_Orientable.To_Interface;

### -

- Goto spec in source

    function "-" (Interf: Gtk.Orientable.Gtk_Orientable) return Gtk_Scale renames Implements_Orientable.To_Object;