]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtknotebook.sgml
Make 3.0 parallel-installable to 2.x
[~andy/gtk] / docs / reference / gtk / tmpl / gtknotebook.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkNotebook
3
4 <!-- ##### SECTION Short_Description ##### -->
5 A tabbed notebook container
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The #GtkNotebook widget is a #GtkContainer whose children are pages that
10 can be switched between using tab labels along one edge.
11 </para>
12 <para>
13 There are many configuration options for #GtkNotebook. Among other
14 things, you can choose on which edge the tabs appear
15 (see gtk_notebook_set_tab_pos()), whether, if there are too many
16 tabs to fit the notebook should be made bigger or scrolling
17 arrows added (see gtk_notebook_set_scrollable), and whether there
18 will be a popup menu allowing the users to switch pages.
19 (see gtk_notebook_popup_enable(), gtk_notebook_popup_disable())
20 </para>
21
22 <refsect2 id="GtkNotebook-BUILDER-UI">
23 <title>GtkNotebook as GtkBuildable</title>
24 <para>
25 The GtkNoteboopk implementation of the GtkBuildable interface
26 supports placing children into tabs by specifying "tab" as the
27 "type" attribute of a &lt;child&gt; element. Note that the content
28 of the tab must be created before the tab can be filled.
29 A tab child can be specified without specifying a &lt;child&gt;
30 type attribute.
31 </para>
32 <para>
33 To add a child widget in the notebooks action area, specify
34 "action-start" or "action-end" as the "type" attribute of the &lt;child&gt;
35 element.
36 </para>
37 <example>
38 <title>A UI definition fragment with GtkNotebook</title>
39 <programlisting><![CDATA[
40 <object class="GtkNotebook">
41   <child>
42     <object class="GtkLabel" id="notebook-content">
43       <property name="label">Content</property>
44     </object>
45   </child>
46   <child type="tab">
47     <object class="GtkLabel" id="notebook-tab">
48       <property name="label">Tab</property>
49     </object>
50   </child>
51 </object>
52 ]]></programlisting>
53 </example>
54 </refsect2>
55
56 <!-- ##### SECTION See_Also ##### -->
57 <para>
58 <variablelist>
59 <varlistentry>
60 <term>#GtkContainer</term>
61 <listitem><para>For functions that apply to every #GtkContainer</para></listitem>
62 </varlistentry>
63 </variablelist>
64 </para>
65
66 <!-- ##### SECTION Stability_Level ##### -->
67
68
69 <!-- ##### SECTION Image ##### -->
70
71
72 <!-- ##### STRUCT GtkNotebook ##### -->
73 <para>
74
75 </para>
76
77
78 <!-- ##### SIGNAL GtkNotebook::change-current-page ##### -->
79 <para>
80
81 </para>
82
83 @notebook: the object which received the signal.
84 @arg1: 
85 @Returns: 
86
87 <!-- ##### SIGNAL GtkNotebook::create-window ##### -->
88 <para>
89
90 </para>
91
92 @notebook: the object which received the signal.
93 @widget: 
94 @arg1: 
95 @arg2: 
96 @Returns: 
97
98 <!-- ##### SIGNAL GtkNotebook::focus-tab ##### -->
99 <para>
100
101 </para>
102
103 @notebook: the object which received the signal.
104 @arg1: 
105 @Returns: 
106
107 <!-- ##### SIGNAL GtkNotebook::move-focus-out ##### -->
108 <para>
109
110 </para>
111
112 @notebook: the object which received the signal.
113 @arg1: 
114
115 <!-- ##### SIGNAL GtkNotebook::page-added ##### -->
116 <para>
117
118 </para>
119
120 @notebook: the object which received the signal.
121 @widget: 
122 @arg1: 
123
124 <!-- ##### SIGNAL GtkNotebook::page-removed ##### -->
125 <para>
126
127 </para>
128
129 @notebook: the object which received the signal.
130 @widget: 
131 @arg1: 
132
133 <!-- ##### SIGNAL GtkNotebook::page-reordered ##### -->
134 <para>
135
136 </para>
137
138 @notebook: the object which received the signal.
139 @widget: 
140 @arg1: 
141
142 <!-- ##### SIGNAL GtkNotebook::reorder-tab ##### -->
143 <para>
144
145 </para>
146
147 @notebook: the object which received the signal.
148 @arg1: 
149 @Param3: 
150 @Returns: 
151
152 <!-- ##### SIGNAL GtkNotebook::select-page ##### -->
153 <para>
154
155 </para>
156
157 @notebook: the object which received the signal.
158 @arg1: 
159 @Returns: 
160
161 <!-- ##### SIGNAL GtkNotebook::switch-page ##### -->
162 <para>
163 Emitted when the user or a function changes the current page.
164 </para>
165
166 @notebook: the object which received the signal.
167 @page: the new current page
168 @page_num: the index of the page
169
170 <!-- ##### ARG GtkNotebook:enable-popup ##### -->
171 <para>
172
173 </para>
174
175 <!-- ##### ARG GtkNotebook:group ##### -->
176 <para>
177
178 </para>
179
180 <!-- ##### ARG GtkNotebook:page ##### -->
181 <para>
182
183 </para>
184
185 <!-- ##### ARG GtkNotebook:scrollable ##### -->
186 <para>
187
188 </para>
189
190 <!-- ##### ARG GtkNotebook:show-border ##### -->
191 <para>
192
193 </para>
194
195 <!-- ##### ARG GtkNotebook:show-tabs ##### -->
196 <para>
197
198 </para>
199
200 <!-- ##### ARG GtkNotebook:tab-pos ##### -->
201 <para>
202
203 </para>
204
205 <!-- ##### ARG GtkNotebook:detachable ##### -->
206 <para>
207
208 </para>
209
210 <!-- ##### ARG GtkNotebook:menu-label ##### -->
211 <para>
212
213 </para>
214
215 <!-- ##### ARG GtkNotebook:position ##### -->
216 <para>
217
218 </para>
219
220 <!-- ##### ARG GtkNotebook:reorderable ##### -->
221 <para>
222
223 </para>
224
225 <!-- ##### ARG GtkNotebook:tab-expand ##### -->
226 <para>
227
228 </para>
229
230 <!-- ##### ARG GtkNotebook:tab-fill ##### -->
231 <para>
232
233 </para>
234
235 <!-- ##### ARG GtkNotebook:tab-label ##### -->
236 <para>
237
238 </para>
239
240 <!-- ##### ARG GtkNotebook:tab-pack ##### -->
241 <para>
242  Deprecated: 2.20: The tab packing functionality of children should not
243  be used anymore and support will be removed in the future.
244 </para>
245
246 <!-- ##### ARG GtkNotebook:arrow-spacing ##### -->
247 <para>
248
249 </para>
250
251 <!-- ##### ARG GtkNotebook:has-backward-stepper ##### -->
252 <para>
253
254 </para>
255
256 <!-- ##### ARG GtkNotebook:has-forward-stepper ##### -->
257 <para>
258
259 </para>
260
261 <!-- ##### ARG GtkNotebook:has-secondary-backward-stepper ##### -->
262 <para>
263
264 </para>
265
266 <!-- ##### ARG GtkNotebook:has-secondary-forward-stepper ##### -->
267 <para>
268
269 </para>
270
271 <!-- ##### ARG GtkNotebook:tab-curvature ##### -->
272 <para>
273
274 </para>
275
276 <!-- ##### ARG GtkNotebook:tab-overlap ##### -->
277 <para>
278
279 </para>
280
281 <!-- ##### STRUCT GtkNotebookPage ##### -->
282 <para>
283 The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook.
284 </para>
285
286
287 <!-- ##### FUNCTION gtk_notebook_new ##### -->
288 <para>
289 </para>
290
291 @void: 
292 @Returns: 
293
294
295 <!-- ##### FUNCTION gtk_notebook_append_page ##### -->
296 <para>
297 </para>
298
299 @notebook: 
300 @child: 
301 @tab_label: 
302 @Returns: 
303
304
305 <!-- ##### FUNCTION gtk_notebook_append_page_menu ##### -->
306 <para>
307 </para>
308
309 @notebook: 
310 @child: 
311 @tab_label: 
312 @menu_label: 
313 @Returns: 
314
315
316 <!-- ##### FUNCTION gtk_notebook_prepend_page ##### -->
317 <para>
318 </para>
319
320 @notebook: 
321 @child: the
322 @tab_label: 
323 @Returns: 
324
325
326 <!-- ##### FUNCTION gtk_notebook_prepend_page_menu ##### -->
327 <para>
328 </para>
329
330 @notebook: 
331 @child: 
332 @tab_label: 
333 @menu_label: 
334 @Returns: 
335
336
337 <!-- ##### FUNCTION gtk_notebook_insert_page ##### -->
338 <para>
339 </para>
340
341 @notebook: 
342 @child: 
343 @tab_label: 
344 @position: 
345 @Returns: 
346
347
348 <!-- ##### FUNCTION gtk_notebook_insert_page_menu ##### -->
349 <para>
350 </para>
351
352 @notebook: 
353 @child: 
354 @tab_label: 
355 @menu_label: 
356 @position: 
357 @Returns: 
358
359
360 <!-- ##### FUNCTION gtk_notebook_remove_page ##### -->
361 <para>
362 </para>
363
364 @notebook: 
365 @page_num: 
366
367
368 <!-- ##### FUNCTION gtk_notebook_page_num ##### -->
369 <para>
370 </para>
371
372 @notebook: 
373 @child: 
374 @Returns: 
375
376
377 <!-- ##### FUNCTION gtk_notebook_next_page ##### -->
378 <para>
379 </para>
380
381 @notebook: 
382
383
384 <!-- ##### FUNCTION gtk_notebook_prev_page ##### -->
385 <para>
386 </para>
387
388 @notebook: 
389
390
391 <!-- ##### FUNCTION gtk_notebook_reorder_child ##### -->
392 <para>
393 </para>
394
395 @notebook: 
396 @child: 
397 @position: 
398
399
400 <!-- ##### FUNCTION gtk_notebook_set_tab_pos ##### -->
401 <para>
402 </para>
403
404 @notebook: the notebook widget
405 @pos: the position
406
407
408 <!-- ##### FUNCTION gtk_notebook_set_show_tabs ##### -->
409 <para>
410 </para>
411
412 @notebook: 
413 @show_tabs: 
414
415
416 <!-- ##### FUNCTION gtk_notebook_set_show_border ##### -->
417 <para>
418 </para>
419
420 @notebook: 
421 @show_border: 
422
423
424 <!-- ##### FUNCTION gtk_notebook_set_scrollable ##### -->
425 <para>
426 </para>
427
428 @notebook: 
429 @scrollable: 
430
431
432 <!-- ##### FUNCTION gtk_notebook_popup_enable ##### -->
433 <para>
434 </para>
435
436 @notebook: 
437
438
439 <!-- ##### FUNCTION gtk_notebook_popup_disable ##### -->
440 <para>
441 </para>
442
443 @notebook: 
444
445
446 <!-- ##### FUNCTION gtk_notebook_get_current_page ##### -->
447 <para>
448 </para>
449
450 @notebook: the notebook widget
451 @Returns: the page number
452
453
454 <!-- ##### FUNCTION gtk_notebook_get_menu_label ##### -->
455 <para>
456 </para>
457
458 @notebook: 
459 @child: 
460 @Returns: 
461
462
463 <!-- ##### FUNCTION gtk_notebook_get_nth_page ##### -->
464 <para>
465 </para>
466
467 @notebook: 
468 @page_num: 
469 @Returns: 
470
471
472 <!-- ##### FUNCTION gtk_notebook_get_n_pages ##### -->
473 <para>
474
475 </para>
476
477 @notebook: 
478 @Returns: 
479
480
481 <!-- ##### FUNCTION gtk_notebook_get_tab_label ##### -->
482 <para>
483 </para>
484
485 @notebook: 
486 @child: 
487 @Returns: 
488
489
490 <!-- ##### FUNCTION gtk_notebook_query_tab_label_packing ##### -->
491 <para>
492 </para>
493
494 @notebook: 
495 @child: 
496 @expand: 
497 @fill: 
498 @pack_type: 
499
500
501 <!-- ##### FUNCTION gtk_notebook_set_menu_label ##### -->
502 <para>
503 </para>
504
505 @notebook: 
506 @child: 
507 @menu_label: 
508
509
510 <!-- ##### FUNCTION gtk_notebook_set_menu_label_text ##### -->
511 <para>
512 </para>
513
514 @notebook: 
515 @child: 
516 @menu_text: 
517
518
519 <!-- ##### FUNCTION gtk_notebook_set_tab_label ##### -->
520 <para>
521 </para>
522
523 @notebook: 
524 @child: 
525 @tab_label: 
526
527
528 <!-- ##### FUNCTION gtk_notebook_set_tab_label_packing ##### -->
529 <para>
530 </para>
531
532 @notebook: 
533 @child: 
534 @expand: 
535 @fill: 
536 @pack_type: 
537
538
539 <!-- ##### FUNCTION gtk_notebook_set_tab_label_text ##### -->
540 <para>
541 </para>
542
543 @notebook: 
544 @child: 
545 @tab_text: 
546
547
548 <!-- ##### FUNCTION gtk_notebook_set_tab_reorderable ##### -->
549 <para>
550
551 </para>
552
553 @notebook: 
554 @child: 
555 @reorderable: 
556
557
558 <!-- ##### FUNCTION gtk_notebook_set_tab_detachable ##### -->
559 <para>
560
561 </para>
562
563 @notebook: 
564 @child: 
565 @detachable: 
566
567
568 <!-- ##### FUNCTION gtk_notebook_get_menu_label_text ##### -->
569 <para>
570
571 </para>
572
573 @notebook: 
574 @child: 
575 @Returns: 
576
577
578 <!-- ##### FUNCTION gtk_notebook_get_scrollable ##### -->
579 <para>
580
581 </para>
582
583 @notebook: 
584 @Returns: 
585
586
587 <!-- ##### FUNCTION gtk_notebook_get_show_border ##### -->
588 <para>
589
590 </para>
591
592 @notebook: 
593 @Returns: 
594
595
596 <!-- ##### FUNCTION gtk_notebook_get_show_tabs ##### -->
597 <para>
598
599 </para>
600
601 @notebook: 
602 @Returns: 
603
604
605 <!-- ##### FUNCTION gtk_notebook_get_tab_label_text ##### -->
606 <para>
607
608 </para>
609
610 @notebook: 
611 @child: 
612 @Returns: 
613
614
615 <!-- ##### FUNCTION gtk_notebook_get_tab_pos ##### -->
616 <para>
617
618 </para>
619
620 @notebook: 
621 @Returns: 
622
623
624 <!-- ##### FUNCTION gtk_notebook_get_tab_reorderable ##### -->
625 <para>
626
627 </para>
628
629 @notebook: 
630 @child: 
631 @Returns: 
632
633
634 <!-- ##### FUNCTION gtk_notebook_get_tab_detachable ##### -->
635 <para>
636
637 </para>
638
639 @notebook: 
640 @child: 
641 @Returns: 
642
643
644 <!-- ##### FUNCTION gtk_notebook_set_current_page ##### -->
645 <para>
646
647 </para>
648
649 @notebook: 
650 @page_num: 
651
652
653 <!-- ##### FUNCTION gtk_notebook_set_group ##### -->
654 <para>
655
656 </para>
657
658 @notebook: 
659 @group: 
660
661
662 <!-- ##### FUNCTION gtk_notebook_get_group ##### -->
663 <para>
664
665 </para>
666
667 @notebook: 
668 @Returns: 
669
670
671 <!-- ##### FUNCTION gtk_notebook_set_action_widget ##### -->
672 <para>
673
674 </para>
675
676 @notebook: 
677 @widget: 
678 @pack_type: 
679
680
681 <!-- ##### FUNCTION gtk_notebook_get_action_widget ##### -->
682 <para>
683
684 </para>
685
686 @notebook: 
687 @pack_type: 
688 @Returns: 
689
690
691 <!-- ##### USER_FUNCTION GtkNotebookWindowCreationFunc ##### -->
692 <para>
693 A function used by GtkNotebook when a detachable tab is dropped
694 in the root window, it's used to create a window containing a notebook
695 where the tab will be attached. This function will also be responsible
696 of moving/resizing the window and adding the necessary properties to
697 the notebook (i.e.: group-id).
698
699 If the function returns %NULL, the drag will be cancelled.
700 </para>
701
702 @source: The source #GtkNotebook of the drag operation
703 @page: the child #GtkWidget affected
704 @x: the X coordinate where the drop happens
705 @y: the Y coordinate where the drop happens
706 @data: user data
707 @Returns: The created #GtkNotebook where the tab will be attached, or NULL to cancel the drag
708
709
710 <!-- ##### FUNCTION gtk_notebook_set_window_creation_hook ##### -->
711 <para>
712
713 </para>
714
715 @func: 
716 @data: 
717 @destroy: 
718
719