## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   --

5.     --                Copyright (C) 2000-2013, AdaCore                   --

6.     --                                                                   --

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

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

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

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

11.     --                                                                   --

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

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

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

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

16.     --                                                                   --

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

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

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

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

21.     --                                                                   --

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

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

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

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

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

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

28.     -----------------------------------------------------------------------

30.     --  <description>

31.     --  A Gtk_Radio_Action is similar to Gtk_Radio_Menu_Item. A number of radio

32.     --  actions can be linked together so that only one may be active at any one

33.     --  time.

34.     --

35.     --  </description>

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

37.     --  <see>Gtk_Action</see>

39.     pragma Warnings (Off, "*is already use-visible*");

40.     with GlibTo API docTo specTo body;              use GlibTo API docTo specTo body;

41.     with Glib.PropertiesTo API docTo specTo body;   use Glib.PropertiesTo API docTo specTo body;

42.     with Glib.TypesTo API docTo specTo body;        use Glib.TypesTo API docTo specTo body;

43.     with Gtk.BuildableTo API docTo specTo body;     use Gtk.BuildableTo API docTo specTo body;

44.     with Gtk.Toggle_ActionTo API docTo specTo body; use Gtk.Toggle_ActionTo API docTo specTo body;

45.     with Gtk.WidgetTo API docTo specTo body;        use Gtk.WidgetTo API docTo specTo body;

47.     package Gtk.Radio_ActionTo API docTo specTo body is

49.        type Gtk_Radio_Action_Record is new Gtk_Toggle_Action_RecordTo API docTo spec with null record;

50.        type Gtk_Radio_Action is access all Gtk_Radio_Action_RecordTo API docTo spec'Class;

52.        ------------------

53.        -- Constructors --

54.        ------------------

56.        procedure Gtk_NewTo API docTo body

57.           (Action   : out Gtk_Radio_ActionTo API docTo spec;

58.            Name     : UTF8_StringTo API docTo spec;

59.            Label    : UTF8_StringTo API docTo spec := "";

60.            Tooltip  : UTF8_StringTo API docTo spec := "";

61.            Stock_Id : UTF8_StringTo API docTo spec := "";

62.            Value    : GintTo API docTo spec);

63.        procedure InitializeTo API docTo body

64.           (Action   : access Gtk_Radio_Action_RecordTo API docTo spec'Class;

65.            Name     : UTF8_StringTo API docTo spec;

66.            Label    : UTF8_StringTo API docTo spec := "";

67.            Tooltip  : UTF8_StringTo API docTo spec := "";

68.            Stock_Id : UTF8_StringTo API docTo spec := "";

69.            Value    : GintTo API docTo spec);

70.        --  Creates a new Gtk.Radio_Action.Gtk_Radio_Action object. To add the

71.        --  action to a Gtk.Actiongroup.Gtk_Actiongroup and set the accelerator for

72.        --  the action, call Gtk.Action_Group.Add_Action_With_Accel.

73.        --  Since: gtk+ 2.4

74.        --  "name": A unique name for the action

75.        --  "label": The label displayed in menu items and on buttons, or null

76.        --  "tooltip": A tooltip for this action, or null

77.        --  "stock_id": The stock icon to display in widgets representing this

78.        --  action, or null

79.        --  "value": The value which Gtk.Radio_Action.Get_Current_Value should

80.        --  return if this action is selected.

82.        function Get_TypeTo API docTo body return Glib.GTypeTo API docTo spec;

83.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_radio_action_get_type");

85.        -------------

86.        -- Methods --

87.        -------------

89.        function Get_Current_ValueTo API docTo body

90.           (Action : access Gtk_Radio_Action_RecordTo API docTo spec) return GintTo API docTo spec;

91.        procedure Set_Current_ValueTo API docTo body

92.           (Action        : access Gtk_Radio_Action_RecordTo API docTo spec;

93.            Current_Value : GintTo API docTo spec);

94.        --  Sets the currently active group member to the member with value

