Gtk.Check_Menu_Item

Entities

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

A Gtk.Check_Menu_Item.Gtk_Check_Menu_Item is a menu item that maintains the state of a boolean value in addition to a Gtk.Menu_Item.Gtk_Menu_Item usual role in activating application code.

A check box indicating the state of the boolean value is displayed at the left side of the Gtk.Menu_Item.Gtk_Menu_Item. Activating the Gtk.Menu_Item.Gtk_Menu_Item toggles the value.

# CSS nodes

menuitem
├── check.left
╰── <child>

GtkCheckMenuItem has a main CSS node with name menuitem, and a subnode with name check, which gets the .left or .right style class.

"+"

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

"+"

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

"+"

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

"-"

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

"-"

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

"-"

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

Active_Property

Active_Property : constant Glib.Properties.Property_Boolean;

Cb_GObject_Void

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

Cb_Gtk_Check_Menu_Item_Void

type Cb_Gtk_Check_Menu_Item_Void is not null access procedure
  (Self : access Gtk_Check_Menu_Item_Record'Class);
Parameters
Self

Do_Set_Related_Action

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

Draw_As_Radio_Property

Draw_As_Radio_Property : constant Glib.Properties.Property_Boolean;

Get_Action_Name

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

Get_Action_Target_Value

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

Get_Active

function Get_Active
   (Check_Menu_Item : not null access Gtk_Check_Menu_Item_Record)
    return Boolean

Returns whether the check menu item is active. See gtk_check_menu_item_set_active ().

Parameters
Check_Menu_Item
Return Value

True if the menu item is checked.

Get_Draw_As_Radio

function Get_Draw_As_Radio
   (Check_Menu_Item : not null access Gtk_Check_Menu_Item_Record)
    return Boolean

Returns whether Check_Menu_Item looks like a Gtk.Radio_Menu_Item.Gtk_Radio_Menu_Item Since: gtk+ 2.4

Parameters
Check_Menu_Item
Return Value

Whether Check_Menu_Item looks like a Gtk.Radio_Menu_Item.Gtk_Radio_Menu_Item

Get_Inconsistent

function Get_Inconsistent
   (Check_Menu_Item : not null access Gtk_Check_Menu_Item_Record)
    return Boolean

Retrieves the value set by Gtk.Check_Menu_Item.Set_Inconsistent.

Parameters
Check_Menu_Item
Return Value

True if inconsistent

Get_Related_Action

function Get_Related_Action
   (Self : not null access Gtk_Check_Menu_Item_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_Check_Menu_Item_Record) return Boolean
Parameters
Self
Return Value

Gtk_Check_Menu_Item

type Gtk_Check_Menu_Item is access all Gtk_Check_Menu_Item_Record'Class;

Gtk_Check_Menu_Item_New_With_Label

function Gtk_Check_Menu_Item_New_With_Label
   (Label : UTF8_String := "") return Gtk_Check_Menu_Item

Creates a new Gtk.Check_Menu_Item.Gtk_Check_Menu_Item with a label.

Parameters
Label

the string to use for the label.

Return Value

Gtk_Check_Menu_Item_New_With_Mnemonic

function Gtk_Check_Menu_Item_New_With_Mnemonic
   (Label : UTF8_String) return Gtk_Check_Menu_Item

Creates a new Gtk.Check_Menu_Item.Gtk_Check_Menu_Item containing a label. The label will be created using Gtk.Label.Gtk_New_With_Mnemonic, so underscores in Label indicate the mnemonic for the menu item.

Parameters
Label

The text of the button, with an underscore in front of the character

Return Value

Gtk_Check_Menu_Item_Record

type Gtk_Check_Menu_Item_Record is new Gtk_Menu_Item_Record with null record;

Gtk_New

procedure Gtk_New
   (Check_Menu_Item : out Gtk_Check_Menu_Item;
    Label           : UTF8_String := "")

Creates a new Gtk.Check_Menu_Item.Gtk_Check_Menu_Item with a label. Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Check_Menu_Item
Label

the string to use for the label.

Gtk_New_With_Mnemonic

procedure Gtk_New_With_Mnemonic
   (Check_Menu_Item : out Gtk_Check_Menu_Item;
    Label           : UTF8_String)

Creates a new Gtk.Check_Menu_Item.Gtk_Check_Menu_Item containing a label. The label will be created using Gtk.Label.Gtk_New_With_Mnemonic, so underscores in Label indicate the mnemonic for the menu item. Initialize_With_Mnemonic does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Check_Menu_Item
Label

The text of the button, with an underscore in front of the character

Implements_Gtk_Actionable

package Implements_Gtk_Actionable is new Glib.Types.Implements
  (Gtk.Actionable.Gtk_Actionable, Gtk_Check_Menu_Item_Record, Gtk_Check_Menu_Item);

Implements_Gtk_Activatable

package Implements_Gtk_Activatable is new Glib.Types.Implements
  (Gtk.Activatable.Gtk_Activatable, Gtk_Check_Menu_Item_Record, Gtk_Check_Menu_Item);

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Check_Menu_Item_Record, Gtk_Check_Menu_Item);

