## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --              GtkAda - Ada95 binding for Gtk+/Gnome                --

3.     --                                                                   --

4.     --                Copyright (C) 2006-2007 AdaCore                    --

5.     --                                                                   --

6.     -- This library is free software; you can redistribute it and/or     --

7.     -- modify it under the terms of the GNU General Public               --

8.     -- License as published by the Free Software Foundation; either      --

9.     -- version 2 of the License, or (at your option) any later version.  --

10.     --                                                                   --

11.     -- This library is distributed in the hope that it will be useful,   --

12.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

13.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

14.     -- General Public License for more details.                          --

15.     --                                                                   --

16.     -- You should have received a copy of the GNU General Public         --

17.     -- License along with this library; if not, write to the             --

18.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

19.     -- Boston, MA 02111-1307, USA.                                       --

20.     --                                                                   --

21.     -- As a special exception, if other files instantiate generics from  --

22.     -- this unit, or you link this unit with other files to produce an   --

23.     -- executable, this  unit  does not  by itself cause  the resulting  --

24.     -- executable to be covered by the GNU General Public License. This  --

25.     -- exception does not however invalidate any other reasons why the   --

26.     -- executable file  might be covered by the  GNU Public License.     --

27.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  A Gtk_Toggle_Action corresponds roughly to a Gtk_Check_Menu_Item. It has an

31.     --  "active" state specifying whether the action has been checked or not.

32.     --  </description>

33.     --  <c_version>2.8.17</c_version>

34.     --  <group>Action-based menus</group>

35.     --  <see>Gtk.Action</see>

37.     with Glib.PropertiesTo API docTo specTo body;

38.     with Gtk.ActionTo API docTo specTo body;

40.     package Gtk.Toggle_ActionTo API docTo specTo body is

42.        type Gtk_Toggle_Action_Record is new Gtk.Action.Gtk_Action_RecordTo API docTo specTo body with

43.          null record;

44.        type Gtk_Toggle_Action is access all Gtk_Toggle_Action_RecordTo API docTo spec'Class;

46.        procedure Gtk_NewTo API docTo body

47.          (Action   : out Gtk_Toggle_ActionTo API docTo spec;

48.           Name     : String;

49.           Label    : String := "";

50.           Tooltip  : String := "";

51.           Stock_Id : String := "");

52.        procedure InitializeTo API docTo body

53.          (Action   : access Gtk_Toggle_Action_RecordTo API docTo spec'Class;

54.           Name     : String;

55.           Label    : String := "";

56.           Tooltip  : String := "";

57.           Stock_Id : String := "");

58.        --  Creates a new Gtk_Toggle_Action object. To add the action to

59.        --  a Gtk_Action_Group and set the accelerator for the action,

60.        --  call Gtk.Action_Group.Add_Action_With_Accel.

62.        function Get_TypeTo API docTo body return GTypeTo API docTo spec;

63.        --  Return the internal type associated with Gtk_Toggle_Action.

65.        procedure Set_ActiveTo API docTo body

66.          (Action : access Gtk_Toggle_Action_RecordTo API docTo spec; Is_Active : Boolean);

67.        function Get_ActiveTo API docTo body

68.          (Action : access Gtk_Toggle_Action_RecordTo API docTo spec) return Boolean;

69.        --  Returns the checked state of the toggle action.

71.        procedure Set_Draw_As_RadioTo API docTo body

72.          (Action : access Gtk_Toggle_Action_RecordTo API docTo spec; Draw_As_Radio : Boolean);

73.        function Get_Draw_As_RadioTo API docTo body

74.          (Action : access Gtk_Toggle_Action_RecordTo API docTo spec) return Boolean;

75.        --  Returns whether the action should have proxies like a radio action. This

76.        --  changes the display of widgets associated with that action.

78.        ----------------

79.        -- Properties --

80.        ----------------

82.        --  <properties>

83.        --  The following properties are defined for this widget. See

84.        --  Glib.Properties for more information on properties.

85.        --

86.        --  Name:  Draw_As_Radio_Property

87.        --  Type:  Boolean

88.        --  Descr: Whether the proxies for this action look like radio action

89.        --         proxies

90.        --

91.        --  </properties>

93.        Draw_As_Radio_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

95.        -------------

96.        -- Signals --

97.        -------------

99.        --  <signals>

100.        --  The following new signals are defined for this widget:

101.        --

102.        --  - "toggled"

103.        --    procedure Handler (Toggled : access Gtk_Toggle_Action_Record'Class);

104.        --    Called when the state of the action is toggled.

105.        --

106.        --  </signals>

108.        Signal_Toggled : constant Glib.Signal_NameTo API docTo spec := "toggled";

110.        procedure ToggledTo API docTo body (Action : access Gtk_Toggle_Action_RecordTo API docTo spec);

111.        --  Emits the "toggled" signal on the toggle action.

113.     private

114.        Draw_As_Radio_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

115.          Glib.Properties.BuildTo API docTo specTo body ("draw-as-radio");

117.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_toggle_action_get_type");

118.     end Gtk.Toggle_ActionTo API docTo specTo body;