## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                    Copyright (C) 2010, AdaCore                    --

5.     --                                                                   --

6.     -- This library is free software; you can redistribute it and/or     --

7.     -- modify it under the terms of the GNU General Public               --

8.     -- License as published by the Free Software Foundation; either      --

9.     -- version 2 of the License, or (at your option) any later version.  --

10.     --                                                                   --

11.     -- This library is distributed in the hope that it will be useful,   --

12.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

13.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

14.     -- General Public License for more details.                          --

15.     --                                                                   --

16.     -- You should have received a copy of the GNU General Public         --

17.     -- License along with this library; if not, write to the             --

18.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

19.     -- Boston, MA 02111-1307, USA.                                       --

20.     --                                                                   --

21.     -- As a special exception, if other files instantiate generics from  --

22.     -- this unit, or you link this unit with other files to produce an   --

23.     -- executable, this  unit  does not  by itself cause  the resulting  --

24.     -- executable to be covered by the GNU General Public License. This  --

25.     -- exception does not however invalidate any other reasons why the   --

26.     -- executable file  might be covered by the  GNU Public License.     --

27.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  Gtk_Recent_Chooser is an interface that can be implemented by widgets

31.     --  displaying the list of recently used files. In GTK+, the main objects that

32.     --  implement this interface are Gtk_Recent_Chooser_Widget,

33.     --  Gtk_Recent_Chooser_Dialog and Gtk_Recent_Chooser_Menu.

34.     --  </description>

35.     --  <c_version>2.16.6</c_version>

37.     with GNAT.Strings;

39.     with Glib.ErrorTo API docTo specTo body;

40.     with Glib.PropertiesTo API docTo specTo body;

41.     with Glib.TypesTo API docTo specTo body;

42.     with Gtk.Recent_FilterTo API docTo specTo body;

43.     with Gtk.Recent_ManagerTo API docTo specTo body;

45.     package Gtk.Recent_ChooserTo API docTo specTo body is

47.        type Gtk_Recent_Chooser is new Glib.Types.GType_InterfaceTo API docTo spec;

49.        function Error_QuarkTo API docTo body return GQuarkTo API docTo spec;

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

53.        --------------------

54.        -- Items and URIs --

55.        --------------------

57.        function Get_Current_ItemTo API docTo body

58.          (Chooser : Gtk_Recent_ChooserTo API docTo spec) return Gtk.Recent_Manager.Gtk_Recent_InfoTo API docTo spec;

59.        --  Gets the Gtk_Recent_Info currently selected by Chooser.

60.        --  Use Gtk.Recent_Manager.Unref when you have finished using it.

62.        function Get_Current_UriTo API docTo body (Chooser : Gtk_Recent_ChooserTo API docTo spec) return String;

63.        function Set_Current_UriTo API docTo body

64.          (Chooser : Gtk_Recent_ChooserTo API docTo spec;

65.           Uri     : String;

66.           Error   : Glib.Error.GErrorTo API docTo spec := null)

67.           return Boolean;

68.        --  Gets/Sets Uri as the current URI for Chooser.  Set_Current_Uri returns

69.        --  whether the URI was found.

71.        function Get_ItemsTo API docTo body

72.          (Chooser : Gtk_Recent_ChooserTo API docTo spec)

73.           return Gtk.Recent_Manager.Gtk_Recent_Info_List.GlistTo API docTo specTo body;

74.        --  Gets the list of recently used resources in form of Gtk_Recent_Info

75.        --  objects.

76.        --

77.        --  The return value of this function is affected by the "sort-type" and

78.        --  "limit" properties of Chooser.

79.        --

80.        --  You should Gtk.Recent_Manager.Unref on every item of the list, and then

81.        --  free the list itself using Gtk_Recent_Info_List.Free.

83.        function Get_UrisTo API docTo body

84.          (Chooser : Gtk_Recent_ChooserTo API docTo spec) return GNAT.Strings.String_List;

85.        --  Gets the URIs of the recently used resources.

86.        --

87.        --  The return value of this function is affected by the "sort-type" and

88.        --  "limit" properties of Chooser.

90.        function Get_LimitTo API docTo body (Chooser : Gtk_Recent_ChooserTo API docTo spec) return GintTo API docTo spec;

91.        procedure Set_LimitTo API docTo body

92.          (Chooser : Gtk_Recent_ChooserTo API docTo spec;

93.           Limit   : GintTo API docTo spec);

