## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                    Copyright (C) 2010-2013, 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.     --  A Gtk_Print_Settings object represents the settings of a print dialog in a

31.     --  system-independent way. The main use for this object is that once you've

32.     --  printed you can get a settings object that represents the settings the user

33.     --  chose, and the next time you print you can pass that object in so that the

34.     --  user doesn't have to re-set all his settings.

35.     --

36.     --  It's also possible to enumerate the settings so that you can easily save

37.     --  the settings for the next time your app runs, or even store them in a

38.     --  document. The predefined keys try to use shared values as much as possible

39.     --  so that moving such a document between systems still works.

40.     --  </description>

41.     --  <c_version>2.16.6</c_version>

43.     with Glib.ErrorTo API docTo specTo body;

44.     with Glib.Key_FileTo API docTo specTo body;

45.     with Glib.ObjectTo API docTo specTo body;

46.     with Gtk.EnumsTo API docTo specTo body;

47.     with Gtk.Paper_SizeTo API docTo specTo body;

49.     package Gtk.Print_SettingsTo API docTo specTo body is

51.        type Gtk_Print_Settings_RecordTo API docTo body is

52.           new Glib.Object.GObject_RecordTo API docTo specTo body with private;

53.        type Gtk_Print_Settings is access all Gtk_Print_Settings_RecordTo API docTo specTo body'Class;

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

57.        procedure Gtk_NewTo API docTo body (Widget : out Gtk_Print_SettingsTo API docTo spec);

58.        procedure InitializeTo API docTo body (Widget : access Gtk_Print_Settings_RecordTo API docTo specTo body'Class);

59.        --  Creates a new Gtk_Print_Settings object.

61.        procedure Gtk_New_From_FileTo API docTo body

62.          (Widget    : out Gtk_Print_SettingsTo API docTo spec;

63.           File_Name : String;

64.           Error     : Glib.Error.GErrorTo API docTo spec := null);

65.        procedure Initialize_From_FileTo API docTo body

66.          (Widget    : access Gtk_Print_Settings_RecordTo API docTo specTo body'Class;

67.           File_Name : String;

68.           Error     : Glib.Error.GErrorTo API docTo spec := null);

69.        --  Reads the print settings from File_Name. Returns a new

70.        --  Gtk_Print_Settings object with the restored settings, or null if an

71.        --  error occurred.  See To_File.

73.        procedure Gtk_New_From_Key_FileTo API docTo body

74.          (Widget     : out Gtk_Print_SettingsTo API docTo spec;

75.           Key_File   : Glib.Key_File.G_Key_FileTo API docTo spec;

76.           Group_Name : String := "";

77.           Error      : Glib.Error.GErrorTo API docTo spec := null);

78.        procedure Initialize_From_Key_FileTo API docTo body

79.          (Widget     : access Gtk_Print_Settings_RecordTo API docTo specTo body'Class;

80.           Key_File   : Glib.Key_File.G_Key_FileTo API docTo spec;

81.           Group_Name : String := "";

82.           Error      : Glib.Error.GErrorTo API docTo spec := null);

83.        --  Reads the print settings from the group Group_Name in Key_File.

84.        --  Returns a new Gtk_Print_Settings object with the restored settings,

85.        --  or null if an error occurred.

87.        function CopyTo API docTo body

88.          (Other : access Gtk_Print_Settings_RecordTo API docTo specTo body)

89.           return Gtk_Print_SettingsTo API docTo spec;

90.        --  Copies a Gtk_Print_Settings object.

92.        -----------------

93.        -- Basic Types --

94.        -----------------

96.        function Has_KeyTo API docTo body

97.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

98.           Key      : String)

99.           return Boolean;

100.        --  Returns True, if a value is associated with Key.

102.        function GetTo API docTo body

103.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

104.           Key      : String)

105.           return String;

106.        procedure SetTo API docTo body

107.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

108.           Key      : String;

109.           Value    : String := "");

110.        --  Manipulate string value associated with Key.

112.        procedure UnsetTo API docTo body

113.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

114.           Key      : String);

115.        --  Removes any value associated with Key.

116.        --  This has the same effect as setting the value to null.

118.        function Get_BoolTo API docTo body

119.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

120.           Key      : String)

121.           return Boolean;

122.        procedure Set_BoolTo API docTo body

123.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

124.           Key      : String;

125.           Value    : Boolean);

126.        --  Gets/Sets the boolean represented by the value

