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.

Binding from C File version 2.16.6

Screenshot

gtk-scale.png

Classes

Gtk_Scale_Record

type Gtk_Scale_Record is new Gtk.GRange.Gtk_Range_Record with private;

Ancestors:

Immediate Children:

Primitive operations:

Get_Draw_Value
Get_Layout_Offsets
Get_Value_Pos
Glib.Object.Deallocate (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Unref (Inherited)
Gtk.GRange.Get_Adjustment (Inherited)
Gtk.GRange.Get_Inverted (Inherited)
Gtk.GRange.Get_Update_Policy (Inherited)
Gtk.GRange.Get_Value (Inherited)
Gtk.GRange.Set_Adjustment (Inherited)
Gtk.GRange.Set_Increments (Inherited)
Gtk.GRange.Set_Inverted (Inherited)
Gtk.GRange.Set_Range (Inherited)
Gtk.GRange.Set_Update_Policy (Inherited)
Gtk.GRange.Set_Value (Inherited)
Gtk.Object.Destroy (Inherited)
Gtk.Object.Flag_Is_Set (Inherited)
Gtk.Object.Flags (Inherited)
Gtk.Object.Get_Type (Inherited)
Gtk.Object.Set_Flags (Inherited)
Gtk.Object.Sink (Inherited)
Gtk.Object.Unset_Flags (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.Draw (Inherited)
Gtk.Widget.Ensure_Style (Inherited)
Gtk.Widget.Error_Bell (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_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)
Set_Draw_Value
Set_Value_Pos

Types

Gtk_Hscale_Record

subtype Gtk_Hscale_Record is Gtk_Scale_Record;

Gtk_Vscale_Record

subtype Gtk_Vscale_Record is Gtk_Scale_Record;

Gtk_Scale

type Gtk_Scale is access all Gtk_Scale_Record'Class;

Gtk_Hscale

subtype Gtk_Hscale is Gtk_Scale;

Gtk_Vscale

subtype Gtk_Vscale is Gtk_Scale;

Constants & Global variables

Slider_Length_Property (Glib.Properties.Property_Int)

Slider_Length_Property : constant Glib.Properties.Property_Int;

Value_Spacing_Property (Glib.Properties.Property_Int)

Value_Spacing_Property : constant Glib.Properties.Property_Int;

Signal_Format_Value (Glib.Signal_Name)

Signal_Format_Value : constant Glib.Signal_Name := "format_value";

Subprograms & Entries

Gtk_New_Hscale

procedure Gtk_New_Hscale 
(Scale: out Gtk_Scale;
Adjustment: Gtk.Adjustment.Gtk_Adjustment);

Gtk_New_Hscale

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.

Gtk_New_Vscale

procedure Gtk_New_Vscale 
(Scale: out Gtk_Scale;
Adjustment: Gtk.Adjustment.Gtk_Adjustment);

Gtk_New_Vscale

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.

Get_Type

function Get_Type        return Gtk.Gtk_Type;

Hscale_Get_Type

function Hscale_Get_Type return GType;

Vscale_Get_Type

function Vscale_Get_Type return GType;
Return the internal value associated with a Gtk_Scale, a Gtk_Hscale or a Gtk_Vscale.

Initialize_Hscale

procedure Initialize_Hscale 
(Scale: access Gtk_Scale_Record'Class;
Adjustment: Gtk.Adjustment.Gtk_Adjustment);

Initialize_Hscale

procedure Initialize_Hscale 
(Scale: access Gtk_Scale_Record'Class;
Min: Gdouble;
Max: Gdouble;
Step: Gdouble);
Internal initialization procedure.

Initialize_Vscale

procedure Initialize_Vscale 
(Scale: access Gtk_Scale_Record'Class;
Adjustment: Gtk.Adjustment.Gtk_Adjustment);

Initialize_Vscale

procedure Initialize_Vscale 
(Scale: access Gtk_Scale_Record'Class;
Min: Gdouble;
Max: Gdouble;
Step: Gdouble);
Internal initialization procedure.

Set_Digits

procedure Set_Digits 
(Scale: access Gtk_Scale_Record;
The_Digits: Gint);

Get_Digits

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.

Set_Draw_Value

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

Get_Draw_Value

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.

Set_Value_Pos

procedure Set_Value_Pos 
(Scale: access Gtk_Scale_Record;
Pos: Gtk_Position_Type);

Get_Value_Pos

function Get_Value_Pos 
(Scale: access Gtk_Scale_Record) return Gtk_Position_Type;
Sets the position in which the current value is displayed.

Get_Layout

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.

Get_Layout_Offsets

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.

Add_Mark

procedure Add_Mark 
(Scale: access Gtk_Scale_Record;
Value: Gdouble;
Position: Gtk_Position_Type;
Markup: 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. For a horizontal scale, Pos_Top is drawn above the scale, anything else below. For a vertical scale, Pos_Left is drawn to the left of the scale, anything else to the right. If Markup is not "", text (in Pango Markup format) is shown next to the tick mark. To remove marks from a scale, use Clear_Marks.

Clear_Marks

procedure Clear_Marks 
(Scale: access Gtk_Scale_Record);
Removes any marks that have been added Add_Mark.