## 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.     --  This widget is a container that catches events for its child when its

32.     --  child does not have its own window (like a Gtk_Scrolled_Window or a

33.     --  Gtk_Label for instance). Some widgets in GtkAda do not have their own

34.     --  window, and thus can not directly get events from the server. The

35.     --  Gtk_Event_Box widget can be used to force its child to receive events

36.     --  anyway.

37.     --

38.     --  For instance, this widget is used internally in a Gtk_Combo_Box so that

39.     --  the application can change the cursor when the mouse is in the popup

40.     --  window. In that case, it contains a frame, that itself contains the

41.     --  scrolled window of the popup.

42.     --

43.     --  </description>

44.     --  <group>Layout Containers</group>

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

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

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

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

50.     with Gtk.BinTo API docTo specTo body;         use Gtk.BinTo API docTo specTo body;

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

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

54.     package Gtk.Event_BoxTo API docTo specTo body is

56.        type Gtk_Event_Box_Record is new Gtk_Bin_RecordTo API docTo spec with null record;

57.        type Gtk_Event_Box is access all Gtk_Event_Box_RecordTo API docTo spec'Class;

59.        ------------------

60.        -- Constructors --

61.        ------------------

63.        procedure Gtk_NewTo API docTo body (Event_Box : out Gtk_Event_BoxTo API docTo spec);

64.        procedure InitializeTo API docTo body (Event_Box : access Gtk_Event_Box_RecordTo API docTo spec'Class);

65.        --  Create a new box.

66.        --  The box's child can then be set using the Gtk.Container.Add function.

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

69.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_event_box_get_type");

71.        -------------

72.        -- Methods --

73.        -------------

75.        function Get_Above_ChildTo API docTo body

76.           (Event_Box : access Gtk_Event_Box_RecordTo API docTo spec) return Boolean;

77.        procedure Set_Above_ChildTo API docTo body

78.           (Event_Box   : access Gtk_Event_Box_RecordTo API docTo spec;

79.            Above_Child : Boolean);

80.        --  Set whether the event box window is positioned above the windows of its

81.        --  child, as opposed to below it. If the window is above, all events inside

82.        --  the event box will go to the event box. If the window is below, events

83.        --  in windows of child widgets will first got to that widget, and then to

84.        --  its parents. The default is to keep the window below the child.

85.        --  Since: gtk+ 2.4

86.        --  "above_child": True if the event box window is above the windows of its

87.        --  child

89.        function Get_Visible_WindowTo API docTo body

90.           (Event_Box : access Gtk_Event_Box_RecordTo API docTo spec) return Boolean;

91.        procedure Set_Visible_WindowTo API docTo body

92.           (Event_Box      : access Gtk_Event_Box_RecordTo API docTo spec;

93.            Visible_Window : Boolean);

94.        --  Set whether the event box uses a visible or invisible child window. The

95.        --  default is to use visible windows. In an invisible window event box, the

96.        --  window that the event box creates is a %GDK_INPUT_ONLY window, which

97.        --  means that it is invisible and only serves to receive events. A visible

98.        --  window event box creates a visible (%GDK_INPUT_OUTPUT) window that acts

99.        --  as the parent window for all the widgets contained in the event box. You

100.        --  should generally make your event box invisible if you just want to trap

101.        --  events. Creating a visible window may cause artifacts that are visible

102.        --  to the user, especially if the user is using a theme with gradients or

103.        --  pixmaps. The main reason to create a non input-only event box is if you

104.        --  want to set the background to a different color or draw on it.

105.        --  Note: There is one unexpected issue for an invisible event box that has

106.        --  its window below the child. (See Gtk.Event_Box.Set_Above_Child.) Since

107.        --  the input-only window is not an ancestor window of any windows that

108.        --  descendent widgets of the event box create, events on these windows

109.        --  aren't propagated up by the windowing system, but only by GTK+. The

110.        --  practical effect of this is if an event isn't in the event mask for the

111.        --  descendant window (see Gtk.Widget.Add_Event), it won't be received by

112.        --  the event box.

113.        --  This problem doesn't occur for visible event boxes, because in that

114.        --  case, the event box window is actually the ancestor of the descendant

115.        --  windows, not just at the same place on the screen.

116.        --  Since: gtk+ 2.4

117.        --  "visible_window": boolean value

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

120.        -- Interfaces --

121.        ----------------

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

123.        --

124.        --  - "Buildable"

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

127.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Event_Box_RecordTo API docTo spec, Gtk_Event_BoxTo API docTo spec);

128.        function "+"

129.          (Widget : access Gtk_Event_Box_RecordTo API docTo spec'Class)

130.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

131.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

132.        function "-"

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

134.        return Gtk_Event_BoxTo API docTo spec

135.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

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

138.        -- Properties --

139.        ----------------

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

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

142.        --

143.        --  Name: Above_Child_Property

144.        --  Type: Boolean

145.        --  Flags: read-write

146.        --

147.        --  Name: Visible_Window_Property

148.        --  Type: Boolean

149.        --  Flags: read-write

151.        Above_Child_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

152.        Visible_Window_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

154.     private

155.        Above_Child_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

156.          Glib.Properties.BuildTo API docTo specTo body ("above-child");

157.        Visible_Window_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

158.          Glib.Properties.BuildTo API docTo specTo body ("visible-window");

159.     end Gtk.Event_BoxTo API docTo specTo body;