127.        --  that is associated with Key.

129.        function Get_DoubleTo API docTo body

130.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

131.           Key      : String;

132.           Def      : GdoubleTo API docTo spec := 0.0)

133.           return GdoubleTo API docTo spec;

134.        procedure Set_DoubleTo API docTo body

135.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

136.           Key      : String;

137.           Value    : GdoubleTo API docTo spec);

138.        --  Gets/Sets the floating point number represented by

139.        --  the value that is associated with Key, or Def

140.        --  if the value does not represent a floating point number.

141.        --

142.        --  Floating point numbers are parsed with g_ascii_strtod().

144.        function Get_IntTo API docTo body

145.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

146.           Key      : String;

147.           Def      : GintTo API docTo spec := 0)

148.           return GintTo API docTo spec;

149.        procedure Set_IntTo API docTo body

150.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

151.           Key      : String;

152.           Value    : GintTo API docTo spec);

153.        --  Gets/Sets the value of Key. Get_Int interprets the value as

154.        --  an integer, or else returns the default value.

156.        function Get_LengthTo API docTo body

157.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

158.           Key      : String;

159.           UnitTo API docTo body     : Gtk.Enums.Gtk_UnitTo API docTo spec)

160.           return GdoubleTo API docTo spec;

161.        procedure Set_LengthTo API docTo body

162.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

163.           Key      : String;

164.           Value    : GdoubleTo API docTo spec;

165.           UnitTo API docTo body     : Gtk.Enums.Gtk_UnitTo API docTo spec);

166.        --  Gets/Sets the value associated with Key, interpreted

167.        --  as a length. The returned value is converted to Units.

169.        --------------------

170.        -- Print Settings --

171.        --------------------

173.        function Get_CollateTo API docTo body

174.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

175.           return Boolean;

176.        procedure Set_CollateTo API docTo body

177.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

178.           Collate  : Boolean);

179.        --  Whether to collate the printed pages

181.        function Get_Default_SourceTo API docTo body

182.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

183.           return String;

184.        procedure Set_Default_SourceTo API docTo body

185.          (Settings       : access Gtk_Print_Settings_RecordTo API docTo specTo body;

186.           Default_Source : String);

187.        --  The default source

189.        function Get_DitherTo API docTo body

190.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

191.           return String;

192.        procedure Set_DitherTo API docTo body

193.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

194.           Dither   : String);

195.        --  Gets/Sets the dithering that is used

197.        function Get_DuplexTo API docTo body

198.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

199.           return Gtk.Enums.Gtk_Print_DuplexTo API docTo spec;

200.        procedure Set_DuplexTo API docTo body

201.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

202.           DuplexTo API docTo body   : Gtk.Enums.Gtk_Print_DuplexTo API docTo spec);

203.        --  Whether to print the output in duplex.

205.        function Get_FinishingsTo API docTo body

206.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

207.           return String;

208.        procedure Set_FinishingsTo API docTo body

209.          (Settings   : access Gtk_Print_Settings_RecordTo API docTo specTo body;

210.           Finishings : String);

211.        --  The finishings

213.        function Get_Media_TypeTo API docTo body

214.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

215.           return String;

216.        procedure Set_Media_TypeTo API docTo body

217.          (Settings   : access Gtk_Print_Settings_RecordTo API docTo specTo body;

218.           Media_Type : String);

219.        --  Gets/Sets the media type.

220.        --  The set of media types is defined in PWG 5101.1-2002 PWG.

222.        function Get_N_CopiesTo API docTo body

223.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

224.           return GintTo API docTo spec;

225.        procedure Set_N_CopiesTo API docTo body

226.          (Settings   : access Gtk_Print_Settings_RecordTo API docTo specTo body;

227.           Num_Copies : GintTo API docTo spec);

228.        --  Gets/Sets the number of copies to print

230.        function Get_Number_UpTo API docTo body

231.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

232.           return GintTo API docTo spec;

233.        procedure Set_Number_UpTo API docTo body

234.          (Settings  : access Gtk_Print_Settings_RecordTo API docTo specTo body;

235.           Number_Up : GintTo API docTo spec);

236.        --  Gets/Sets the number of pages per sheet

238.        function Get_Number_Up_LayoutTo API docTo body

239.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

240.           return Gtk.Enums.Gtk_Number_Up_LayoutTo API docTo spec;

241.        procedure Set_Number_Up_LayoutTo API docTo body

