## 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_Page_Setup object stores the page size, orientation and margins. The

31.     --  idea is that you can get one of these from the page setup dialog and then

32.     --  pass it to the Gtk_Print_Operation when printing. The benefit of splitting

33.     --  this out of the Gtk_Print_Settings is that these affect the actual layout

34.     --  of the page, and thus need to be set long before user prints.

35.     --

36.     --  The margins specified in this object are the "print margins", i.e. the

37.     --  parts of the page that the printer cannot print on. These are different

38.     --  from the layout margins that a word processor uses; they are typically

39.     --  used to determine the minimal size for the layout margins.

40.     --

41.     --  To obtain a Gtk_Page_Setup use Gtk_New to get the defaults, or use

42.     --  Gtk_Print_Run_Page_Setup_Dialog to show the page setup dialog and receive

43.     --  the resulting page setup.

44.     --  </description>

45.     --  <c_version>2.16.6</c_version>

47.     with Glib.ErrorTo API docTo specTo body;

48.     with Glib.Key_FileTo API docTo specTo body;

49.     with Glib.ObjectTo API docTo specTo body;

50.     with Gtk.EnumsTo API docTo specTo body;

51.     with Gtk.Paper_SizeTo API docTo specTo body;

53.     package Gtk.Page_SetupTo API docTo specTo body is

55.        type Gtk_Page_Setup_RecordTo API docTo body is new Glib.Object.GObject_RecordTo API docTo specTo body with private;

56.        type Gtk_Page_Setup is access all Gtk_Page_Setup_RecordTo API docTo specTo body'Class;

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

60.        procedure Gtk_NewTo API docTo body (Widget : out Gtk_Page_SetupTo API docTo spec);

