## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                      Copyright (C) 2001-2006                      --

5.     --                               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 package implements a specific model to store your data in. Each

32.     --  item in the list will correspond to one line in the tree view. Multiple

33.     --  columns can be displayed for each line.

34.     --  </description>

35.     --  <c_version>2.8.17</c_version>

36.     --  <group>Trees and Lists</group>

38.     with Gdk.PixbufTo API docTo specTo body;

39.     with Glib.TypesTo API docTo specTo body;

40.     with Glib.ValuesTo API docTo specTo body;

41.     with GtkTo API docTo spec;

42.     with Gtk.Tree_DndTo API docTo specTo body;

43.     with Gtk.Tree_ModelTo API docTo specTo body;

44.     with Gtk.Tree_SortableTo API docTo specTo body;

46.     package Gtk.List_StoreTo API docTo specTo body is

48.        type Gtk_List_Store_Record is

49.          new Gtk.Tree_Model.Gtk_Tree_Model_RecordTo API docTo specTo body with null record;

50.        type Gtk_List_Store is access all Gtk_List_Store_RecordTo API docTo spec'Class;

52.        procedure Gtk_NewTo API docTo body

53.          (List_Store : out Gtk_List_StoreTo API docTo spec;

54.           Types      : GType_ArrayTo API docTo spec);

55.        --  Creates a new list store using Types to fill the columns.

57.        procedure InitializeTo API docTo body

58.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec'Class;

59.           Types      : GType_ArrayTo API docTo spec);

60.        --  Internal initialization function.

61.        --  See the section "Creating your own widgets" in the documentation.

63.        function Get_TypeTo API docTo body return Gtk.Gtk_TypeTo API docTo spec;

64.        --  Return the internal value associated with this widget.

66.        procedure Set_Column_TypesTo API docTo body

67.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec;

68.           Types      : GType_ArrayTo API docTo spec);

70.        procedure Set_ValueTo API docTo body

71.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec;

72.           IterTo API docTo body       : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

73.           Column     : GintTo API docTo spec;

74.           ValueTo API docTo body      : Glib.Values.GValueTo API docTo specTo body);

75.        --  Set the data in the cell specified by Iter and Column.

76.        --  The type of Value must be convertible to the type of the column.

78.        procedure SetTo API docTo body

79.          (Tree_Store : access Gtk_List_Store_RecordTo API docTo spec;

80.           IterTo API docTo body       : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

81.           Column     : GintTo API docTo spec;

82.           Value      : UTF8_StringTo API docTo spec);

83.        --  Same as above, for an UTF8 string.

85.        procedure SetTo API docTo body

86.          (Tree_Store : access Gtk_List_Store_RecordTo API docTo spec;

87.           IterTo API docTo body       : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

88.           Column     : GintTo API docTo spec;

89.           Value      : GintTo API docTo spec);

90.        --  Same as above, for a Gint.

92.        procedure SetTo API docTo body

93.          (Tree_Store : access Gtk_List_Store_RecordTo API docTo spec;

94.           IterTo API docTo body       : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

95.           Column     : GintTo API docTo spec;

96.           Value      : Gdk.Pixbuf.Gdk_PixbufTo API docTo spec);

97.        --  Same as above for a pixbuf

99.        procedure SetTo API docTo body

100.          (Tree_Store : access Gtk_List_Store_RecordTo API docTo spec;

101.           IterTo API docTo body       : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

102.           Column     : GintTo API docTo spec;

103.           Value      : Boolean);

104.        --  Same as above for a boolean

106.        procedure RemoveTo API docTo body

107.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec;

108.           IterTo API docTo body       : in out Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body);

109.        --  Remove the given row from the list store.

110.        --  After being removed, Iter is set to be the next valid row, or

111.        --  invalidated if it pointed to the last row in List_Store.

113.        procedure InsertTo API docTo body

114.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec;

115.           IterTo API docTo body       : in out Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

116.           Position   : GintTo API docTo spec);

117.        --  Create a new row at Position.

118.        --  Iter will be changed to point to this new row.

119.        --  If Position is larger than the number of rows on the list, then the new

