Index

Package: Scale

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

gtk-scale.png

Packages

Implements_Buildable (new Glib.Types.Implements)

Implements_Orientable (new Glib.Types.Implements)

Classes

Gtk_Scale_Record

type Gtk_Scale_Record is new Gtk_Range_Record with null record;

Ancestors:

Immediate Children:

Primitive operations:

Get_Draw_Value
Get_Layout_Offsets
Get_Orientation (overriding Gtk.GRange.Get_Orientation)
Get_Value_Pos
Glib.Object.Deallocate (Inherited)
Glib.Object.Get_Type (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Ref_Sink (Inherited)
Glib.Object.Unref (Inherited)
Gtk.GRange.Get_Adjustment (Inherited)
Gtk.GRange.Get_Fill_Level (Inherited)
Gtk.GRange.Get_Flippable (Inherited)
Gtk.GRange.Get_Inverted (Inherited)
Gtk.GRange.Get_Lower_Stepper_Sensitivity (Inherited)
Gtk.GRange.Get_Min_Slider_Size (Inherited)
Gtk.GRange.Get_Range_Rect (Inherited)
Gtk.GRange.Get_Restrict_To_Fill_Level (Inherited)
Gtk.GRange.Get_Round_Digits (Inherited)
Gtk.GRange.Get_Show_Fill_Level (Inherited)
Gtk.GRange.Get_Slider_Range (Inherited)
Gtk.GRange.Get_Slider_Size_Fixed (Inherited)
Gtk.GRange.Get_Update_Policy (Inherited)
Gtk.GRange.Get_Upper_Stepper_Sensitivity (Inherited)
Gtk.GRange.Get_Value (Inherited)
Gtk.GRange.Set_Adjustment (Inherited)
Gtk.GRange.Set_Fill_Level (Inherited)
Gtk.GRange.Set_Flippable (Inherited)
Gtk.GRange.Set_Increments (Inherited)
Gtk.GRange.Set_Inverted (Inherited)
Gtk.GRange.Set_Lower_Stepper_Sensitivity (Inherited)
Gtk.GRange.Set_Min_Slider_Size (Inherited)
Gtk.GRange.Set_Range (Inherited)
Gtk.GRange.Set_Restrict_To_Fill_Level (Inherited)
Gtk.GRange.Set_Round_Digits (Inherited)
Gtk.GRange.Set_Show_Fill_Level (Inherited)
Gtk.GRange.Set_Slider_Size_Fixed (Inherited)
Gtk.GRange.Set_Update_Policy (Inherited)
Gtk.GRange.Set_Upper_Stepper_Sensitivity (Inherited)
Gtk.GRange.Set_Value (Inherited)
Gtk.Widget.Activate (Inherited)
Gtk.Widget.Add_Accelerator (Inherited)
Gtk.Widget.Add_Events (Inherited)
Gtk.Widget.Add_Mnemonic_Label (Inherited)
Gtk.Widget.Can_Activate_Accel (Inherited)
Gtk.Widget.Child_Notify (Inherited)
Gtk.Widget.Class_Path (Inherited)
Gtk.Widget.Class_Path_Reversed (Inherited)
Gtk.Widget.Create_Pango_Context (Inherited)
Gtk.Widget.Create_Pango_Layout (Inherited)
Gtk.Widget.Destroy (Inherited)
Gtk.Widget.Draw (Inherited)
Gtk.Widget.Ensure_Style (Inherited)
Gtk.Widget.Error_Bell (Inherited)
Gtk.Widget.Flag_Is_Set (Inherited)
Gtk.Widget.Flags (Inherited)
Gtk.Widget.Freeze_Child_Notify (Inherited)
Gtk.Widget.Get_Allocation_Height (Inherited)
Gtk.Widget.Get_Allocation_Width (Inherited)
Gtk.Widget.Get_Allocation_X (Inherited)
Gtk.Widget.Get_Allocation_Y (Inherited)
Gtk.Widget.Get_Ancestor (Inherited)
Gtk.Widget.Get_Child_Requisition (Inherited)
Gtk.Widget.Get_Child_Visible (Inherited)
Gtk.Widget.Get_Colormap (Inherited)
Gtk.Widget.Get_Composite_Name (Inherited)
Gtk.Widget.Get_Direction (Inherited)
Gtk.Widget.Get_Events (Inherited)
Gtk.Widget.Get_Extension_Events (Inherited)
Gtk.Widget.Get_Has_Tooltip (Inherited)
Gtk.Widget.Get_Name (Inherited)
Gtk.Widget.Get_No_Show_All (Inherited)
Gtk.Widget.Get_Pango_Context (Inherited)
Gtk.Widget.Get_Parent (Inherited)
Gtk.Widget.Get_Parent_Window (Inherited)
Gtk.Widget.Get_Pointer (Inherited)
Gtk.Widget.Get_Root_Window (Inherited)
Gtk.Widget.Get_Size_Request (Inherited)
Gtk.Widget.Get_Snapshot (Inherited)
Gtk.Widget.Get_State (Inherited)
Gtk.Widget.Get_Style (Inherited)
Gtk.Widget.Get_Tooltip_Markup (Inherited)
Gtk.Widget.Get_Tooltip_Text (Inherited)
Gtk.Widget.Get_Tooltip_Window (Inherited)
Gtk.Widget.Get_Toplevel (Inherited)
Gtk.Widget.Get_Visual (Inherited)
Gtk.Widget.Get_Window (Inherited)
Gtk.Widget.Grab_Default (Inherited)
Gtk.Widget.Grab_Focus (Inherited)
Gtk.Widget.Has_Screen (Inherited)
Gtk.Widget.Hide (Inherited)
Gtk.Widget.Hide_All (Inherited)
Gtk.Widget.Input_Shape_Combine_Mask (Inherited)
Gtk.Widget.Intersect (Inherited)
Gtk.Widget.Is_Ancestor (Inherited)
Gtk.Widget.Is_Composited (Inherited)
Gtk.Widget.Is_Focus (Inherited)
Gtk.Widget.Keynav_Failed (Inherited)
Gtk.Widget.List_Mnemonic_Labels (Inherited)
Gtk.Widget.Map (Inherited)
Gtk.Widget.Mnemonic_Activate (Inherited)
Gtk.Widget.Modify_Base (Inherited)
Gtk.Widget.Modify_Bg (Inherited)
Gtk.Widget.Modify_Cursor (Inherited)
Gtk.Widget.Modify_Fg (Inherited)
Gtk.Widget.Modify_Font (Inherited)
Gtk.Widget.Modify_Text (Inherited)
Gtk.Widget.Path (Inherited)
Gtk.Widget.Path_Reversed (Inherited)
Gtk.Widget.Queue_Clear (Inherited)
Gtk.Widget.Queue_Clear_Area (Inherited)
Gtk.Widget.Queue_Draw (Inherited)
Gtk.Widget.Queue_Draw_Area (Inherited)
Gtk.Widget.Queue_Resize (Inherited)
Gtk.Widget.Queue_Resize_No_Redraw (Inherited)
Gtk.Widget.Realize (Inherited)
Gtk.Widget.Region_Intersect (Inherited)
Gtk.Widget.Remove_Accelerator (Inherited)
Gtk.Widget.Remove_Mnemonic_Label (Inherited)
Gtk.Widget.Render_Icon (Inherited)
Gtk.Widget.Reparent (Inherited)
Gtk.Widget.Reset_Rc_Styles (Inherited)
Gtk.Widget.Reset_Shapes (Inherited)
Gtk.Widget.Restore_Default_Style (Inherited)
Gtk.Widget.Send_Expose (Inherited)
Gtk.Widget.Set_Accel_Path (Inherited)
Gtk.Widget.Set_App_Paintable (Inherited)
Gtk.Widget.Set_Child_Visible (Inherited)
Gtk.Widget.Set_Colormap (Inherited)
Gtk.Widget.Set_Composite_Name (Inherited)
Gtk.Widget.Set_Direction (Inherited)
Gtk.Widget.Set_Double_Buffered (Inherited)
Gtk.Widget.Set_Events (Inherited)
Gtk.Widget.Set_Extension_Events (Inherited)
Gtk.Widget.Set_Flags (Inherited)
Gtk.Widget.Set_Has_Tooltip (Inherited)
Gtk.Widget.Set_Name (Inherited)
Gtk.Widget.Set_No_Show_All (Inherited)
Gtk.Widget.Set_Parent (Inherited)
Gtk.Widget.Set_Parent_Window (Inherited)
Gtk.Widget.Set_Redraw_On_Allocate (Inherited)
Gtk.Widget.Set_Scroll_Adjustments (Inherited)
Gtk.Widget.Set_Sensitive (Inherited)
Gtk.Widget.Set_Size_Request (Inherited)
Gtk.Widget.Set_State (Inherited)
Gtk.Widget.Set_Style (Inherited)
Gtk.Widget.Set_Tooltip_Markup (Inherited)
Gtk.Widget.Set_Tooltip_Text (Inherited)
Gtk.Widget.Set_Tooltip_Window (Inherited)
Gtk.Widget.Set_UPosition (Inherited)
Gtk.Widget.Set_USize (Inherited)
Gtk.Widget.Set_Window (Inherited)
Gtk.Widget.Shape_Combine_Mask (Inherited)
Gtk.Widget.Show (Inherited)
Gtk.Widget.Show_All (Inherited)
Gtk.Widget.Show_Now (Inherited)
Gtk.Widget.Size_Allocate (Inherited)
Gtk.Widget.Size_Request (Inherited)
Gtk.Widget.Style_Get_Property (Inherited)
Gtk.Widget.Thaw_Child_Notify (Inherited)
Gtk.Widget.Trigger_Tooltip_Query (Inherited)
Gtk.Widget.Unmap (Inherited)
Gtk.Widget.Unrealize (Inherited)
Gtk.Widget.Unset_Flags (Inherited)
Set_Draw_Value
Set_Orientation (overriding Gtk.GRange.Set_Orientation)
Set_Value_Pos

Types

Gtk_Scale

type Gtk_Scale is access all Gtk_Scale_Record'Class;

Gtk_Hscale_Record

subtype Gtk_Hscale_Record is Gtk_Scale_Record;

Gtk_Hscale

subtype Gtk_Hscale is Gtk_Scale;

Gtk_Vscale_Record

subtype Gtk_Vscale_Record is Gtk_Scale_Record;

Gtk_Vscale

subtype Gtk_Vscale is Gtk_Scale;

Constants & Global variables

Number_Of_Digits_Property (Glib.Properties.Property_Int)

Number_Of_Digits_Property : constant Glib.Properties.Property_Int;

Signal_Format_Value (Glib.Signal_Name)

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

Subprograms & Entries

Get_Type

function Get_Type return Glib.GType;

Gtk_New_Hscale

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

Initialize_Hscale

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

Gtk_New_Hscale

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

Initialize_Hscale

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

function Hscale_Get_Type return Glib.GType;

Gtk_New_Vscale

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

Initialize_Vscale

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

Gtk_New_Vscale

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

Initialize_Vscale

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

function Vscale_Get_Type return Glib.GType;

Add_Mark

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

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

function Get_Digits 
(Scale: access Gtk_Scale_Record) return Gint;

Set_Digits

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

function Get_Draw_Value 
(Scale: access Gtk_Scale_Record) return Boolean;

Set_Draw_Value

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

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

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

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

Set_Value_Pos

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

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

Set_Orientation

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