242.          (Settings         : access Gtk_Print_Settings_RecordTo API docTo specTo body;

243.           Number_Up_LayoutTo API docTo body : Gtk.Enums.Gtk_Number_Up_LayoutTo API docTo spec);

244.        --  Gets/Sets layout of page in number-up mode

246.        function Get_OrientationTo API docTo body

247.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

248.           return Gtk.Enums.Gtk_Page_OrientationTo API docTo spec;

249.        procedure Set_OrientationTo API docTo body

250.          (Settings    : access Gtk_Print_Settings_RecordTo API docTo specTo body;

251.           OrientationTo API docTo body : Gtk.Enums.Gtk_Page_OrientationTo API docTo spec);

252.        --  Get the orientation.

254.        function Get_Output_BinTo API docTo body

255.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

256.           return String;

257.        procedure Set_Output_BinTo API docTo body

258.          (Settings   : access Gtk_Print_Settings_RecordTo API docTo specTo body;

259.           Output_Bin : String);

260.        --  Gets/Sets the output bin.

262.        type Gtk_Page_Range_Record is record

263.           Range_Start : GintTo API docTo spec;

264.           Range_End   : GintTo API docTo spec;

265.        end record;

266.        pragma Convention (C, Gtk_Page_Range_RecordTo API docTo spec);

267.        type Gtk_Page_Range_Array is

268.          array (Integer range <>) of Gtk_Page_Range_RecordTo API docTo spec;

269.        pragma Convention (C, Gtk_Page_Range_ArrayTo API docTo spec);

270.        --  Page range specification(s).

272.        function Get_Page_RangesTo API docTo body

273.          (Settings   : access Gtk_Print_Settings_RecordTo API docTo specTo body)

274.           return Gtk_Page_Range_ArrayTo API docTo spec;

275.        procedure Set_Page_RangesTo API docTo body

276.          (Settings    : access Gtk_Print_Settings_RecordTo API docTo specTo body;

277.           Page_Ranges : access Gtk_Page_Range_ArrayTo API docTo spec);

278.        --  Gets/Sets an array of Gtk_Page_Range_Records.

280.        function Get_Page_SetTo API docTo body

281.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

282.           return Gtk.Enums.Gtk_Page_SetTo API docTo spec;

283.        procedure Set_Page_SetTo API docTo body

284.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

285.           Page_SetTo API docTo body : Gtk.Enums.Gtk_Page_SetTo API docTo spec);

286.        --  Gets/Sets the set of pages to print

288.        function Get_Paper_HeightTo API docTo body

289.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

290.           UnitTo API docTo body     : Gtk.Enums.Gtk_UnitTo API docTo spec)

291.           return GdoubleTo API docTo spec;

292.        function Get_Paper_WidthTo API docTo body

293.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

294.           UnitTo API docTo body     : Gtk.Enums.Gtk_UnitTo API docTo spec)

295.           return GdoubleTo API docTo spec;

296.        procedure Set_Paper_HeightTo API docTo body

297.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

298.           Height   : GdoubleTo API docTo spec;

299.           UnitTo API docTo body     : Gtk.Enums.Gtk_UnitTo API docTo spec);

300.        procedure Set_Paper_WidthTo API docTo body

301.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

302.           Width    : GdoubleTo API docTo spec;

303.           UnitTo API docTo body     : Gtk.Enums.Gtk_UnitTo API docTo spec);

304.        --  Get/Set the paper height/width, in units of Unit

306.        function Get_Paper_SizeTo API docTo body

307.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

308.           return Gtk.Paper_Size.Gtk_Paper_SizeTo API docTo spec;

309.        procedure Set_Paper_SizeTo API docTo body

310.          (Settings   : access Gtk_Print_Settings_RecordTo API docTo specTo body;

311.           Paper_Size : Gtk.Paper_Size.Gtk_Paper_SizeTo API docTo spec);

312.        --  Sets/Gets the paper size.

314.        function Get_Print_PagesTo API docTo body

315.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

316.           return Gtk.Enums.Gtk_Print_PagesTo API docTo spec;

317.        procedure Set_Print_PagesTo API docTo body

318.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

319.           PagesTo API docTo body    : Gtk.Enums.Gtk_Print_PagesTo API docTo spec);

320.        --  Gets/Sets which pages to print

322.        function Get_PrinterTo API docTo body

323.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

324.           return String;

