Gtk.Toggle_Action

Entities

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

A Gtk.Toggle_Action.Gtk_Toggle_Action corresponds roughly to a Gtk.Check_Menu_Item.Gtk_Check_Menu_Item. It has an "active" state specifying whether the action has been checked or not.

"+"

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

"-"

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

Active_Property

Active_Property : constant Glib.Properties.Property_Boolean;

Whether the toggle action should be active.

Cb_GObject_Void

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

Cb_Gtk_Toggle_Action_Void

type Cb_Gtk_Toggle_Action_Void is not null access procedure
  (Self : access Gtk_Toggle_Action_Record'Class);
Parameters
Self

Draw_As_Radio_Property

Draw_As_Radio_Property : constant Glib.Properties.Property_Boolean;

Whether the proxies for this action look like radio action proxies.

This is an appearance property and thus only applies if Gtk.Activatable.Gtk_Activatable:use-action-appearance is True.

Get_Active

function Get_Active
   (Action : not null access Gtk_Toggle_Action_Record) return Boolean

Returns the checked state of the toggle action. Since: gtk+ 2.4 Deprecated since 3.10, 1

Parameters
Action
Return Value

the checked state of the toggle action

Get_Draw_As_Radio

function Get_Draw_As_Radio
   (Action : not null access Gtk_Toggle_Action_Record) return Boolean

Returns whether the action should have proxies like a radio action. Since: gtk+ 2.4 Deprecated since 3.10, 1

Parameters
Action
Return Value

whether the action should have proxies like a radio action.

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_New

procedure Gtk_New
   (Action   : out Gtk_Toggle_Action;
    Name     : UTF8_String;
    Label    : UTF8_String := "";
    Tooltip  : UTF8_String := "";
    Stock_Id : UTF8_String := "")

Creates a new Gtk.Toggle_Action.Gtk_Toggle_Action object. To add the action to a Gtk.Action_Group.Gtk_Action_Group and set the accelerator for the action, call Gtk.Action_Group.Add_Action_With_Accel. Since: gtk+ 2.4 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Action
Name

A unique name for the action

Label

The label displayed in menu items and on buttons, or null

Tooltip

A tooltip for the action, or null

Stock_Id

The stock icon to display in widgets representing the action, or null

Gtk_Toggle_Action

type Gtk_Toggle_Action is access all Gtk_Toggle_Action_Record'Class;

Gtk_Toggle_Action_New

function Gtk_Toggle_Action_New
   (Name     : UTF8_String;
    Label    : UTF8_String := "";
    Tooltip  : UTF8_String := "";
    Stock_Id : UTF8_String := "") return Gtk_Toggle_Action

Creates a new Gtk.Toggle_Action.Gtk_Toggle_Action object. To add the action to a Gtk.Action_Group.Gtk_Action_Group and set the accelerator for the action, call Gtk.Action_Group.Add_Action_With_Accel. Since: gtk+ 2.4

Parameters
Name

A unique name for the action

Label

The label displayed in menu items and on buttons, or null

Tooltip

A tooltip for the action, or null

Stock_Id

The stock icon to display in widgets representing the action, or null

Return Value

Gtk_Toggle_Action_Record

type Gtk_Toggle_Action_Record is new Gtk_Action_Record with null record;

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Toggle_Action_Record, Gtk_Toggle_Action);

Initialize

procedure Initialize
   (Action   : not null access Gtk_Toggle_Action_Record'Class;
    Name     : UTF8_String;
    Label    : UTF8_String := "";
    Tooltip  : UTF8_String := "";
    Stock_Id : UTF8_String := "")

Creates a new Gtk.Toggle_Action.Gtk_Toggle_Action object. To add the action to a Gtk.Action_Group.Gtk_Action_Group and set the accelerator for the action, call Gtk.Action_Group.Add_Action_With_Accel. Since: gtk+ 2.4 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Action
Name

A unique name for the action

Label

The label displayed in menu items and on buttons, or null

Tooltip

A tooltip for the action, or null

Stock_Id

The stock icon to display in widgets representing the action, or null

On_Toggled

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

Should be connected if you wish to perform an action whenever the Gtk.Toggle_Action.Gtk_Toggle_Action state is changed.

Parameters
Self
Call
Slot
After

On_Toggled

procedure On_Toggled
   (Self  : not null access Gtk_Toggle_Action_Record;
    Call  : Cb_Gtk_Toggle_Action_Void;
    After : Boolean := False)

Should be connected if you wish to perform an action whenever the Gtk.Toggle_Action.Gtk_Toggle_Action state is changed.

Parameters
Self
Call
After

Set_Active

procedure Set_Active
   (Action    : not null access Gtk_Toggle_Action_Record;
    Is_Active : Boolean)

Sets the checked state on the toggle action. Since: gtk+ 2.4 Deprecated since 3.10, 1

Parameters
Action
Is_Active

whether the action should be checked or not

Set_Draw_As_Radio

procedure Set_Draw_As_Radio
   (Action        : not null access Gtk_Toggle_Action_Record;
    Draw_As_Radio : Boolean)

Sets whether the action should have proxies like a radio action. Since: gtk+ 2.4 Deprecated since 3.10, 1

Parameters
Action
Draw_As_Radio

whether the action should have proxies like a radio action

Signal_Toggled

Signal_Toggled : constant Glib.Signal_Name := "toggled";

Should be connected if you wish to perform an action whenever the Gtk.Toggle_Action.Gtk_Toggle_Action state is changed.

Toggled

procedure Toggled (Action : not null access Gtk_Toggle_Action_Record)

Emits the "toggled" signal on the toggle action. Since: gtk+ 2.4 Deprecated since 3.10, 1

Parameters
Action