94.        --  Gets/Sets the number of items that should be returned by

95.        --  Get_Items and Get_Uris.  Use -1 to specify all items.

97.        ---------------------

98.        -- Display Options --

99.        ---------------------

101.        function Get_Local_OnlyTo API docTo body (Chooser : Gtk_Recent_ChooserTo API docTo spec) return Boolean;

102.        procedure Set_Local_OnlyTo API docTo body

103.          (Chooser    : Gtk_Recent_ChooserTo API docTo spec;

104.           Local_Only : Boolean);

105.        --  Whether only local resources, that is resources using the file:// URI

106.        --  scheme, should be shown in the recently used resources selector.  If

107.        --  Local_Only is True (the default) then the shown resources are guaranteed

108.        --  to be accessible through the operating system native file system.

110.        function Get_Show_IconsTo API docTo body (Chooser : Gtk_Recent_ChooserTo API docTo spec) return Boolean;

111.        procedure Set_Show_IconsTo API docTo body

112.          (Chooser    : Gtk_Recent_ChooserTo API docTo spec;

113.           Show_Icons : Boolean);

114.        --  Whether Chooser should show an icon near the resource.

116.        function Get_Show_Not_FoundTo API docTo body (Chooser : Gtk_Recent_ChooserTo API docTo spec) return Boolean;

117.        procedure Set_Show_Not_FoundTo API docTo body

118.          (Chooser        : Gtk_Recent_ChooserTo API docTo spec;

119.           Show_Not_Found : Boolean);

120.        --  Whether Chooser should display the recently used resources that

121.        --  it didn't find.  This only applies to local resources.

123.        function Get_Show_PrivateTo API docTo body (Chooser : Gtk_Recent_ChooserTo API docTo spec) return Boolean;

124.        procedure Set_Show_PrivateTo API docTo body

125.          (Chooser      : Gtk_Recent_ChooserTo API docTo spec;

126.           Show_Private : Boolean);

127.        --  Whether to show recently used resources marked registered as private.

129.        function Get_Show_TipsTo API docTo body (Chooser : Gtk_Recent_ChooserTo API docTo spec) return Boolean;

130.        procedure Set_Show_TipsTo API docTo body

131.          (Chooser   : Gtk_Recent_ChooserTo API docTo spec;

132.           Show_Tips : Boolean);

133.        --  Whether to show a tooltip containing the full path of each

134.        --  recently used resource in a Gtk_Recent_Chooser widget.

136.        -------------

137.        -- Filters --

138.        -------------

140.        procedure Add_FilterTo API docTo body

