~ubuntu-branches/ubuntu/precise/gtk+2.0/precise-updates

« back to all changes in this revision

Viewing changes to docs/reference/gtk/tmpl/gtkpagesetup.sgml

  • Committer: Package Import Robot
  • Author(s): Ken VanDine
  • Date: 2011-12-01 11:40:06 UTC
  • mfrom: (1.14.11)
  • Revision ID: package-import@ubuntu.com-20111201114006-nrmf6qu3pg512veo
Tags: 2.24.8-0ubuntu1
* New upstream release 
  - gtkfilechooser should be more robust to malformed URIs
    in .gtk-bookmarks (LP: #189494)
* debian/patches/010_make_bg_changes_queue_repaint.patch
  - dropped it introduces performance regressions in some gtk2 
    apps (LP: #889019)
* 101_filechooser.patch, 000git_file_chooser.patch: dropped, upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!-- ##### SECTION Title ##### -->
2
 
GtkPageSetup
3
 
 
4
 
<!-- ##### SECTION Short_Description ##### -->
5
 
Stores page setup information
6
 
 
7
 
<!-- ##### SECTION Long_Description ##### -->
8
 
<para>
9
 
A GtkPageSetup object stores the page size, orientation and margins. 
10
 
The idea is that you can get one of these from the page setup dialog 
11
 
and then pass it to the #GtkPrintOperation when printing. 
12
 
The benefit of splitting this out of the #GtkPrintSettings is that 
13
 
these affect the actual layout of the page, and thus need to be set 
14
 
long before user prints. 
15
 
</para>
16
 
<para id="print-margins">
17
 
The margins specified in this object are the "print margins", i.e. the 
18
 
parts of the page that the printer cannot print on. These are different
19
 
from the layout margins that a word processor uses; they are typically
20
 
used to determine the <emphasis>minimal</emphasis> size for the layout 
21
 
margins.
22
 
</para>
23
 
<para>
24
 
To obtain a #GtkPageSetup use gtk_page_setup_new()
25
 
to get the defaults, or use gtk_print_run_page_setup_dialog() to show 
26
 
the page setup dialog and receive the resulting page setup.
27
 
</para>
28
 
<example>
29
 
<title>A page setup dialog</title>
30
 
<programlisting>
31
 
static GtkPrintSettings *settings = NULL;
32
 
static GtkPageSetup *page_setup = NULL;
33
 
 
34
 
static void
35
 
do_page_setup (void)
36
 
{
37
 
  GtkPageSetup *new_page_setup;
38
 
 
39
 
  if (settings == NULL)
40
 
    settings = gtk_print_settings_new (<!-- -->);
41
 
 
42
 
  new_page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (main_window),
43
 
                                                    page_setup, settings);
44
 
 
45
 
  if (page_setup)
46
 
    g_object_unref (page_setup);
47
 
 
48
 
  page_setup = new_page_setup;
49
 
}
50
 
</programlisting>
51
 
</example>
52
 
<para>
53
 
Printing support was added in GTK+ 2.10.
54
 
</para>
55
 
 
56
 
<!-- ##### SECTION See_Also ##### -->
57
 
<para>
58
 
 
59
 
</para>
60
 
 
61
 
<!-- ##### SECTION Stability_Level ##### -->
62
 
 
63
 
 
64
 
<!-- ##### SECTION Image ##### -->
65
 
 
66
 
 
67
 
<!-- ##### STRUCT GtkPageSetup ##### -->
68
 
<para>
69
 
 
70
 
</para>
71
 
 
72
 
 
73
 
<!-- ##### FUNCTION gtk_page_setup_new ##### -->
74
 
<para>
75
 
 
76
 
</para>
77
 
 
78
 
@void: 
79
 
@Returns: 
80
 
 
81
 
 
82
 
<!-- ##### FUNCTION gtk_page_setup_copy ##### -->
83
 
<para>
84
 
 
85
 
</para>
86
 
 
87
 
@other: 
88
 
@Returns: 
89
 
 
90
 
 
91
 
<!-- ##### FUNCTION gtk_page_setup_get_orientation ##### -->
92
 
<para>
93
 
 
94
 
</para>
95
 
 
96
 
@setup: 
97
 
@Returns: 
98
 
 
99
 
 
100
 
<!-- ##### FUNCTION gtk_page_setup_set_orientation ##### -->
101
 
<para>
102
 
 
103
 
</para>
104
 
 
105
 
@setup: 
106
 
@orientation: 
107
 
 
108
 
 
109
 
<!-- ##### FUNCTION gtk_page_setup_get_paper_size ##### -->
110
 
<para>
111
 
 
112
 
</para>
113
 
 
114
 
@setup: 
115
 
@Returns: 
116
 
 
117
 
 
118
 
<!-- ##### FUNCTION gtk_page_setup_set_paper_size ##### -->
119
 
<para>
120
 
 
121
 
</para>
122
 
 
123
 
@setup: 
124
 
@size: 
125
 
 
126
 
 
127
 
<!-- ##### FUNCTION gtk_page_setup_get_top_margin ##### -->
128
 
<para>
129
 
 
130
 
</para>
131
 
 
132
 
@setup: 
133
 
@unit: 
134
 
@Returns: 
135
 
 
136
 
 
137
 
<!-- ##### FUNCTION gtk_page_setup_set_top_margin ##### -->
138
 
<para>
139
 
 
140
 
</para>
141
 
 
142
 
@setup: 
143
 
@margin: 
144
 
@unit: 
145
 
 
146
 
 
147
 
<!-- ##### FUNCTION gtk_page_setup_get_bottom_margin ##### -->
148
 
<para>
149
 
 
150
 
</para>
151
 
 
152
 
@setup: 
153
 
@unit: 
154
 
@Returns: 
155
 
 
156
 
 
157
 
<!-- ##### FUNCTION gtk_page_setup_set_bottom_margin ##### -->
158
 
<para>
159
 
 
160
 
</para>
161
 
 
162
 
@setup: 
163
 
@margin: 
164
 
@unit: 
165
 
 
166
 
 
167
 
<!-- ##### FUNCTION gtk_page_setup_get_left_margin ##### -->
168
 
<para>
169
 
 
170
 
</para>
171
 
 
172
 
@setup: 
173
 
@unit: 
174
 
@Returns: 
175
 
 
176
 
 
177
 
<!-- ##### FUNCTION gtk_page_setup_set_left_margin ##### -->
178
 
<para>
179
 
 
180
 
</para>
181
 
 
182
 
@setup: 
183
 
@margin: 
184
 
@unit: 
185
 
 
186
 
 
187
 
<!-- ##### FUNCTION gtk_page_setup_get_right_margin ##### -->
188
 
<para>
189
 
 
190
 
</para>
191
 
 
192
 
@setup: 
193
 
@unit: 
194
 
@Returns: 
195
 
 
196
 
 
197
 
<!-- ##### FUNCTION gtk_page_setup_set_right_margin ##### -->
198
 
<para>
199
 
 
200
 
</para>
201
 
 
202
 
@setup: 
203
 
@margin: 
204
 
@unit: 
205
 
 
206
 
 
207
 
<!-- ##### FUNCTION gtk_page_setup_set_paper_size_and_default_margins ##### -->
208
 
<para>
209
 
 
210
 
</para>
211
 
 
212
 
@setup: 
213
 
@size: 
214
 
 
215
 
 
216
 
<!-- ##### FUNCTION gtk_page_setup_get_paper_width ##### -->
217
 
<para>
218
 
 
219
 
</para>
220
 
 
221
 
@setup: 
222
 
@unit: 
223
 
@Returns: 
224
 
 
225
 
 
226
 
<!-- ##### FUNCTION gtk_page_setup_get_paper_height ##### -->
227
 
<para>
228
 
 
229
 
</para>
230
 
 
231
 
@setup: 
232
 
@unit: 
233
 
@Returns: 
234
 
 
235
 
 
236
 
<!-- ##### FUNCTION gtk_page_setup_get_page_width ##### -->
237
 
<para>
238
 
 
239
 
</para>
240
 
 
241
 
@setup: 
242
 
@unit: 
243
 
@Returns: 
244
 
 
245
 
 
246
 
<!-- ##### FUNCTION gtk_page_setup_get_page_height ##### -->
247
 
<para>
248
 
 
249
 
</para>
250
 
 
251
 
@setup: 
252
 
@unit: 
253
 
@Returns: 
254
 
 
255
 
 
256
 
<!-- ##### FUNCTION gtk_page_setup_new_from_file ##### -->
257
 
<para>
258
 
 
259
 
</para>
260
 
 
261
 
@file_name: 
262
 
@error: 
263
 
@Returns: 
264
 
 
265
 
 
266
 
<!-- ##### FUNCTION gtk_page_setup_new_from_key_file ##### -->
267
 
<para>
268
 
 
269
 
</para>
270
 
 
271
 
@key_file: 
272
 
@group_name: 
273
 
@error: 
274
 
@Returns: 
275
 
 
276
 
 
277
 
<!-- ##### FUNCTION gtk_page_setup_load_file ##### -->
278
 
<para>
279
 
 
280
 
</para>
281
 
 
282
 
@setup: 
283
 
@file_name: 
284
 
@error: 
285
 
@Returns: 
286
 
 
287
 
 
288
 
<!-- ##### FUNCTION gtk_page_setup_load_key_file ##### -->
289
 
<para>
290
 
 
291
 
</para>
292
 
 
293
 
@setup: 
294
 
@key_file: 
295
 
@group_name: 
296
 
@error: 
297
 
@Returns: 
298
 
 
299
 
 
300
 
<!-- ##### FUNCTION gtk_page_setup_to_file ##### -->
301
 
<para>
302
 
 
303
 
</para>
304
 
 
305
 
@setup: 
306
 
@file_name: 
307
 
@error: 
308
 
@Returns: 
309
 
 
310
 
 
311
 
<!-- ##### FUNCTION gtk_page_setup_to_key_file ##### -->
312
 
<para>
313
 
 
314
 
</para>
315
 
 
316
 
@setup: 
317
 
@key_file: 
318
 
@group_name: 
319
 
 
320