## 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_Table is a container that can contain any number of children. Each

32.     --  of them is attached to a specific row and a specific column in widget.

33.     --

34.     --  Every row in the table must have the same height, and every column must

35.     --  have the same width if the table was said as Homogeneous. But you can also

36.     --  decide to have an heterogeneous table, where the width and height are set

37.     --  by the children contained in the table. Check out the Gtk_Sheet widget for

38.     --  a different kind of table that can also contain text and images in a more

39.     --  efficient way.

40.     --

41.     --  </description>

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

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

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

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

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

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

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

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

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

53.     package Gtk.TableTo API docTo specTo body is

55.        type Gtk_Table_Record is new Gtk_Container_RecordTo API docTo specTo body with null record;

56.        type Gtk_Table is access all Gtk_Table_RecordTo API docTo spec'Class;

58.        ------------------

59.        -- Constructors --

60.        ------------------

62.        procedure Gtk_NewTo API docTo body

63.           (Table       : out Gtk_TableTo API docTo spec;

64.            Rows        : GuintTo API docTo spec;

65.            Columns     : GuintTo API docTo spec;

66.            Homogeneous : Boolean);

67.        procedure InitializeTo API docTo body

68.           (Table       : access Gtk_Table_RecordTo API docTo spec'Class;

69.            Rows        : GuintTo API docTo spec;

70.            Columns     : GuintTo API docTo spec;

71.            Homogeneous : Boolean);

72.        --  Create a new table. The width allocated to the table is divided into

73.        --  Columns columns, which all have the same width if Homogeneous is True.

74.        --  If Homogeneous is False, the width will be calculated with the children

75.        --  contained in the table. Same behavior for the rows.

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

78.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_table_get_type");

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

81.        -- Methods --

82.        -------------

84.        procedure AttachTo API docTo body

85.           (Table         : access Gtk_Table_RecordTo API docTo spec;

86.            Child         : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

87.            Left_Attach   : GuintTo API docTo spec;

88.            Right_Attach  : GuintTo API docTo spec;

89.            Top_Attach    : GuintTo API docTo spec;

90.            Bottom_Attach : GuintTo API docTo spec;

91.            Xoptions      : Gtk.Enums.Gtk_Attach_OptionsTo API docTo spec := ExpandTo API docTo spec or FillTo API docTo spec;

92.            Yoptions      : Gtk.Enums.Gtk_Attach_OptionsTo API docTo spec := ExpandTo API docTo spec or FillTo API docTo spec;

93.            Xpadding      : GuintTo API docTo spec := 0;

94.            Ypadding      : GuintTo API docTo spec := 0);

95.        --  Insert a new widget in the table. All the attachments are relative to

96.        --  the separations between columns and rows (for instance, to insert a

97.        --  widget spanning the first two columns in the table, you should put

98.        --  Left_Attach=0 and Right_Attach=2). Same behavior for the rows. Xoptions

99.        --  and Yoptions indicate the behavior of the child when the table is

100.        --  resized (whether the child can shrink or expand). See the description in

101.        --  Gtk.Box for more information on the possible values. Xpadding and

102.        --  Ypadding are the amount of space left around the child.

104.        procedure Attach_DefaultsTo API docTo body

105.           (Table         : access Gtk_Table_RecordTo API docTo spec;

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

107.            Left_Attach   : GuintTo API docTo spec;

108.            Right_Attach  : GuintTo API docTo spec;

109.            Top_Attach    : GuintTo API docTo spec;

110.            Bottom_Attach : GuintTo API docTo spec);

111.        --  Insert a new widget in the table, with default values. No padding is

112.        --  put around the child, and the options are set to Expand and Fill. This

113.        --  call is similar to Attach with default values and is only provided for

114.        --  compatibility.

116.        function Get_Col_SpacingTo API docTo body

117.           (Table  : access Gtk_Table_RecordTo API docTo spec;

118.            Column : GuintTo API docTo spec) return GuintTo API docTo spec;

119.        procedure Set_Col_SpacingTo API docTo body

120.           (Table   : access Gtk_Table_RecordTo API docTo spec;

121.            Column  : GuintTo API docTo spec;

122.            Spacing : GuintTo API docTo spec);

123.        --  Set the spacing in pixels between Column and the next one.

125.        function Get_Default_Col_SpacingTo API docTo body

126.           (Table : access Gtk_Table_RecordTo API docTo spec) return GuintTo API docTo spec;

127.        --  Gets the default column spacing for the table. This is the spacing that

128.        --  will be used for newly added columns. (See Gtk.Table.Set_Col_Spacings)