61.        procedure InitializeTo API docTo body (Widget : access Gtk_Page_Setup_RecordTo API docTo specTo body'Class);

62.        --  Creates a new Gtk_Page_Setup.

64.        procedure Gtk_New_From_FileTo API docTo body

65.          (Widget    : out Gtk_Page_SetupTo API docTo spec;

66.           File_Name : String;

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

68.        procedure Initialize_From_FileTo API docTo body

69.          (Widget    : access Gtk_Page_Setup_RecordTo API docTo specTo body'Class;

70.           File_Name : String;

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

72.        --  Reads the page setup from the file File_Name. Returns a

73.        --  new Gtk_Page_Setup object with the restored page setup,

74.        --  or null if an error occurred. See To_File.

76.        procedure Gtk_New_From_Key_FileTo API docTo body

77.          (Widget     : out Gtk_Page_SetupTo API docTo spec;

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

79.           Group_Name : String := "";

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

81.        procedure Initialize_From_Key_FileTo API docTo body

82.          (Widget     : access Gtk_Page_Setup_RecordTo API docTo specTo body'Class;

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

84.           Group_Name : String := "";

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

86.        --  Reads the page setup from the group @group_name in the key file

87.        --  Key_File. Returns a new Gtk_Page_Setup object with the restored

88.        --  page setup, or null if an error occurred.

89.        --

90.        --  Return value: the restored Gtk_Page_Setup

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

93.        -- Loading, Saving, Copying --

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

96.        function Load_FileTo API docTo body

97.          (Setup     : access Gtk_Page_Setup_RecordTo API docTo specTo body;

98.           File_Name : String;

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

100.           return Boolean;

101.        --  Reads the page setup from the file File_name.

102.        --  See To_File.  Returns True on success.

104.        function Load_Key_FileTo API docTo body

105.          (Setup      : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

107.           Group_Name : String := "";

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

109.           return Boolean;

110.        --  Reads the page setup from the group Group_Name (by default,

111.        --  "Page Setup") in the key file Key_File.  Returns True on success.

113.        function To_FileTo API docTo body

114.          (Setup     : access Gtk_Page_Setup_RecordTo API docTo specTo body;

115.           File_Name : String;

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

117.           return Boolean;

118.        --  This function saves the information from Setup to File_Name.

119.        --  Returns True on success.

121.        procedure To_Key_FileTo API docTo body

122.          (Setup      : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

124.           Group_Name : String := "");

125.        --  This function adds the page setup from Setup to Key_File.

127.        function CopyTo API docTo body (Other : access Gtk_Page_Setup_RecordTo API docTo specTo body) return Gtk_Page_SetupTo API docTo spec;

128.        --  Copies a Gtk_Page_Setup.

130.        -------------

131.        -- Margins --

132.        -------------

134.        function Get_Bottom_MarginTo API docTo body

135.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

137.           return GdoubleTo API docTo spec;

138.        function Get_Left_MarginTo API docTo body

139.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

141.           return GdoubleTo API docTo spec;

142.        function Get_Right_MarginTo API docTo body

143.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

145.           return GdoubleTo API docTo spec;

146.        function Get_Top_MarginTo API docTo body

147.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

149.           return GdoubleTo API docTo spec;

150.        --  Gets the specified margin in units of Unit.

152.        procedure Set_Bottom_MarginTo API docTo body

153.          (Setup  : access Gtk_Page_Setup_RecordTo API docTo specTo body;

154.           Margin : GdoubleTo API docTo spec;

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

156.        procedure Set_Left_MarginTo API docTo body

157.          (Setup  : access Gtk_Page_Setup_RecordTo API docTo specTo body;

158.           Margin : GdoubleTo API docTo spec;

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

160.        procedure Set_Right_MarginTo API docTo body

161.          (Setup  : access Gtk_Page_Setup_RecordTo API docTo specTo body;

162.           Margin : GdoubleTo API docTo spec;

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

164.        procedure Set_Top_MarginTo API docTo body

165.          (Setup  : access Gtk_Page_Setup_RecordTo API docTo specTo body;

166.           Margin : GdoubleTo API docTo spec;

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

168.        --  Sets the margins of the Gtk_Page_Setup.

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

171.        -- Page Size --

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

174.        function Get_Page_HeightTo API docTo body

175.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

177.           return GdoubleTo API docTo spec;

178.        function Get_Page_WidthTo API docTo body

179.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

181.           return GdoubleTo API docTo spec;

182.        --  Returns the page height/width in units of Unit.

183.        --

184.        --  Note that this function takes orientation and

185.        --  margins into consideration.  See Get_Paper_Height.

187.        ------------------------------

188.        -- Paper Size / Orientation --

189.        ------------------------------

191.        function Get_Paper_SizeTo API docTo body

192.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body)

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

194.        procedure Set_Paper_SizeTo API docTo body

195.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body;

196.           Size  : Gtk.Paper_Size.Gtk_Paper_SizeTo API docTo spec);

197.        --  Gets/Sets the paper size of the Gtk_Page_Setup without

198.        --  changing the margins. See Set_Paper_Size_And_Default_Margins.

200.        procedure Set_Paper_Size_And_Default_MarginsTo API docTo body

201.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body;

202.           Size  : Gtk.Paper_Size.Gtk_Paper_SizeTo API docTo spec);

203.        --  Sets the paper size of the Gtk_Page_Setup and modifies

204.        --  the margins according to the new paper size.

206.        function Get_Paper_HeightTo API docTo body

207.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

209.           return GdoubleTo API docTo spec;

210.        function Get_Paper_WidthTo API docTo body

211.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

213.           return GdoubleTo API docTo spec;

214.        --  Returns the paper height in units of Unit.

215.        --

216.        --  Note that this function takes orientation, but

217.        --  not margins into consideration.  See Get_Page_Height.

219.        function Get_OrientationTo API docTo body

220.          (Setup : access Gtk_Page_Setup_RecordTo API docTo specTo body)

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

222.        procedure Set_OrientationTo API docTo body

223.          (Setup       : access Gtk_Page_Setup_RecordTo API docTo specTo body;

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

225.        --  The page orientation of the Gtk_Page_Setup.

227.     private

229.        type Gtk_Page_Setup_RecordTo API docTo spec is

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

232.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_page_setup_get_type");

234.     end Gtk.Page_SetupTo API docTo specTo body;