## 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.     --  Activatable widgets can be connected to a Gtk_Action and reflects the

32.     --  state of its action. A Gtk_Activatable can also provide feedback through

33.     --  its action, as they are responsible for activating their related actions.

34.     --

35.     --  </description>

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

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

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

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

41.     with Gtk.ActionTo API docTo specTo body;      use Gtk.ActionTo API docTo specTo body;

43.     package Gtk.ActivatableTo API docTo specTo body is

45.        type Gtk_Activatable is new Glib.Types.GType_InterfaceTo API docTo spec;

47.        ------------------

48.        -- Constructors --

49.        ------------------

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

52.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_activatable_get_type");

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

55.        -- Methods --

56.        -------------

58.        procedure Do_Set_Related_ActionTo API docTo body

59.           (Self   : Gtk_ActivatableTo API docTo spec;

60.            Action : access Gtk.Action.Gtk_Action_RecordTo API docTo specTo body'Class);

61.        --  This is a utility function for Gtk.Activatable.Gtk_Activatable

62.        --  implementors. When implementing Gtk.Activatable.Gtk_Activatable you must

63.        --  call this when handling changes of the

64.        --  Gtk.Activatable.Gtk_Activatable:related-action, and you must also use

65.        --  this to break references in GObject->dispose. This function adds a

66.        --  reference to the currently set related action for you, it also makes

67.        --  sure the Gtk.Activatable.Gtk_Activatable->update method is called when

68.        --  the related Gtk.Action.Gtk_Action properties change and registers to the

69.        --  action's proxy list.

70.        --  Note: Be careful to call this before setting the local copy of the

71.        --  Gtk.Action.Gtk_Action property, since this function uses

72.        --  Gtk.Activatable.Get_Action to retrieve the previous action

73.        --  Since: gtk+ 2.16

74.        --  "action": the Gtk.Action.Gtk_Action to set

76.        function Get_Related_ActionTo API docTo body

77.           (Self : Gtk_ActivatableTo API docTo spec) return Gtk.Action.Gtk_ActionTo API docTo spec;

78.        procedure Set_Related_ActionTo API docTo body

79.           (Self   : Gtk_ActivatableTo API docTo spec;

80.            Action : access Gtk.Action.Gtk_Action_RecordTo API docTo specTo body'Class);

81.        --  Sets the related action on the Activatable object.

82.        --  Note: Gtk.Activatable.Gtk_Activatable implementors need to handle the

83.        --  Gtk.Activatable.Gtk_Activatable:related-action property and call

84.        --  Gtk.Toggle_Button.Do_Set_Related_Action when it changes.

85.        --  Since: gtk+ 2.16

86.        --  "action": the Gtk.Action.Gtk_Action to set

88.        function Get_Use_Action_AppearanceTo API docTo body

89.           (Self : Gtk_ActivatableTo API docTo spec) return Boolean;

90.        procedure Set_Use_Action_AppearanceTo API docTo body

91.           (Self           : Gtk_ActivatableTo API docTo spec;

92.            Use_Appearance : Boolean);

93.        --  Sets whether this activatable should reset its layout and appearance

94.        --  when setting the related action or when the action changes appearance

95.        --  Note: Gtk.Activatable.Gtk_Activatable implementors need to handle the

96.        --  Gtk.Activatable.Gtk_Activatable:use-action-appearance property and call

97.        --  Gtk.Toggle_Button.Sync_Action_Properties to update Activatable if

98.        --  needed.

99.        --  Since: gtk+ 2.16

100.        --  "use_appearance": whether to use the actions appearance

102.        procedure Sync_Action_PropertiesTo API docTo body

103.           (Self   : Gtk_ActivatableTo API docTo spec;

104.            Action : access Gtk.Action.Gtk_Action_RecordTo API docTo specTo body'Class);

105.        --  This is called to update the activatable completely, this is called

106.        --  internally when the Gtk.Activatable.Gtk_Activatable::related-action

107.        --  property is set or unset and by the implementing class when

108.        --  Gtk.Activatable.Gtk_Activatable::use-action-appearance changes.

109.        --  Since: gtk+ 2.16

110.        --  "action": the related Gtk.Action.Gtk_Action or null

112.        ----------------

113.        -- Properties --

114.        ----------------

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

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

117.        --

118.        --  Name: Related_Action_Property

119.        --  Type: Gtk.Action.Gtk_Action

120.        --  Flags: read-write

121.        --  The action that this activatable will activate and receive updates from

122.        --  for various states and possibly appearance.

123.        --  Note: Gtk.Activatable.Gtk_Activatable implementors need to handle the

124.        --  this property and call Gtk.Activatable.Do_Set_Related_Action when it

125.        --  changes.

126.        --

127.        --  Name: Use_Action_Appearance_Property

128.        --  Type: Boolean

129.        --  Flags: read-write

130.        --  Whether this activatable should reset its layout and appearance when

131.        --  setting the related action or when the action changes appearance. See

132.        --  the Gtk.Action.Gtk_Action documentation directly to find which

133.        --  properties should be ignored by the Gtk.Activatable.Gtk_Activatable when

134.        --  this property is False.

135.        --  Note: Gtk.Activatable.Gtk_Activatable implementors need to handle this

136.        --  property and call Gtk.Activatable.Sync_Action_Properties on the

137.        --  activatable widget when it changes.

139.        Related_Action_Property : constant Glib.Properties.Property_ObjectTo API docTo spec;

140.        Use_Action_Appearance_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

142.     private

143.        Related_Action_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

144.          Glib.Properties.BuildTo API docTo specTo body ("related-action");

145.        Use_Action_Appearance_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

146.          Glib.Properties.BuildTo API docTo specTo body ("use-action-appearance");

147.     end Gtk.ActivatableTo API docTo specTo body;