Gtk.Scale_Button

Entities

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

Gtk.Scale_Button.Gtk_Scale_Button provides a button which pops up a scale widget. This kind of widget is commonly used for volume controls in multimedia applications, and GTK+ provides a Gtk.Volume_Button.Gtk_Volume_Button subclass that is tailored for this use case.

# CSS nodes

GtkScaleButton has a single CSS node with name button. To differentiate it from a plain Gtk.Button.Gtk_Button, it gets the .scale style class.

The popup widget that contains the scale has a .scale-popup style class.

"+"

function "+"
  (Widget : access Gtk_Scale_Button_Record'Class)
return Gtk.Actionable.Gtk_Actionable
Parameters
Widget
Return Value

"+"

function "+"
  (Widget : access Gtk_Scale_Button_Record'Class)
return Gtk.Activatable.Gtk_Activatable
Parameters
Widget
Return Value

"+"

function "+"
  (Widget : access Gtk_Scale_Button_Record'Class)
return Gtk.Buildable.Gtk_Buildable
Parameters
Widget
Return Value

"+"

function "+"
  (Widget : access Gtk_Scale_Button_Record'Class)
return Gtk.Orientable.Gtk_Orientable
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Actionable.Gtk_Actionable)
return Gtk_Scale_Button
Parameters
Interf
Return Value

"-"

function "-"
  (Interf : Gtk.Activatable.Gtk_Activatable)
return Gtk_Scale_Button
Parameters
Interf
Return Value

"-"

function "-"
  (Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Scale_Button
Parameters
Interf
Return Value

"-"

function "-"
  (Interf : Gtk.Orientable.Gtk_Orientable)
return Gtk_Scale_Button
Parameters
Interf
Return Value

Adjustment_Property

Adjustment_Property : constant Glib.Properties.Property_Object;

Type: Gtk.Adjustment.Gtk_Adjustment

Cb_GObject_Gdouble_Void

type Cb_GObject_Gdouble_Void is not null access procedure
  (Self  : access Glib.Object.GObject_Record'Class;
   Value : Gdouble);
Parameters
Self
Value

Cb_GObject_Void

type Cb_GObject_Void is not null access procedure
  (Self : access Glib.Object.GObject_Record'Class);
Parameters
Self

Cb_Gtk_Scale_Button_Gdouble_Void

type Cb_Gtk_Scale_Button_Gdouble_Void is not null access procedure
  (Self  : access Gtk_Scale_Button_Record'Class;
   Value : Gdouble);
Parameters
Self
Value

Cb_Gtk_Scale_Button_Void

type Cb_Gtk_Scale_Button_Void is not null access procedure
  (Self : access Gtk_Scale_Button_Record'Class);
Parameters
Self

Do_Set_Related_Action

procedure Do_Set_Related_Action
   (Self   : not null access Gtk_Scale_Button_Record;
    Action : not null access Gtk.Action.Gtk_Action_Record'Class)
Parameters
Self
Action

Get_Action_Name

function Get_Action_Name
   (Self : not null access Gtk_Scale_Button_Record) return UTF8_String
Parameters
Self
Return Value

Get_Action_Target_Value

function Get_Action_Target_Value
   (Self : not null access Gtk_Scale_Button_Record)
    return Glib.Variant.Gvariant
Parameters
Self
Return Value

Get_Adjustment

function Get_Adjustment
   (Button : not null access Gtk_Scale_Button_Record)
    return Gtk.Adjustment.Gtk_Adjustment

Gets the Gtk.Adjustment.Gtk_Adjustment associated with the Gtk.Scale_Button.Gtk_Scale_Button's scale. See Gtk.GRange.Get_Adjustment for details. Since: gtk+ 2.12

Parameters
Button
Return Value

the adjustment associated with the scale

Get_Minus_Button

function Get_Minus_Button
   (Button : not null access Gtk_Scale_Button_Record)
    return Gtk.Widget.Gtk_Widget

Retrieves the minus button of the Gtk.Scale_Button.Gtk_Scale_Button. Since: gtk+ 2.14

Parameters
Button
Return Value

the minus button of the Gtk.Scale_Button.Gtk_Scale_Button as a Gtk.Button.Gtk_Button

Get_Orientation

function Get_Orientation
   (Self : not null access Gtk_Scale_Button_Record)
    return Gtk.Enums.Gtk_Orientation
Parameters
Self
Return Value

Get_Plus_Button

function Get_Plus_Button
   (Button : not null access Gtk_Scale_Button_Record)
    return Gtk.Widget.Gtk_Widget

Retrieves the plus button of the Gtk.Scale_Button.Gtk_Scale_Button. Since: gtk+ 2.14

Parameters
Button
Return Value

the plus button of the Gtk.Scale_Button.Gtk_Scale_Button as a Gtk.Button.Gtk_Button

Get_Popup

function Get_Popup
   (Button : not null access Gtk_Scale_Button_Record)
    return Gtk.Widget.Gtk_Widget

Retrieves the popup of the Gtk.Scale_Button.Gtk_Scale_Button. Since: gtk+ 2.14

Parameters
Button
Return Value

the popup of the Gtk.Scale_Button.Gtk_Scale_Button

Get_Related_Action

function Get_Related_Action
   (Self : not null access Gtk_Scale_Button_Record)
    return Gtk.Action.Gtk_Action
Parameters
Self
Return Value

Get_Type

function Get_Type return Glib.GType
Return Value

Get_Use_Action_Appearance

function Get_Use_Action_Appearance
   (Self : not null access Gtk_Scale_Button_Record) return Boolean
Parameters
Self
Return Value

Get_Value

function Get_Value
   (Button : not null access Gtk_Scale_Button_Record) return Gdouble

Gets the current value of the scale button. Since: gtk+ 2.12

Parameters
Button
Return Value

current value of the scale button

Gtk_New

procedure Gtk_New
   (Button : out Gtk_Scale_Button;
    Size   : Gtk.Enums.Gtk_Icon_Size;
    Min    : Gdouble;
    Max    : Gdouble;
    Step   : Gdouble;
    Icons  : GNAT.Strings.String_List)

Creates a Gtk.Scale_Button.Gtk_Scale_Button, with a range between Min and Max, with a stepping of Step. Since: gtk+ 2.12 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Button
Size

a stock icon size (Gtk.Enums.Gtk_Icon_Size)

Min

the minimum value of the scale (usually 0)

Max

the maximum value of the scale (usually 100)

Step

the stepping of value when a scroll-wheel event, or up/down arrow event occurs (usually 2)

Icons

a null-terminated array of icon names, or null if you want to set the list later with Gtk.Scale_Button.Set_Icons

Gtk_Scale_Button

type Gtk_Scale_Button is access all Gtk_Scale_Button_Record'Class;

Gtk_Scale_Button_New

function Gtk_Scale_Button_New
   (Size  : Gtk.Enums.Gtk_Icon_Size;
    Min   : Gdouble;
    Max   : Gdouble;
    Step  : Gdouble;
    Icons : GNAT.Strings.String_List) return Gtk_Scale_Button

Creates a Gtk.Scale_Button.Gtk_Scale_Button, with a range between Min and Max, with a stepping of Step. Since: gtk+ 2.12

Parameters
Size

a stock icon size (Gtk.Enums.Gtk_Icon_Size)

Min

the minimum value of the scale (usually 0)

Max

the maximum value of the scale (usually 100)

Step

the stepping of value when a scroll-wheel event, or up/down arrow event occurs (usually 2)

Icons

a null-terminated array of icon names, or null if you want to set the list later with Gtk.Scale_Button.Set_Icons

Return Value

Gtk_Scale_Button_Record

type Gtk_Scale_Button_Record is new Gtk_Button_Record with null record;

Icons_Property

Icons_Property : constant Glib.Properties.Property_String :=
Glib.Properties.Build ("icons");

Unknown type: unspecified

Implements_Gtk_Actionable

package Implements_Gtk_Actionable is new Glib.Types.Implements
  (Gtk.Actionable.Gtk_Actionable, Gtk_Scale_Button_Record, Gtk_Scale_Button);

Implements_Gtk_Activatable

package Implements_Gtk_Activatable is new Glib.Types.Implements
  (Gtk.Activatable.Gtk_Activatable, Gtk_Scale_Button_Record, Gtk_Scale_Button);

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Scale_Button_Record, Gtk_Scale_Button);

Implements_Gtk_Orientable

package Implements_Gtk_Orientable is new Glib.Types.Implements
  (Gtk.Orientable.Gtk_Orientable, Gtk_Scale_Button_Record, Gtk_Scale_Button);

Initialize

procedure Initialize
   (Button : not null access Gtk_Scale_Button_Record'Class;
    Size   : Gtk.Enums.Gtk_Icon_Size;
    Min    : Gdouble;
    Max    : Gdouble;
    Step   : Gdouble;
    Icons  : GNAT.Strings.String_List)

Creates a Gtk.Scale_Button.Gtk_Scale_Button, with a range between Min and Max, with a stepping of Step. Since: gtk+ 2.12 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Button
Size

a stock icon size (Gtk.Enums.Gtk_Icon_Size)

Min

the minimum value of the scale (usually 0)

Max

the maximum value of the scale (usually 100)

Step

the stepping of value when a scroll-wheel event, or up/down arrow event occurs (usually 2)

Icons

a null-terminated array of icon names, or null if you want to set the list later with Gtk.Scale_Button.Set_Icons

On_Popdown

procedure On_Popdown
   (Self  : not null access Gtk_Scale_Button_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

The ::popdown signal is a [keybinding signal][GtkBindingSignal] which gets emitted to popdown the scale widget.

The default binding for this signal is Escape.

Parameters
Self
Call
Slot
After

On_Popdown

procedure On_Popdown
   (Self  : not null access Gtk_Scale_Button_Record;
    Call  : Cb_Gtk_Scale_Button_Void;
    After : Boolean := False)

The ::popdown signal is a [keybinding signal][GtkBindingSignal] which gets emitted to popdown the scale widget.

The default binding for this signal is Escape.

Parameters
Self
Call
After

On_Popup

procedure On_Popup
   (Self  : not null access Gtk_Scale_Button_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

The ::popup signal is a [keybinding signal][GtkBindingSignal] which gets emitted to popup the scale widget.

The default bindings for this signal are Space, Enter and Return.

Parameters
Self
Call
Slot
After

On_Popup

procedure On_Popup
   (Self  : not null access Gtk_Scale_Button_Record;
    Call  : Cb_Gtk_Scale_Button_Void;
    After : Boolean := False)

The ::popup signal is a [keybinding signal][GtkBindingSignal] which gets emitted to popup the scale widget.

The default bindings for this signal are Space, Enter and Return.

Parameters
Self
Call
After

On_Value_Changed

procedure On_Value_Changed
   (Self  : not null access Gtk_Scale_Button_Record;
    Call  : Cb_GObject_Gdouble_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

The ::value-changed signal is emitted when the value field has changed.

Parameters
Self
Call
Slot
After

On_Value_Changed

procedure On_Value_Changed
   (Self  : not null access Gtk_Scale_Button_Record;
    Call  : Cb_Gtk_Scale_Button_Gdouble_Void;
    After : Boolean := False)

The ::value-changed signal is emitted when the value field has changed.

Parameters
Self
Call
After

Set_Action_Name

procedure Set_Action_Name
   (Self        : not null access Gtk_Scale_Button_Record;
    Action_Name : UTF8_String := "")
Parameters
Self
Action_Name

Set_Action_Target_Value

procedure Set_Action_Target_Value
   (Self         : not null access Gtk_Scale_Button_Record;
    Target_Value : Glib.Variant.Gvariant)
Parameters
Self
Target_Value

Set_Adjustment

procedure Set_Adjustment
   (Button     : not null access Gtk_Scale_Button_Record;
    Adjustment : not null access Gtk.Adjustment.Gtk_Adjustment_Record'Class)

Sets the Gtk.Adjustment.Gtk_Adjustment to be used as a model for the Gtk.Scale_Button.Gtk_Scale_Button's scale. See Gtk.GRange.Set_Adjustment for details. Since: gtk+ 2.12

Parameters
Button
Adjustment

a Gtk.Adjustment.Gtk_Adjustment

Set_Detailed_Action_Name

procedure Set_Detailed_Action_Name
   (Self                 : not null access Gtk_Scale_Button_Record;
    Detailed_Action_Name : UTF8_String)
Parameters
Self
Detailed_Action_Name

Set_Icons

procedure Set_Icons
   (Button : not null access Gtk_Scale_Button_Record;
    Icons  : GNAT.Strings.String_List)

Sets the icons to be used by the scale button. For details, see the Gtk.Scale_Button.Gtk_Scale_Button:icons property. Since: gtk+ 2.12

Parameters
Button
Icons

a null-terminated array of icon names

Set_Orientation

procedure Set_Orientation
   (Self        : not null access Gtk_Scale_Button_Record;
    Orientation : Gtk.Enums.Gtk_Orientation)
Parameters
Self
Orientation

Set_Related_Action

procedure Set_Related_Action
   (Self   : not null access Gtk_Scale_Button_Record;
    Action : not null access Gtk.Action.Gtk_Action_Record'Class)
Parameters
Self
Action

Set_Use_Action_Appearance

procedure Set_Use_Action_Appearance
   (Self           : not null access Gtk_Scale_Button_Record;
    Use_Appearance : Boolean)
Parameters
Self
Use_Appearance

Set_Value

procedure Set_Value
   (Button : not null access Gtk_Scale_Button_Record;
    Value  : Gdouble)

Sets the current value of the scale; if the value is outside the minimum or maximum range values, it will be clamped to fit inside them. The scale button emits the Gtk.Scale_Button.Gtk_Scale_Button::value-changed signal if the value changes. Since: gtk+ 2.12

Parameters
Button
Value

new value of the scale button

Signal_Popdown

Signal_Popdown : constant Glib.Signal_Name := "popdown";

The ::popdown signal is a [keybinding signal][GtkBindingSignal] which gets emitted to popdown the scale widget.

The default binding for this signal is Escape.

Signal_Popup

Signal_Popup : constant Glib.Signal_Name := "popup";

The ::popup signal is a [keybinding signal][GtkBindingSignal] which gets emitted to popup the scale widget.

The default bindings for this signal are Space, Enter and Return.

Signal_Value_Changed

Signal_Value_Changed : constant Glib.Signal_Name := "value-changed";

The ::value-changed signal is emitted when the value field has changed.

Size_Property

Size_Property : constant Gtk.Enums.Property_Gtk_Icon_Size;

Sync_Action_Properties

procedure Sync_Action_Properties
   (Self   : not null access Gtk_Scale_Button_Record;
    Action : access Gtk.Action.Gtk_Action_Record'Class)
Parameters
Self
Action

Value_Property

Value_Property : constant Glib.Properties.Property_Double;

Type: Gdouble