Inconsistent_Property

Inconsistent_Property : constant Glib.Properties.Property_Boolean;

Initialize

procedure Initialize
   (Check_Menu_Item : not null access Gtk_Check_Menu_Item_Record'Class;
    Label           : UTF8_String := "")

Creates a new Gtk.Check_Menu_Item.Gtk_Check_Menu_Item with a label. Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Check_Menu_Item
Label

the string to use for the label.

Initialize_With_Mnemonic

procedure Initialize_With_Mnemonic
   (Check_Menu_Item : not null access Gtk_Check_Menu_Item_Record'Class;
    Label           : UTF8_String)

Creates a new Gtk.Check_Menu_Item.Gtk_Check_Menu_Item containing a label. The label will be created using Gtk.Label.Gtk_New_With_Mnemonic, so underscores in Label indicate the mnemonic for the menu item. Initialize_With_Mnemonic does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Check_Menu_Item
Label

The text of the button, with an underscore in front of the character

On_Toggled

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

This signal is emitted when the state of the check box is changed.

A signal handler can use Gtk.Check_Menu_Item.Get_Active to discover the new state.

Parameters
Self
Call
Slot
After

On_Toggled

procedure On_Toggled
   (Self  : not null access Gtk_Check_Menu_Item_Record;
    Call  : Cb_Gtk_Check_Menu_Item_Void;
    After : Boolean := False)

This signal is emitted when the state of the check box is changed.

A signal handler can use Gtk.Check_Menu_Item.Get_Active to discover the new state.

Parameters
Self
Call
After

Set_Action_Name

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

Set_Action_Target_Value

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

Set_Active

procedure Set_Active
   (Check_Menu_Item : not null access Gtk_Check_Menu_Item_Record;
    Is_Active       : Boolean)

Sets the active state of the menu item's check box.

Parameters
Check_Menu_Item
Is_Active

boolean value indicating whether the check box is active.

Set_Detailed_Action_Name

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

Set_Draw_As_Radio

procedure Set_Draw_As_Radio
   (Check_Menu_Item : not null access Gtk_Check_Menu_Item_Record;
    Draw_As_Radio   : Boolean)

Sets whether Check_Menu_Item is drawn like a Gtk.Radio_Menu_Item.Gtk_Radio_Menu_Item Since: gtk+ 2.4

Parameters
Check_Menu_Item
Draw_As_Radio

whether Check_Menu_Item is drawn like a Gtk.Radio_Menu_Item.Gtk_Radio_Menu_Item

Set_Inconsistent

procedure Set_Inconsistent
   (Check_Menu_Item : not null access Gtk_Check_Menu_Item_Record;
    Setting         : Boolean)

If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a boolean setting, and the current values in that range are inconsistent, you may want to display the check in an "in between" state. This function turns on "in between" display. Normally you would turn off the inconsistent state again if the user explicitly selects a setting. This has to be done manually, Gtk.Check_Menu_Item.Set_Inconsistent only affects visual appearance, it doesn't affect the semantics of the widget.

Parameters
Check_Menu_Item
Setting

True to display an "inconsistent" third state check

Set_Related_Action

procedure Set_Related_Action
   (Self   : not null access Gtk_Check_Menu_Item_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_Check_Menu_Item_Record;
    Use_Appearance : Boolean)
Parameters
Self
Use_Appearance

Signal_Toggled

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

This signal is emitted when the state of the check box is changed.

A signal handler can use Gtk.Check_Menu_Item.Get_Active to discover the new state.

Sync_Action_Properties

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

Toggled

procedure Toggled
   (Check_Menu_Item : not null access Gtk_Check_Menu_Item_Record)

Emits the Gtk.Check_Menu_Item.Gtk_Check_Menu_Item::toggled signal.

Parameters
Check_Menu_Item