]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkwindow.sgml
s/RESIZEABLE/RESIZABLE/
[~andy/gtk] / docs / reference / gtk / tmpl / gtkwindow.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkWindow
3
4 <!-- ##### SECTION Short_Description ##### -->
5
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9
10 </para>
11
12 <!-- ##### SECTION See_Also ##### -->
13 <para>
14
15 </para>
16
17 <!-- ##### STRUCT GtkWindow ##### -->
18 <para>
19
20 </para>
21
22
23 <!-- ##### FUNCTION gtk_window_new ##### -->
24 <para>
25
26 </para>
27
28 @type: 
29 @Returns: 
30
31
32 <!-- ##### FUNCTION gtk_window_set_title ##### -->
33 <para>
34
35 </para>
36
37 @window: 
38 @title: 
39
40
41 <!-- ##### FUNCTION gtk_window_set_wmclass ##### -->
42 <para>
43
44 </para>
45
46 @window: 
47 @wmclass_name: 
48 @wmclass_class: 
49
50
51 <!-- ##### FUNCTION gtk_window_set_policy ##### -->
52 <para>
53 Changes how a toplevel window deals with its size request and user resize
54 attempts. There are really only two reasonable ways to call this function:
55 <orderedlist>
56 <listitem>
57 <para>
58 <literal>gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE)</literal> 
59 means that the window is user-resizable.
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 <literal>gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, TRUE)</literal> 
65 means that the window's size is program-controlled, and should simply match 
66 the current size request of the window's children.
67 </para>
68 </listitem>
69 </orderedlist>
70 The first policy is the default, that is, by default windows are designed to 
71 be resized by users.
72 </para>
73
74 <para>
75 The basic ugly truth of this function is that it should be simply:
76 <programlisting>
77  void gtk_window_set_user_resizeable(GtkWidget* window, gboolean setting);
78 </programlisting>
79 So, pretend it is like that, and only use the two policies mentioned above.
80 GTK+ 1.4 may replace gtk_window_set_policy() with a nicer function like
81 gtk_window_set_user_resizeable().
82 </para>
83
84 <para>
85 If set to TRUE, the @allow_grow parameter allows the user to expand the window
86 beyond the size request of its child widgets. If @allow_grow is TRUE, be sure to
87 check that your child widgets work properly as the window is resized.
88 </para>
89
90 <para>
91 A toplevel window will always change size to ensure its child widgets receive
92 their requested size. This means that if you add child widgets, the toplevel
93 window will expand to contain them. However, normally the toplevel will not
94 shrink to fit the size request of its children if it's too large; the
95 @auto_shrink parameter causes the window to shrink when child widgets have too
96 much space. @auto_shrink is normally used with the second of the two window
97 policies mentioned above.  That is, set @auto_shrink to TRUE if you want the
98 window to have a fixed, always-optimal size determined by your program.
99 </para>
100
101 <para>
102 Note that @auto_shrink doesn't do anything if @allow_shrink and @allow_grow are
103 both set to FALSE.
104 </para>
105
106 <para>
107 Neither of the two suggested window policies set the @allow_shrink paramter to
108 TRUE.  If @allow_shrink is TRUE, the user can shrink the window so that its
109 children do not receive their full size request; this is basically a bad thing,
110 because most widgets will look wrong if this happens. Furthermore GTK+ has a
111 tendency to re-expand the window if size is recalculated for any reason. The
112 upshot is that @allow_shrink should always be set to FALSE.
113 </para>
114
115 <para>
116 Sometimes when you think you want to use @allow_shrink, the real problem is that
117 some specific child widget is requesting too much space, so the user can't
118 shrink the window sufficiently. Perhaps you are calling gtk_widget_set_usize()
119 on a child widget, and forcing its size request to be too large. Instead of
120 setting the child's usize, consider using gtk_window_set_default_size() so that
121 the child gets a larger allocation than it requests.
122 </para>
123
124 @window: the window
125 @allow_shrink: whether the user can shrink the window below its size request
126 @allow_grow: whether the user can grow the window larger than its size request
127 @auto_shrink: whether the window automatically snaps back to its size request if
128 it's larger
129
130
131 <!-- ##### FUNCTION gtk_window_add_accel_group ##### -->
132 <para>
133
134 </para>
135
136 @window: 
137 @accel_group: 
138
139
140 <!-- ##### FUNCTION gtk_window_remove_accel_group ##### -->
141 <para>
142
143 </para>
144
145 @window: 
146 @accel_group: 
147
148
149 <!-- ##### MACRO gtk_window_position ##### -->
150 <para>
151
152 </para>
153
154
155
156 <!-- ##### FUNCTION gtk_window_activate_focus ##### -->
157 <para>
158
159 </para>
160
161 @window: 
162 @Returns: 
163
164
165 <!-- ##### FUNCTION gtk_window_activate_default ##### -->
166 <para>
167
168 </para>
169
170 @window: 
171 @Returns: 
172
173
174 <!-- ##### FUNCTION gtk_window_set_modal ##### -->
175 <para>
176
177 </para>
178
179 @window: 
180 @modal: 
181
182
183 <!-- ##### FUNCTION gtk_window_set_default_size ##### -->
184 <para>
185
186 </para>
187
188 @window: 
189 @width: 
190 @height: 
191
192
193 <!-- ##### FUNCTION gtk_window_set_geometry_hints ##### -->
194 <para>
195
196 </para>
197
198 @window: 
199 @geometry_widget: 
200 @geometry: 
201 @geom_mask: 
202
203
204 <!-- ##### FUNCTION gtk_window_set_gravity ##### -->
205 <para>
206
207 </para>
208
209 @window: 
210 @gravity: 
211
212
213 <!-- ##### FUNCTION gtk_window_get_gravity ##### -->
214 <para>
215
216 </para>
217
218 @window: 
219 @Returns: 
220
221
222 <!-- ##### FUNCTION gtk_window_set_position ##### -->
223 <para>
224
225 </para>
226
227 @window: 
228 @position: 
229
230
231 <!-- ##### FUNCTION gtk_window_set_transient_for ##### -->
232 <para>
233
234 </para>
235
236 @window: 
237 @parent: 
238
239
240 <!-- ##### FUNCTION gtk_window_set_destroy_with_parent ##### -->
241 <para>
242
243 </para>
244
245 @window: 
246 @setting: 
247
248
249 <!-- ##### FUNCTION gtk_window_list_toplevels ##### -->
250 <para>
251
252 </para>
253
254 @Returns: 
255
256
257 <!-- ##### FUNCTION gtk_window_add_mnemonic ##### -->
258 <para>
259
260 </para>
261
262 @window: 
263 @keyval: 
264 @target: 
265
266
267 <!-- ##### FUNCTION gtk_window_remove_mnemonic ##### -->
268 <para>
269
270 </para>
271
272 @window: 
273 @keyval: 
274 @target: 
275
276
277 <!-- ##### FUNCTION gtk_window_mnemonic_activate ##### -->
278 <para>
279
280 </para>
281
282 @window: 
283 @keyval: 
284 @modifier: 
285 @Returns: 
286
287
288 <!-- ##### FUNCTION gtk_window_present ##### -->
289 <para>
290
291 </para>
292
293 @window: 
294
295
296 <!-- ##### FUNCTION gtk_window_iconify ##### -->
297 <para>
298
299 </para>
300
301 @window: 
302
303
304 <!-- ##### FUNCTION gtk_window_deiconify ##### -->
305 <para>
306
307 </para>
308
309 @window: 
310
311
312 <!-- ##### FUNCTION gtk_window_stick ##### -->
313 <para>
314
315 </para>
316
317 @window: 
318
319
320 <!-- ##### FUNCTION gtk_window_unstick ##### -->
321 <para>
322
323 </para>
324
325 @window: 
326
327
328 <!-- ##### FUNCTION gtk_window_maximize ##### -->
329 <para>
330
331 </para>
332
333 @window: 
334
335
336 <!-- ##### FUNCTION gtk_window_unmaximize ##### -->
337 <para>
338
339 </para>
340
341 @window: 
342
343
344 <!-- ##### FUNCTION gtk_window_begin_resize_drag ##### -->
345 <para>
346
347 </para>
348
349 @window: 
350 @edge: 
351 @button: 
352 @root_x: 
353 @root_y: 
354 @timestamp: 
355
356
357 <!-- ##### FUNCTION gtk_window_begin_move_drag ##### -->
358 <para>
359
360 </para>
361
362 @window: 
363 @button: 
364 @root_x: 
365 @root_y: 
366 @timestamp: 
367
368
369 <!-- ##### FUNCTION gtk_window_set_decorated ##### -->
370 <para>
371
372 </para>
373
374 @window: 
375 @setting: 
376
377
378 <!-- ##### FUNCTION gtk_window_set_frame_dimensions ##### -->
379 <para>
380
381 </para>
382
383 @window: 
384 @left: 
385 @top: 
386 @right: 
387 @bottom: 
388
389
390 <!-- ##### FUNCTION gtk_window_set_has_frame ##### -->
391 <para>
392
393 </para>
394
395 @window: 
396 @setting: 
397
398
399 <!-- ##### FUNCTION gtk_window_set_mnemonic_modifier ##### -->
400 <para>
401
402 </para>
403
404 @window: 
405 @modifier: 
406
407
408 <!-- ##### FUNCTION gtk_window_set_role ##### -->
409 <para>
410
411 </para>
412
413 @window: 
414 @role: 
415
416
417 <!-- ##### FUNCTION gtk_window_set_type_hint ##### -->
418 <para>
419
420 </para>
421
422 @window: 
423 @hint: 
424
425
426 <!-- ##### FUNCTION gtk_decorated_window_init ##### -->
427 <para>
428
429 </para>
430
431 @window: 
432
433
434 <!-- ##### FUNCTION gtk_decorated_window_calculate_frame_size ##### -->
435 <para>
436
437 </para>
438
439 @window: 
440
441
442 <!-- ##### FUNCTION gtk_decorated_window_set_title ##### -->
443 <para>
444
445 </para>
446
447 @window: 
448 @title: 
449
450
451 <!-- ##### FUNCTION gtk_decorated_window_move_resize_window ##### -->
452 <para>
453
454 </para>
455
456 @window: 
457 @x: 
458 @y: 
459 @width: 
460 @height: 
461
462
463 <!-- ##### SIGNAL GtkWindow::activate-default ##### -->
464 <para>
465
466 </para>
467
468 @window: the object which received the signal.
469
470 <!-- ##### SIGNAL GtkWindow::activate-focus ##### -->
471 <para>
472
473 </para>
474
475 @window: the object which received the signal.
476
477 <!-- ##### SIGNAL GtkWindow::frame-event ##### -->
478 <para>
479
480 </para>
481
482 @window: the object which received the signal.
483 @event: 
484 @Returns: 
485
486 <!-- ##### SIGNAL GtkWindow::move-focus ##### -->
487 <para>
488
489 </para>
490
491 @window: the object which received the signal.
492 @arg1: 
493
494 <!-- ##### SIGNAL GtkWindow::set-focus ##### -->
495 <para>
496
497 </para>
498
499 @window: the object which received the signal.
500 @widget: 
501
502 <!-- ##### ARG GtkWindow:type ##### -->
503 <para>
504 The type of the window.
505 </para>
506
507 <!-- ##### ARG GtkWindow:title ##### -->
508 <para>
509 The title of the window.
510 </para>
511
512 <!-- ##### ARG GtkWindow:auto-shrink ##### -->
513 <para>
514 If the window shrinks automatically when widgets within it shrink.
515 </para>
516
517 <!-- ##### ARG GtkWindow:allow-shrink ##### -->
518 <para>
519 If the window can be resized to a smaller size by the user.
520 </para>
521
522 <!-- ##### ARG GtkWindow:allow-grow ##### -->
523 <para>
524 If the window can be resized to a larger size by the user.
525 </para>
526
527 <!-- ##### ARG GtkWindow:modal ##### -->
528 <para>
529 If the window is modal, i.e. it grabs all GTK+ events.
530 </para>
531
532 <!-- ##### ARG GtkWindow:window-position ##### -->
533 <para>
534 The position of the window.
535 </para>
536
537 <!-- ##### ARG GtkWindow:default-width ##### -->
538 <para>
539
540 </para>
541
542 <!-- ##### ARG GtkWindow:default-height ##### -->
543 <para>
544
545 </para>
546
547 <!-- ##### ARG GtkWindow:destroy-with-parent ##### -->
548 <para>
549
550 </para>
551