130.        function Get_Default_Row_SpacingTo API docTo body

131.           (Table : access Gtk_Table_RecordTo API docTo spec) return GuintTo API docTo spec;

132.        --  Gets the default row spacing for the table. This is the spacing that

133.        --  will be used for newly added rows. (See Gtk.Table.Set_Row_Spacings)

135.        function Get_HomogeneousTo API docTo body (Table : access Gtk_Table_RecordTo API docTo spec) return Boolean;

136.        procedure Set_HomogeneousTo API docTo body

137.           (Table       : access Gtk_Table_RecordTo API docTo spec;

138.            Homogeneous : Boolean);

139.        --  Indicate the homogeneous status of the table. If Homogeneous is True,

140.        --  the rows and columns of the table will all be allocated the same width

141.        --  or height.

143.        function Get_Row_SpacingTo API docTo body

144.           (Table : access Gtk_Table_RecordTo API docTo spec;

145.            Row   : GuintTo API docTo spec) return GuintTo API docTo spec;

146.        procedure Set_Row_SpacingTo API docTo body

147.           (Table   : access Gtk_Table_RecordTo API docTo spec;

148.            Row     : GuintTo API docTo spec;

149.            Spacing : GuintTo API docTo spec);

151.        procedure Get_SizeTo API docTo body

152.           (Table   : access Gtk_Table_RecordTo API docTo spec;

153.            Rows    : out GuintTo API docTo spec;

154.            Columns : out GuintTo API docTo spec);

155.        --  Returns the number of rows and columns in the table.

156.        --  Since: gtk+ 2.22

157.        --  "rows": return location for the number of rows, or null

158.        --  "columns": return location for the number of columns, or null

160.        procedure ResizeTo API docTo body

161.           (Table   : access Gtk_Table_RecordTo API docTo spec;

162.            Rows    : GuintTo API docTo spec;

163.            Columns : GuintTo API docTo spec);

165.        procedure Set_Col_SpacingsTo API docTo body

166.           (Table   : access Gtk_Table_RecordTo API docTo spec;

167.            Spacing : GuintTo API docTo spec);

169.        procedure Set_Row_SpacingsTo API docTo body

170.           (Table   : access Gtk_Table_RecordTo API docTo spec;

171.            Spacing : GuintTo API docTo spec);

173.        ----------------

174.        -- Interfaces --

175.        ----------------

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

177.        --

178.        --  - "Buildable"

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

181.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Table_RecordTo API docTo spec, Gtk_TableTo API docTo spec);

182.        function "+"

183.          (Widget : access Gtk_Table_RecordTo API docTo spec'Class)

184.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

185.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

186.        function "-"

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

188.        return Gtk_TableTo API docTo spec

189.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

191.        ----------------

192.        -- Properties --

193.        ----------------

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

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

196.        --

197.        --  Name: Column_Spacing_Property

198.        --  Type: Guint

199.        --  Flags: read-write

200.        --

201.        --  Name: Homogeneous_Property

202.        --  Type: Boolean

203.        --  Flags: read-write

204.        --

205.        --  Name: N_Columns_Property

206.        --  Type: Guint

207.        --  Flags: read-write

208.        --

209.        --  Name: N_Rows_Property

210.        --  Type: Guint

211.        --  Flags: read-write

212.        --

213.        --  Name: Row_Spacing_Property

214.        --  Type: Guint

215.        --  Flags: read-write

217.        Column_Spacing_Property : constant Glib.Properties.Property_UintTo API docTo spec;

218.        Homogeneous_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

219.        N_Columns_Property : constant Glib.Properties.Property_UintTo API docTo spec;

220.        N_Rows_Property : constant Glib.Properties.Property_UintTo API docTo spec;

221.        Row_Spacing_Property : constant Glib.Properties.Property_UintTo API docTo spec;

223.     private

224.        Column_Spacing_PropertyTo API docTo spec : constant Glib.Properties.Property_UintTo API docTo spec :=

225.          Glib.Properties.BuildTo API docTo specTo body ("column-spacing");

226.        Homogeneous_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

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

228.        N_Columns_PropertyTo API docTo spec : constant Glib.Properties.Property_UintTo API docTo spec :=

229.          Glib.Properties.BuildTo API docTo specTo body ("n-columns");

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

231.          Glib.Properties.BuildTo API docTo specTo body ("n-rows");

232.        Row_Spacing_PropertyTo API docTo spec : constant Glib.Properties.Property_UintTo API docTo spec :=

233.          Glib.Properties.BuildTo API docTo specTo body ("row-spacing");

234.     end Gtk.TableTo API docTo specTo body;