95.        --  property Current_Value.

96.        --  Since: gtk+ 2.10

97.        --  "current_value": the new value

99.        function Get_GroupTo API docTo body

100.           (Action : access Gtk_Radio_Action_RecordTo API docTo spec)

101.            return Gtk.Widget.Widget_SList.GSlistTo API docTo specTo body;

102.        procedure Set_GroupTo API docTo body

103.           (Action : access Gtk_Radio_Action_RecordTo API docTo spec;

104.            GroupTo API docTo body  : Gtk.Widget.Widget_SList.GSlistTo API docTo specTo body);

105.        --  Sets the radio group for the radio action object.

106.        --  A common way to set up a group of radio group is the following:

107.        --       Group  : GSlist := null;

108.        --       Action : Gtk_Radio_Action;

109.        --       while ... loop

110.        --          Gtk_New (Action, ...);

111.        --          Set_Group (Action, Group);

112.        --          Group := Get_Group (Action);

113.        --       end loop;

114.        --  Since: gtk+ 2.4

115.        --  "group": a list representing a radio group

117.        ----------------

118.        -- Interfaces --

119.        ----------------

120.        --  This class implements several interfaces. See Glib.Types

121.        --

122.        --  - "Buildable"

124.        package Implements_Buildable is new Glib.Types.ImplementsTo API docTo specTo body

125.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Radio_Action_RecordTo API docTo spec, Gtk_Radio_ActionTo API docTo spec);

126.        function "+"

127.          (Widget : access Gtk_Radio_Action_RecordTo API docTo spec'Class)

128.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

129.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

130.        function "-"

131.          (Interf : Gtk.Buildable.Gtk_BuildableTo API docTo spec)

132.        return Gtk_Radio_ActionTo API docTo spec

133.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

135.        ----------------

136.        -- Properties --

137.        ----------------

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

139.        --  Glib.Properties for more information on properties)

140.        --

141.        --  Name: Current_Value_Property

142.        --  Type: Gint

143.        --  Flags: read-write

144.        --  The value property of the currently active member of the group to which

145.        --  this action belongs.

146.        --

147.        --  Name: Group_Property

148.        --  Type: Gtk_Radio_Action

149.        --  Flags: write

150.        --  Sets a new group for a radio action.

151.        --

152.        --  Name: Value_Property

153.        --  Type: Gint

154.        --  Flags: read-write

155.        --  The value is an arbitrary integer which can be used as a convenient way

156.        --  to determine which action in the group is currently active in an

157.        --  ::activate or ::changed signal handler. See

158.        --  Gtk.Radio_Action.Get_Current_Value and GtkRadioActionEntry for

159.        --  convenient ways to get and set this property.

161.        Current_Value_Property : constant Glib.Properties.Property_IntTo API docTo spec;

162.        Group_Property : constant Glib.Properties.Property_ObjectTo API docTo spec;

163.        Value_Property : constant Glib.Properties.Property_IntTo API docTo spec;

165.        -------------

166.        -- Signals --

167.        -------------

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

169.        --

170.        --  "changed"

171.        --     procedure Handler

172.        --       (Self    : access Gtk_Radio_Action_Record'Class;

173.        --        Current : Gtk_Radio_Action);

174.        --    --  "current": the member of Action<!-- -->s group which has just been

175.        --    --  activated

176.        --  The ::changed signal is emitted on every member of a radio group when

177.        --  the active member is changed. The signal gets emitted after the

178.        --  ::activate signals for the previous and current active members.

180.        Signal_Changed : constant Glib.Signal_NameTo API docTo spec := "changed";

182.     private

183.        Current_Value_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

184.          Glib.Properties.BuildTo API docTo specTo body ("current-value");

185.        Group_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

186.          Glib.Properties.BuildTo API docTo specTo body ("group");

187.        Value_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

188.          Glib.Properties.BuildTo API docTo specTo body ("value");

189.     end Gtk.Radio_ActionTo API docTo specTo body;