120.        --  row will be appended to the list. The row will be empty before this

121.        --  function is called. To fill in values, you need to call Set_Value.

123.        procedure Insert_BeforeTo API docTo body

124.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec;

125.           IterTo API docTo body       : in out Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

126.           SiblingTo API docTo body    : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body);

127.        --  Insert a new row before Sibling.

128.        --  If Sibling is Null_Iter, then the row will be appended to the end of the

129.        --  list. Iter will be changed to point to this new row. The row will be

130.        --  empty before this function is called. To fill in values, you need to

131.        --  call Set_Value.

133.        procedure Insert_AfterTo API docTo body

134.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec;

135.           IterTo API docTo body       : in out Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

136.           SiblingTo API docTo body    : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body);

137.        --  Insert a new row after Sibling.

138.        --  If Sibling is Null_Iter, then the row will be prepended to the beginning

139.        --  of the list. Iter will be changed to point to this new row. The row will

140.        --  be empty after this function is called. To fill in values, you need to

141.        --  call Set_Value.

143.        procedure Insert_With_ValuesvTo API docTo body

144.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec;

145.           IterTo API docTo body       : in out Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

146.           Position   : Glib.GintTo API docTo spec;

147.           Columns    : Glib.Gint_ArrayTo API docTo spec;

148.           Values     : Glib.Values.GValue_ArrayTo API docTo spec);

149.        --  Creates a new row at Position. Iter will be changed to point to this new

150.        --  row. If Position is larger than the number of rows on the list, then the

151.        --  new row will be appended to the list. The row will be filled with the

152.        --  values given to this function.

153.        --  Using this function is more efficient that calling Insert and then

154.        --  Set for each column, since that will not emit the rows_reordered signal

155.        --  when the model is sorted.

157.        procedure PrependTo API docTo body

158.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec;

159.           IterTo API docTo body       : in out Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body);

160.        --  Prepend a new row to List_Store.

161.        --  Iter will be changed to point to this new row. The row will be empty

162.        --  after this function is called. To fill in values, you need to call

163.        --  Set_Value.

165.        procedure AppendTo API docTo body

166.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec;

167.           IterTo API docTo body       : in out Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body);

168.        --  Append a new row to List_Store.

169.        --  Iter will be changed to point to this new row. The row will be empty

170.        --  after this function is called. To fill in values, you need to call

171.        --  Set_Value.

173.        procedure ClearTo API docTo body (List_Store : access Gtk_List_Store_RecordTo API docTo spec);

174.        --  Remove all the rows in List_Store.

176.        function Iter_Is_ValidTo API docTo body

177.          (List_Store : access Gtk_List_Store_RecordTo API docTo spec;

178.           IterTo API docTo body       : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body)

179.           return Boolean;

180.        --  WARNING: This function is slow. Only use it for debugging and/or testing

181.        --  purposes.

182.        --  Checks if the given iter is a valid iter for List_Store.

184.        procedure Move_AfterTo API docTo body

185.          (Store    : access Gtk_List_Store_RecordTo API docTo spec;

186.           IterTo API docTo body     : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

187.           PositionTo API docTo body : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body);

188.        --  Moves the row pointed to by Iter to the position after Position. Note

189.        --  that this function only works with unsorted stores. If Position is

190.        --  Null_Iter, Iter will be moved to the start of the list.

192.        procedure Move_BeforeTo API docTo body

193.          (Store    : access Gtk_List_Store_RecordTo API docTo spec;

194.           IterTo API docTo body     : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

195.           PositionTo API docTo body : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body);

196.        --  Moves the row pointed to by Iter to the position before Position. Note

197.        --  that this function only works with unsorted stores. If Position is

198.        --  Null_Iter, Iter will be moved to the end of the list.

200.        procedure ReorderTo API docTo body

201.          (Store     : access Gtk_List_Store_RecordTo API docTo spec;

202.           New_Order : Glib.Gint_ArrayTo API docTo spec);

203.        --  Reorders Store to follow the order indicated by New_order. Note that

204.        --  this function only works with unsorted stores.

205.        --  New_Order is an array of integers mapping the new position of each child

206.        --  to its old position before the re-ordering,

