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