141.          (Chooser : Gtk_Recent_ChooserTo API docTo spec;

142.           Filter  : access Gtk.Recent_Filter.Gtk_Recent_Filter_RecordTo API docTo specTo body'Class);

143.        --  Adds Filter to the list of Gtk_Recent_Filter objects held by Chooser.

144.        --

145.        --  If no previous filter objects were defined, this function will call

146.        --  Set_Filter.

148.        procedure Remove_FilterTo API docTo body

149.          (Chooser : Gtk_Recent_ChooserTo API docTo spec;

150.           Filter  : access Gtk.Recent_Filter.Gtk_Recent_Filter_RecordTo API docTo specTo body'Class);

151.        --  Removes Filter from the list of Gtk_Recent_Filter objects held by

152.        --  Chooser.

154.        function Get_FilterTo API docTo body

155.          (Chooser : Gtk_Recent_ChooserTo API docTo spec)

156.           return Gtk.Recent_Filter.Gtk_Recent_FilterTo API docTo spec;

157.        procedure Set_FilterTo API docTo body

158.          (Chooser : Gtk_Recent_ChooserTo API docTo spec;

159.           Filter  : access Gtk.Recent_Filter.Gtk_Recent_Filter_RecordTo API docTo specTo body'Class);

160.        --  Gets/Sets Filter as the current Gtk_Recent_Filter object used by Chooser

161.        --  to affect the displayed recently used resources.

163.        function List_FiltersTo API docTo body

164.          (Chooser : Gtk_Recent_ChooserTo API docTo spec)

165.           return Gtk.Recent_Filter.Gtk_Recent_Filter_List.GSlistTo API docTo specTo body;

166.        --  Gets the Gtk_Recent_Filter objects held by Chooser.

167.        --  You should free the returned list using

168.        --  Gtk.Recent_Filter.Gtk_Recent_Filter_List.Free.

170.        ---------------

171.        -- Selection --

172.        ---------------

174.        function Get_Select_MultipleTo API docTo body (Chooser : Gtk_Recent_ChooserTo API docTo spec) return Boolean;

175.        procedure Set_Select_MultipleTo API docTo body

176.          (Chooser         : Gtk_Recent_ChooserTo API docTo spec;

177.           Select_Multiple : Boolean);

178.        --  Whether Chooser can select multiple items.

180.        procedure Select_AllTo API docTo body   (Chooser : Gtk_Recent_ChooserTo API docTo spec);

181.        procedure Unselect_AllTo API docTo body (Chooser : Gtk_Recent_ChooserTo API docTo spec);

182.        --  Selects/Unselects all the items inside Chooser, if the Chooser supports

183.        --  multiple selection.

185.        function Select_UriTo API docTo body

186.          (Chooser : Gtk_Recent_ChooserTo API docTo spec;

187.           Uri     : String;

188.           Error   : Glib.Error.GErrorTo API docTo spec := null)

189.           return Boolean;

190.        procedure Unselect_UriTo API docTo body

191.          (Chooser : Gtk_Recent_ChooserTo API docTo spec;

192.           Uri     : String);

193.        --  Selects/Unselects Uri inside Chooser.  Select_Uri returns whether the

194.        --  URI was found.

196.        -------------

197.        -- Sorting --

198.        -------------

200.        type Gtk_Recent_Sort_Type is

201.          (Gtk_Recent_Sort_None,

202.           Gtk_Recent_Sort_Mru,

203.           Gtk_Recent_Sort_Lru,

204.           Gtk_Recent_Sort_Custom);

205.        pragma Convention (C, Gtk_Recent_Sort_TypeTo API docTo spec);

207.        function Get_Sort_TypeTo API docTo body

208.          (Chooser : Gtk_Recent_ChooserTo API docTo spec) return Gtk_Recent_Sort_TypeTo API docTo spec;

209.        procedure Set_Sort_TypeTo API docTo body

210.          (Chooser   : Gtk_Recent_ChooserTo API docTo spec;

211.           Sort_TypeTo API docTo body : Gtk_Recent_Sort_TypeTo API docTo spec);

212.        --  Changes the sorting order of the recently used resources list displayed

213.        --  by Chooser.

215.        generic

216.           type Data_Type is private;

217.        package User_Sort_FuncTo API docTo body is

218.           type Data_Type_Access is access Data_TypeTo API docTo spec;

220.           type Comparison is (Before, Equal, After);

222.           type Gtk_Recent_Sort_Func is access function

223.             (Left, Right : Gtk.Recent_Manager.Gtk_Recent_InfoTo API docTo spec;

224.              User_Data   : Data_Type_AccessTo API docTo spec)

225.              return ComparisonTo API docTo spec;

226.           --  Return whether the Left comes Before, After, or is Equal to,

227.           --  the right.

229.           type Destroy_Notify is access procedure (User_Data : in out Data_TypeTo API docTo spec);

230.           --  This procedure will be called just prior to the destruction of

231.           --  Sort_Data.

233.           procedure Set_Sort_FuncTo API docTo body

234.             (Chooser      : Gtk_Recent_ChooserTo API docTo spec;

235.              Sort_Func    : Gtk_Recent_Sort_FuncTo API docTo spec;

236.              Sort_Data    : Data_Type_AccessTo API docTo spec := null;

237.              Data_Destroy : Destroy_NotifyTo API docTo spec := null);

238.           --  Sets the comparison function used when sorting to be Sort_Func.  If

239.           --  the Chooser has the sort type set to Gtk_Recent_Sort_Custom then

240.           --  the chooser will sort using this function.

241.        end User_Sort_FuncTo API docTo specTo body;

243.        -----------------

244.        -- Obsolescent --

245.        -----------------

247.        function Get_Show_NumbersTo API docTo body

248.          (Chooser : Gtk_Recent_ChooserTo API docTo spec)

249.           return Boolean;

250.        pragma Obsolescent; --  Get_Show_Numbers

251.        procedure Set_Show_NumbersTo API docTo body

252.          (Chooser      : Gtk_Recent_ChooserTo API docTo spec;

253.           Show_Numbers : Boolean);

254.        pragma Obsolescent; --  Set_Show_Numbers

255.        --  Whether to show recently used resources prepended by a unique number.

256.        --

257.        --  Deprecated: 2.12: Use Gtk.Recent_Chooser_Menu.Get_Show_Numbers and

258.        --  Gtk.Recent_Chooser_Menu.Set_Show_Numbers instead.

260.        ----------------

261.        -- Properties --

262.        ----------------

264.        --  <properties>

265.        --  Name:  Filter_Property

266.        --  Type:  Object

267.        --  Descr: The current filter for selecting which resources are displayed

268.        --

269.        --  Name:  Limit_Property

270.        --  Type:  Int

271.        --  Descr: The maximum number of items to be displayed

272.        --

273.        --  Name:  Local_Only_Property

274.        --  Type:  Boolean

275.        --  Descr: Whether the selected resource(s) should be limited to local

276.        --         file: URIs

277.        --

278.        --  Name:  Recent_Manager_Property

279.        --  Type:  Object

280.        --  Descr: The RecentManager object to use

281.        --

282.        --  Name:  Select_Multiple_Property

283.        --  Type:  Boolean

284.        --  Descr: Whether to allow multiple items to be selected

285.        --

286.        --  Name:  Show_Icons_Property

287.        --  Type:  Boolean

288.        --  Descr: Whether there should be an icon near the item

289.        --

290.        --  Name:  Show_Not_Found_Property

291.        --  Type:  Boolean

292.        --  Descr: Whether the items pointing to unavailable resources should be

293.        --         displayed

294.        --

295.        --  Name:  Show_Private_Property

296.        --  Type:  Boolean

297.        --  Descr: Whether the private items should be displayed

298.        --

299.        --  Name:  Show_Tips_Property

300.        --  Type:  Boolean

301.        --  Descr: Whether there should be a tooltip on the item

302.        --

303.        --  Name:  Sort_Type_Property

304.        --  Type:  Enum

305.        --  Descr: The sorting order of the items displayed

306.        --

307.        --  </properties>

309.        Filter_Property          : constant Glib.Properties.Property_ObjectTo API docTo spec;

310.        Limit_Property           : constant Glib.Properties.Property_IntTo API docTo spec;

311.        Local_Only_Property      : constant Glib.Properties.Property_BooleanTo API docTo spec;

312.        Recent_Manager_Property  : constant Glib.Properties.Property_ObjectTo API docTo spec;

313.        Select_Multiple_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

314.        Show_Icons_Property      : constant Glib.Properties.Property_BooleanTo API docTo spec;

315.        Show_Not_Found_Property  : constant Glib.Properties.Property_BooleanTo API docTo spec;

316.        Show_Private_Property    : constant Glib.Properties.Property_BooleanTo API docTo spec;

317.        Show_Tips_Property       : constant Glib.Properties.Property_BooleanTo API docTo spec;

318.        Sort_Type_Property       : constant Glib.Properties.Property_EnumTo API docTo spec;

320.     private

322.        Filter_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

323.          Glib.Properties.BuildTo API docTo specTo body ("filter");

324.        Limit_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

325.          Glib.Properties.BuildTo API docTo specTo body ("limit");

326.        Local_Only_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

327.          Glib.Properties.BuildTo API docTo specTo body ("local-only");

328.        Recent_Manager_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

329.          Glib.Properties.BuildTo API docTo specTo body ("recent-manager");

330.        Select_Multiple_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

331.          Glib.Properties.BuildTo API docTo specTo body ("select-multiple");

332.        Show_Icons_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

333.          Glib.Properties.BuildTo API docTo specTo body ("show-icons");

334.        Show_Not_Found_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

335.          Glib.Properties.BuildTo API docTo specTo body ("show-not-found");

336.        Show_Private_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

337.          Glib.Properties.BuildTo API docTo specTo body ("show-private");

338.        Show_Tips_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

339.          Glib.Properties.BuildTo API docTo specTo body ("show-tips");

340.        Sort_Type_PropertyTo API docTo spec : constant Glib.Properties.Property_EnumTo API docTo spec :=

341.          Glib.Properties.BuildTo API docTo specTo body ("sort-type");

343.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_recent_chooser_get_type");

344.        pragma Import (C, Error_QuarkTo API docTo spec, "gtk_recent_chooser_error_quark");

346.     end Gtk.Recent_ChooserTo API docTo specTo body;