325.        procedure Set_PrinterTo API docTo body

326.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

327.           Printer  : String);

328.        --  Gets/Sets the printer name

330.        function Get_Printer_LpiTo API docTo body

331.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

332.           return GdoubleTo API docTo spec;

333.        procedure Set_Printer_LpiTo API docTo body

334.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

335.           Lpi      : GdoubleTo API docTo spec);

336.        --  Gets/Sets the resolution in lpi (lines per inch)

338.        function Get_QualityTo API docTo body

339.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

340.           return Gtk.Enums.Gtk_Print_QualityTo API docTo spec;

341.        procedure Set_QualityTo API docTo body

342.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

343.           QualityTo API docTo body  : Gtk.Enums.Gtk_Print_QualityTo API docTo spec);

344.        --  Gets/Sets the print quality

346.        function Get_ResolutionTo API docTo body

347.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

348.           return GintTo API docTo spec;

349.        procedure Set_ResolutionTo API docTo body

350.          (Settings   : access Gtk_Print_Settings_RecordTo API docTo specTo body;

351.           Resolution : GintTo API docTo spec);

352.        --  Gets/Sets the resolution in dpi.

354.        function Get_Resolution_XTo API docTo body

355.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

356.           return GintTo API docTo spec;

357.        function Get_Resolution_YTo API docTo body

358.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

359.           return GintTo API docTo spec;

360.        procedure Set_Resolution_XYTo API docTo body

361.          (Settings     : access Gtk_Print_Settings_RecordTo API docTo specTo body;

362.           Resolution_X : GintTo API docTo spec;

363.           Resolution_Y : GintTo API docTo spec);

364.        --  Gets/Sets the horizontal/vertical resolution, in dpi.

366.        function Get_ReverseTo API docTo body

367.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

368.           return Boolean;

369.        procedure Set_ReverseTo API docTo body

370.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

371.           Rev      : Boolean);

372.        --  Returns whether to reverse the order of the printed pages

374.        function Get_ScaleTo API docTo body

375.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

376.           return GdoubleTo API docTo spec;

377.        procedure Set_ScaleTo API docTo body

378.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body;

379.           Scale    : GdoubleTo API docTo spec);

380.        --  Returns the scale in percent

382.        function Get_Use_ColorTo API docTo body

383.          (Settings : access Gtk_Print_Settings_RecordTo API docTo specTo body)

384.           return Boolean;

385.        procedure Set_Use_ColorTo API docTo body

386.          (Settings  : access Gtk_Print_Settings_RecordTo API docTo specTo body;

387.           Use_Color : Boolean);

388.        --  Returns whether to use color

390.        -----------------------------------

391.        -- Saving and Restoring Settings --

392.        -----------------------------------

394.        function Load_FileTo API docTo body

395.          (Settings  : access Gtk_Print_Settings_RecordTo API docTo specTo body;

396.           File_Name : String;

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

398.           return Boolean;

399.        --  Reads the print settings from File_Name.  See To_File.

400.        --  Returns True on success.

402.        function Load_Key_FileTo API docTo body

403.          (Settings   : access Gtk_Print_Settings_RecordTo API docTo specTo body;

404.           Key_File   : Glib.Key_File.G_Key_FileTo API docTo spec;

405.           Group_Name : String := "";

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

407.           return Boolean;

408.        --  Reads the print settings from the group Group_Name

409.        --  ("Print Settings" by default) in Key_File.

410.        --  Returns True on success

412.        function To_FileTo API docTo body

413.          (Settings  : access Gtk_Print_Settings_RecordTo API docTo specTo body;

414.           File_Name : String;

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

416.           return Boolean;

417.        --  This function saves the print settings from Settings to File_Name.

418.        --  Returns True on success

420.        procedure To_Key_FileTo API docTo body

421.          (Settings   : access Gtk_Print_Settings_RecordTo API docTo specTo body;

422.           Key_File   : Glib.Key_File.G_Key_FileTo API docTo spec;

423.           Group_Name : String := "");

424.        --  This function adds the print settings from Settings to Key_File.

425.        --  if Group_Name is not specified, it defaults to "Print Settings".

427.     private

429.        type Gtk_Print_Settings_RecordTo API docTo spec is

430.           new Glib.Object.GObject_RecordTo API docTo specTo body with null record;

432.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_print_settings_get_type");

434.     end Gtk.Print_SettingsTo API docTo specTo body;