## 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_Layout is a widget that can have an almost infinite size, without

32.     --  occupying a lot of memory. Its children can be located anywhere within it,

33.     --  but will only appear on the screen if the visible area of the layout

34.     --  contains them. Just like a Gtk_Viewport, its visible area is indicated by

35.     --  two Gtk_Adjustment widgets, and thus a Gtk_Layout can be put as is in a

36.     --  Gtk_Scrolled_Window. As for Gtk_Fixed containers, the children can be

37.     --  located anywhere in the layout (no automatic organization is done). But, as

38.     --  opposed to Gtk_Fixed widgets, a Gtk_Layout does not try to resize itself to

39.     --  show all its children.

40.     --

41.     --  Starting from GtkAda 2.0, you have to call Set_Size and specify the

42.     --  maximum size of the layout, otherwise children added with Put outside the

43.     --  size defined for the layout will never be visible. One way to do this is to

44.     --  systematically call Set_Size before calling Put, and make sure you specify

45.     --  a size big enough for the layout.

46.     --

47.     --  </description>

48.     --  <screenshot>gtk-layout</screenshot>

49.     --  <group>Layout containers</group>

50.     --  <testgtk>create_layout.adb</testgtk>

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

53.     with Gdk.WindowTo API docTo specTo body;      use Gdk.WindowTo API docTo specTo body;

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

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

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

57.     with Gtk.AdjustmentTo API docTo specTo body;  use Gtk.AdjustmentTo API docTo specTo body;

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

59.     with Gtk.ContainerTo API docTo specTo body;   use Gtk.ContainerTo API docTo specTo body;

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

62.     package Gtk.LayoutTo API docTo specTo body is

64.        type Gtk_Layout_Record is new Gtk_Container_RecordTo API docTo specTo body with null record;

65.        type Gtk_Layout is access all Gtk_Layout_RecordTo API docTo spec'Class;

67.        ------------------

68.        -- Constructors --

69.        ------------------

71.        procedure Gtk_NewTo API docTo body

72.           (Layout      : out Gtk_LayoutTo API docTo spec;

73.            Hadjustment : Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec := null;

74.            Vadjustment : Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec := null);

75.        procedure InitializeTo API docTo body

76.           (Layout      : access Gtk_Layout_RecordTo API docTo spec'Class;

77.            Hadjustment : Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec := null;

78.            Vadjustment : Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec := null);

79.        --  Creates a new Gtk.Layout.Gtk_Layout. Unless you have a specific

80.        --  adjustment you'd like the layout to use for scrolling, pass null for

81.        --  "hadjustment": horizontal scroll adjustment, or null

82.        --  "vadjustment": vertical scroll adjustment, or null

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

85.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_layout_get_type");

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

88.        -- Methods --

89.        -------------

91.        procedure FreezeTo API docTo body (Layout : access Gtk_Layout_RecordTo API docTo spec);

92.        --  This is a deprecated function, it doesn't do anything useful.

94.        function Get_Bin_WindowTo API docTo body

95.           (Layout : access Gtk_Layout_RecordTo API docTo spec) return Gdk.Window.Gdk_WindowTo API docTo spec;

96.        --  Retrieve the bin window of the layout used for drawing operations.

97.        --  Since: gtk+ 2.14

99.        function Get_HadjustmentTo API docTo body

100.           (Layout : access Gtk_Layout_RecordTo API docTo spec)

101.            return Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec;

102.        procedure Set_HadjustmentTo API docTo body