207.        --  i.e. New_Order[newpos] = oldpos

209.        procedure SwapTo API docTo body

210.          (Store : access Gtk_List_Store_RecordTo API docTo spec;

211.           ATo API docTo body     : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

212.           BTo API docTo body     : Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body);

213.        --  Swaps the rwos pointed to by A and B. Note that this function only works

214.        --  with unsorted stores.

216.        ----------------

217.        -- Interfaces --

218.        ----------------

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

220.        --

221.        --  - "Gtk_Tree_Sortable"

222.        --    This interface allows you to specify your own sort function

223.        --

224.        --  - "Gtk_Tree_Drag_Source"

225.        --    This interface allows this widget to act as a dnd source

226.        --

227.        --  - "Gtk_Tree_Drag_Dest"

228.        --    This interface allows this widget to act as a dnd destination

230.        package Implements_Tree_Sortable is new Glib.Types.ImplementsTo API docTo specTo body

231.          (Gtk.Tree_Sortable.Gtk_Tree_SortableTo API docTo spec,

232.           Gtk_List_Store_RecordTo API docTo spec,

233.           Gtk_List_StoreTo API docTo spec);

234.        function "+"

235.          (Model : access Gtk_List_Store_RecordTo API docTo spec'Class)

236.           return Gtk.Tree_Sortable.Gtk_Tree_SortableTo API docTo spec

237.           renames Implements_Tree_Sortable.To_InterfaceTo API docTo specTo body;

238.        function "-"

239.          (Sortable : Gtk.Tree_Sortable.Gtk_Tree_SortableTo API docTo spec)

240.           return Gtk_List_StoreTo API docTo spec

241.           renames Implements_Tree_Sortable.To_ObjectTo API docTo specTo body;

242.        --  Converts to and from the Gtk_Tree_Sortable interface

244.        package Implements_Drag_Source is new Glib.Types.ImplementsTo API docTo specTo body

245.          (Gtk.Tree_Dnd.Gtk_Tree_Drag_SourceTo API docTo spec,

246.           Gtk_List_Store_RecordTo API docTo spec,

247.           Gtk_List_StoreTo API docTo spec);

248.        function "+"

249.          (Model : access Gtk_List_Store_RecordTo API docTo spec'Class)

250.           return Gtk.Tree_Dnd.Gtk_Tree_Drag_SourceTo API docTo spec

251.           renames Implements_Drag_Source.To_InterfaceTo API docTo specTo body;

252.        function "-"

253.          (Drag_Source : Gtk.Tree_Dnd.Gtk_Tree_Drag_SourceTo API docTo spec)

254.           return Gtk_List_StoreTo API docTo spec

255.           renames Implements_Drag_Source.To_ObjectTo API docTo specTo body;

256.        --  Converts to and from the Gtk_Tree_Drag_Source interface

258.        package Implements_Drag_Dest is new Glib.Types.ImplementsTo API docTo specTo body

259.          (Gtk.Tree_Dnd.Gtk_Tree_Drag_DestTo API docTo spec,

260.           Gtk_List_Store_RecordTo API docTo spec,

261.           Gtk_List_StoreTo API docTo spec);

262.        function "+"

263.          (Model : access Gtk_List_Store_RecordTo API docTo spec'Class)

264.           return Gtk.Tree_Dnd.Gtk_Tree_Drag_DestTo API docTo spec

265.           renames Implements_Drag_Dest.To_InterfaceTo API docTo specTo body;

266.        function "-"

267.          (Drag_Dest : Gtk.Tree_Dnd.Gtk_Tree_Drag_DestTo API docTo spec)

268.           return Gtk_List_StoreTo API docTo spec

269.           renames Implements_Drag_Dest.To_ObjectTo API docTo specTo body;

270.        --  Converts to and from the Gtk_Tree_Drag_Source interface

272.     private

274.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_list_store_get_type");

275.     end Gtk.List_StoreTo API docTo specTo body;

277.     --  No binding: gtk_list_store_new

278.     --  No binding: gtk_list_store_set

279.     --  No binding: gtk_list_store_set_valist

280.     --  No binding: gtk_list_store_insert_with_values