103.           (Layout     : access Gtk_Layout_RecordTo API docTo spec;

104.            Adjustment : access Gtk.Adjustment.Gtk_Adjustment_RecordTo API docTo spec'Class);

105.        --  Return the adjustment that indicate the horizontal visual area of the

106.        --  layout. You generally do not have to modify the value of this adjustment

107.        --  yourself, since this is done automatically when the layout has been put

108.        --  in a Gtk_Scrolled_Window.

109.        --  "adjustment": new scroll adjustment

111.        procedure Get_SizeTo API docTo body

112.           (Layout : access Gtk_Layout_RecordTo API docTo spec;

113.            Width  : out GuintTo API docTo spec;

114.            Height : out GuintTo API docTo spec);

115.        procedure Set_SizeTo API docTo body

116.           (Layout : access Gtk_Layout_RecordTo API docTo spec;

117.            Width  : GuintTo API docTo spec;

118.            Height : GuintTo API docTo spec);

119.        --  Sets the size of the scrollable area of the layout.

120.        --  "width": width of entire scrollable area

121.        --  "height": height of entire scrollable area

123.        function Get_VadjustmentTo API docTo body

124.           (Layout : access Gtk_Layout_RecordTo API docTo spec)

125.            return Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec;

126.        procedure Set_VadjustmentTo API docTo body

127.           (Layout     : access Gtk_Layout_RecordTo API docTo spec;

128.            Adjustment : access Gtk.Adjustment.Gtk_Adjustment_RecordTo API docTo spec'Class);

129.        --  Sets the vertical scroll adjustment for the layout. See

130.        --  Gtk.Scrolledwindow.Gtk_Scrolledwindow, Gtk.Scrollbar.Gtk_Scrollbar,

131.        --  Gtk.Adjustment.Gtk_Adjustment for details.

132.        --  "adjustment": new scroll adjustment

134.        procedure MoveTo API docTo body

135.           (Layout       : access Gtk_Layout_RecordTo API docTo spec;

136.            Child_Widget : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

137.            X            : GintTo API docTo spec;

138.            Y            : GintTo API docTo spec);

139.        --  Moves a current child of Layout to a new position.

140.        --  "child_widget": a current child of Layout

141.        --  "x": X position to move to

142.        --  "y": Y position to move to

144.        procedure PutTo API docTo body

145.           (Layout       : access Gtk_Layout_RecordTo API docTo spec;

146.            Child_Widget : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

147.            X            : GintTo API docTo spec;

148.            Y            : GintTo API docTo spec);

149.        --  The child will be displayed on the screen only if at least part of it

150.        --  intersects the visible area of the layout. The layout does not resize

151.        --  itself to automatically show the widget. You also need to call Set_Size,

152.        --  if the size you initially defined is smaller than (X, Y), or the child

153.        --  will never be visible even if the layout is scrolled.

154.        --  "child_widget": child widget

155.        --  "x": X position of child widget

156.        --  "y": Y position of child widget

158.        procedure ThawTo API docTo body (Layout : access Gtk_Layout_RecordTo API docTo spec);

159.        --  This is a deprecated function, it doesn't do anything useful.

161.        ----------------

162.        -- Interfaces --

163.        ----------------

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

165.        --

166.        --  - "Buildable"

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

169.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Layout_RecordTo API docTo spec, Gtk_LayoutTo API docTo spec);

170.        function "+"

171.          (Widget : access Gtk_Layout_RecordTo API docTo spec'Class)

172.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

173.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

174.        function "-"

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

176.        return Gtk_LayoutTo API docTo spec

177.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

179.        ----------------

180.        -- Properties --

181.        ----------------

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

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

184.        --

185.        --  Name: Hadjustment_Property

186.        --  Type: Gtk.Adjustment.Gtk_Adjustment

187.        --  Flags: read-write

188.        --

189.        --  Name: Height_Property

190.        --  Type: Guint

191.        --  Flags: read-write

192.        --

193.        --  Name: Vadjustment_Property

194.        --  Type: Gtk.Adjustment.Gtk_Adjustment

195.        --  Flags: read-write

196.        --

197.        --  Name: Width_Property

198.        --  Type: Guint

199.        --  Flags: read-write

201.        Hadjustment_Property : constant Glib.Properties.Property_ObjectTo API docTo spec;

202.        Height_Property : constant Glib.Properties.Property_UintTo API docTo spec;

203.        Vadjustment_Property : constant Glib.Properties.Property_ObjectTo API docTo spec;

204.        Width_Property : constant Glib.Properties.Property_UintTo API docTo spec;

206.        -------------

207.        -- Signals --

208.        -------------

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

210.        --

211.        --  "set-scroll-adjustments"

212.        --     procedure Handler

213.        --       (Self   : access Gtk_Layout_Record'Class;

214.        --        Object : Gtk.Adjustment.Gtk_Adjustment;

215.        --        P0     : Gtk.Adjustment.Gtk_Adjustment);

216.        --  Set the scroll adjustments for the layout. Usually scrolled containers

217.        --  like Gtk.Scrolledwindow.Gtk_Scrolledwindow will emit this signal to

218.        --  connect two instances of Gtk.Scrollbar.Gtk_Scrollbar to the scroll

219.        --  directions of the Gtk.Layout.Gtk_Layout.

221.        Signal_Set_Scroll_Adjustments : constant Glib.Signal_NameTo API docTo spec := "set-scroll-adjustments";

223.     private

224.        Hadjustment_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

225.          Glib.Properties.BuildTo API docTo specTo body ("hadjustment");

226.        Height_PropertyTo API docTo spec : constant Glib.Properties.Property_UintTo API docTo spec :=

227.          Glib.Properties.BuildTo API docTo specTo body ("height");

228.        Vadjustment_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

229.          Glib.Properties.BuildTo API docTo specTo body ("vadjustment");

230.        Width_PropertyTo API docTo spec : constant Glib.Properties.Property_UintTo API docTo spec :=

231.          Glib.Properties.BuildTo API docTo specTo body ("width");

232.     end Gtk.LayoutTo API docTo specTo body;