1 2@c %start of fragment 3 4@deftp Class <gtk-notebook> 5Derives from @code{<gtk-container>}. 6 7This class defines the following slots: 8 9@table @code 10@item tab-pos 11Which side of the notebook holds the tabs 12 13@item show-tabs 14Whether tabs should be shown or not 15 16@item show-border 17Whether the border should be shown or not 18 19@item scrollable 20If TRUE, scroll arrows are added if there are too many tabs to fit 21 22@item tab-border 23Width of the border around the tab labels 24 25@item tab-hborder 26Width of the horizontal border of tab labels 27 28@item tab-vborder 29Width of the vertical border of tab labels 30 31@item page 32The index of the current page 33 34@item enable-popup 35If TRUE, pressing the right mouse button on the notebook pops up a menu that you 36can use to go to a page 37 38@item group-id 39Group ID for tabs drag and drop 40 41@item group 42Group for tabs drag and drop 43 44@item homogeneous 45Whether tabs should have homogeneous sizes 46 47@end table 48 49@end deftp 50 51@defop Signal <gtk-notebook> switch-page (arg0@tie{}@code{<gpointer>}) (arg1@tie{}@code{<guint>}) 52Emitted when the user or a function changes the current page. 53 54@end defop 55 56@defop Signal <gtk-notebook> focus-tab (arg0@tie{}@code{<gtk-notebook-tab>}) @result{}@tie{}@code{<gboolean>} 57@end defop 58 59@defop Signal <gtk-notebook> select-page (arg0@tie{}@code{<gboolean>}) @result{}@tie{}@code{<gboolean>} 60@end defop 61 62@defop Signal <gtk-notebook> change-current-page (arg0@tie{}@code{<gint>}) @result{}@tie{}@code{<gboolean>} 63@end defop 64 65@defop Signal <gtk-notebook> move-focus-out (arg0@tie{}@code{<gtk-direction-type>}) 66@end defop 67 68@defop Signal <gtk-notebook> reorder-tab (arg0@tie{}@code{<gtk-direction-type>}) (arg1@tie{}@code{<gboolean>}) @result{}@tie{}@code{<gboolean>} 69@end defop 70 71@defop Signal <gtk-notebook> page-reordered (arg0@tie{}@code{<gtk-widget>}) (arg1@tie{}@code{<guint>}) 72the ::page-reordered signal is emitted in the notebook right after a page has 73been reordered. 74 75Since 2.10 76 77@end defop 78 79@defop Signal <gtk-notebook> page-removed (arg0@tie{}@code{<gtk-widget>}) (arg1@tie{}@code{<guint>}) 80the ::page-removed signal is emitted in the notebook right after a page is 81removed from the notebook. 82 83Since 2.10 84 85@end defop 86 87@defop Signal <gtk-notebook> page-added (arg0@tie{}@code{<gtk-widget>}) (arg1@tie{}@code{<guint>}) 88the ::page-added signal is emitted in the notebook right after a page is added 89to the notebook. 90 91Since 2.10 92 93@end defop 94 95@defop Signal <gtk-notebook> create-window (arg0@tie{}@code{<gtk-widget>}) (arg1@tie{}@code{<gint>}) (arg2@tie{}@code{<gint>}) @result{}@tie{}@code{<gtk-notebook>} 96undocumented 97@end defop 98 99@deffn Function gtk-notebook-new @result{}@tie{} (ret@tie{}@code{<gtk-widget>}) 100Creates a new @code{<gtk-notebook>} widget with no pages. 101 102@table @var 103@item ret 104the newly created @code{<gtk-notebook>} 105 106@end table 107 108@end deffn 109 110@deffn Function gtk-notebook-append-page (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (tab_label@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{int}) 111@deffnx Method append-page 112Appends a page to @var{notebook}. 113 114@table @var 115@item notebook 116a @code{<gtk-notebook>} 117 118@item child 119the @code{<gtk-widget>} to use as the contents of the page. 120 121@item tab-label 122the @code{<gtk-widget>} to be used as the label for the page, or 123@samp{@code{#f}} to use the default label, 'page N'. 124 125@item ret 126the index (starting from 0) of the appended page in the notebook, or -1 if 127function fails 128 129@end table 130 131@end deffn 132 133@deffn Function gtk-notebook-append-page-menu (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (tab_label@tie{}@code{<gtk-widget>}) (menu_label@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{int}) 134@deffnx Method append-page-menu 135Appends a page to @var{notebook}, specifying the widget to use as the label in 136the popup menu. 137 138@table @var 139@item notebook 140a @code{<gtk-notebook>} 141 142@item child 143the @code{<gtk-widget>} to use as the contents of the page. 144 145@item tab-label 146the @code{<gtk-widget>} to be used as the label for the page, or 147@samp{@code{#f}} to use the default label, 'page N'. 148 149@item menu-label 150the widget to use as a label for the page-switch menu, if that is enabled. If 151@samp{@code{#f}}, and @var{tab-label} is a @code{<gtk-label>} or 152@samp{@code{#f}}, then the menu label will be a newly created label with the 153same text as @var{tab-label}; If @var{tab-label} is not a @code{<gtk-label>}, 154@var{menu-label} must be specified if the page-switch menu is to be used. 155 156@item ret 157the index (starting from 0) of the appended page in the notebook, or -1 if 158function fails 159 160@end table 161 162@end deffn 163 164@deffn Function gtk-notebook-prepend-page (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (tab_label@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{int}) 165@deffnx Method prepend-page 166Prepends a page to @var{notebook}. 167 168@table @var 169@item notebook 170a @code{<gtk-notebook>} 171 172@item child 173the @code{<gtk-widget>} to use as the contents of the page. 174 175@item tab-label 176the @code{<gtk-widget>} to be used as the label for the page, or 177@samp{@code{#f}} to use the default label, 'page N'. 178 179@item ret 180the index (starting from 0) of the prepended page in the notebook, or -1 if 181function fails 182 183@end table 184 185@end deffn 186 187@deffn Function gtk-notebook-prepend-page-menu (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (tab_label@tie{}@code{<gtk-widget>}) (menu_label@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{int}) 188@deffnx Method prepend-page-menu 189Prepends a page to @var{notebook}, specifying the widget to use as the label in 190the popup menu. 191 192@table @var 193@item notebook 194a @code{<gtk-notebook>} 195 196@item child 197the @code{<gtk-widget>} to use as the contents of the page. 198 199@item tab-label 200the @code{<gtk-widget>} to be used as the label for the page, or 201@samp{@code{#f}} to use the default label, 'page N'. 202 203@item menu-label 204the widget to use as a label for the page-switch menu, if that is enabled. If 205@samp{@code{#f}}, and @var{tab-label} is a @code{<gtk-label>} or 206@samp{@code{#f}}, then the menu label will be a newly created label with the 207same text as @var{tab-label}; If @var{tab-label} is not a @code{<gtk-label>}, 208@var{menu-label} must be specified if the page-switch menu is to be used. 209 210@item ret 211the index (starting from 0) of the prepended page in the notebook, or -1 if 212function fails 213 214@end table 215 216@end deffn 217 218@deffn Function gtk-notebook-insert-page (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (tab_label@tie{}@code{<gtk-widget>}) (position@tie{}@code{int}) @result{}@tie{} (ret@tie{}@code{int}) 219@deffnx Method insert-page 220Insert a page into @var{notebook} at the given position. 221 222@table @var 223@item notebook 224a @code{<gtk-notebook>} 225 226@item child 227the @code{<gtk-widget>} to use as the contents of the page. 228 229@item tab-label 230the @code{<gtk-widget>} to be used as the label for the page, or 231@samp{@code{#f}} to use the default label, 'page N'. 232 233@item position 234the index (starting at 0) at which to insert the page, or -1 to append the page 235after all other pages. 236 237@item ret 238the index (starting from 0) of the inserted page in the notebook, or -1 if 239function fails 240 241@end table 242 243@end deffn 244 245@deffn Function gtk-notebook-insert-page-menu (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (tab_label@tie{}@code{<gtk-widget>}) (menu_label@tie{}@code{<gtk-widget>}) (position@tie{}@code{int}) @result{}@tie{} (ret@tie{}@code{int}) 246@deffnx Method insert-page-menu 247Insert a page into @var{notebook} at the given position, specifying the widget 248to use as the label in the popup menu. 249 250@table @var 251@item notebook 252a @code{<gtk-notebook>} 253 254@item child 255the @code{<gtk-widget>} to use as the contents of the page. 256 257@item tab-label 258the @code{<gtk-widget>} to be used as the label for the page, or 259@samp{@code{#f}} to use the default label, 'page N'. 260 261@item menu-label 262the widget to use as a label for the page-switch menu, if that is enabled. If 263@samp{@code{#f}}, and @var{tab-label} is a @code{<gtk-label>} or 264@samp{@code{#f}}, then the menu label will be a newly created label with the 265same text as @var{tab-label}; If @var{tab-label} is not a @code{<gtk-label>}, 266@var{menu-label} must be specified if the page-switch menu is to be used. 267 268@item position 269the index (starting at 0) at which to insert the page, or -1 to append the page 270after all other pages. 271 272@item ret 273the index (starting from 0) of the inserted page in the notebook 274 275@end table 276 277@end deffn 278 279@deffn Function gtk-notebook-remove-page (self@tie{}@code{<gtk-notebook>}) (page_num@tie{}@code{int}) 280@deffnx Method remove-page 281Removes a page from the notebook given its index in the notebook. 282 283@table @var 284@item notebook 285a @code{<gtk-notebook>}. 286 287@item page-num 288the index of a notebook page, starting from 0. If -1, the last page will be 289removed. 290 291@end table 292 293@end deffn 294 295@deffn Function gtk-notebook-page-num (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{int}) 296@deffnx Method page-num 297Finds the index of the page which contains the given child widget. 298 299@table @var 300@item notebook 301a @code{<gtk-notebook>} 302 303@item child 304a @code{<gtk-widget>} 305 306@item ret 307the index of the page containing @var{child}, or -1 if @var{child} is not in the 308notebook. 309 310@end table 311 312@end deffn 313 314@deffn Function gtk-notebook-next-page (self@tie{}@code{<gtk-notebook>}) 315@deffnx Method next-page 316Switches to the next page. Nothing happens if the current page is the last page. 317 318@table @var 319@item notebook 320a @code{<gtk-notebook>} 321 322@end table 323 324@end deffn 325 326@deffn Function gtk-notebook-prev-page (self@tie{}@code{<gtk-notebook>}) 327@deffnx Method prev-page 328Switches to the previous page. Nothing happens if the current page is the first 329page. 330 331@table @var 332@item notebook 333a @code{<gtk-notebook>} 334 335@end table 336 337@end deffn 338 339@deffn Function gtk-notebook-reorder-child (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (position@tie{}@code{int}) 340@deffnx Method reorder-child 341Reorders the page containing @var{child}, so that it appears in position 342@var{position}. If @var{position} is greater than or equal to the number of 343children in the list or negative, @var{child} will be moved to the end of the 344list. 345 346@table @var 347@item notebook 348a @code{<gtk-notebook>} 349 350@item child 351the child to move 352 353@item position 354the new position, or -1 to move to the end 355 356@end table 357 358@end deffn 359 360@deffn Function gtk-notebook-set-tab-pos (self@tie{}@code{<gtk-notebook>}) (pos@tie{}@code{<gtk-position-type>}) 361@deffnx Method set-tab-pos 362Sets the edge at which the tabs for switching pages in the notebook are drawn. 363 364@table @var 365@item notebook 366a @code{<gtk-notebook>}. 367 368@item pos 369the edge to draw the tabs at. 370 371@end table 372 373@end deffn 374 375@deffn Function gtk-notebook-set-show-tabs (self@tie{}@code{<gtk-notebook>}) (show_tabs@tie{}@code{bool}) 376@deffnx Method set-show-tabs 377Sets whether to show the tabs for the notebook or not. 378 379@table @var 380@item notebook 381a @code{<gtk-notebook>} 382 383@item show-tabs 384@samp{@code{#t}} if the tabs should be shown. 385 386@end table 387 388@end deffn 389 390@deffn Function gtk-notebook-set-show-border (self@tie{}@code{<gtk-notebook>}) (show_border@tie{}@code{bool}) 391@deffnx Method set-show-border 392Sets whether a bevel will be drawn around the notebook pages. This only has a 393visual effect when the tabs are not shown. See 394@code{gtk-notebook-set-show-tabs}. 395 396@table @var 397@item notebook 398a @code{<gtk-notebook>} 399 400@item show-border 401@samp{@code{#t}} if a bevel should be drawn around the notebook. 402 403@end table 404 405@end deffn 406 407@deffn Function gtk-notebook-set-scrollable (self@tie{}@code{<gtk-notebook>}) (scrollable@tie{}@code{bool}) 408@deffnx Method set-scrollable 409Sets whether the tab label area will have arrows for scrolling if there are too 410many tabs to fit in the area. 411 412@table @var 413@item notebook 414a @code{<gtk-notebook>} 415 416@item scrollable 417@samp{@code{#t}} if scroll arrows should be added 418 419@end table 420 421@end deffn 422 423@deffn Function gtk-notebook-popup-enable (self@tie{}@code{<gtk-notebook>}) 424@deffnx Method popup-enable 425Enables the popup menu: if the user clicks with the right mouse button on the 426bookmarks, a menu with all the pages will be popped up. 427 428@table @var 429@item notebook 430a @code{<gtk-notebook>} 431 432@end table 433 434@end deffn 435 436@deffn Function gtk-notebook-popup-disable (self@tie{}@code{<gtk-notebook>}) 437@deffnx Method popup-disable 438Disables the popup menu. 439 440@table @var 441@item notebook 442a @code{<gtk-notebook>} 443 444@end table 445 446@end deffn 447 448@deffn Function gtk-notebook-get-current-page (self@tie{}@code{<gtk-notebook>}) @result{}@tie{} (ret@tie{}@code{int}) 449@deffnx Method get-current-page 450Returns the page number of the current page. 451 452@table @var 453@item notebook 454a @code{<gtk-notebook>} 455 456@item ret 457the index (starting from 0) of the current page in the notebook. If the notebook 458has no pages, then -1 will be returned. 459 460@end table 461 462@end deffn 463 464@deffn Function gtk-notebook-get-menu-label (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{<gtk-widget>}) 465@deffnx Method get-menu-label 466Retrieves the menu label widget of the page containing @var{child}. 467 468@table @var 469@item notebook 470a @code{<gtk-notebook>} 471 472@item child 473a widget contained in a page of @var{notebook} 474 475@item ret 476the menu label, or @samp{@code{#f}} if the notebook page does not have a menu 477label other than the default (the tab label). 478 479@end table 480 481@end deffn 482 483@deffn Function gtk-notebook-get-nth-page (self@tie{}@code{<gtk-notebook>}) (page_num@tie{}@code{int}) @result{}@tie{} (ret@tie{}@code{<gtk-widget>}) 484@deffnx Method get-nth-page 485Returns the child widget contained in page number @var{page-num}. 486 487@table @var 488@item notebook 489a @code{<gtk-notebook>} 490 491@item page-num 492the index of a page in the noteobok, or -1 to get the last page. 493 494@item ret 495the child widget, or @samp{@code{#f}} if @var{page-num} is out of bounds. 496 497@end table 498 499@end deffn 500 501@deffn Function gtk-notebook-get-n-pages (self@tie{}@code{<gtk-notebook>}) @result{}@tie{} (ret@tie{}@code{int}) 502@deffnx Method get-n-pages 503Gets the number of pages in a notebook. 504 505@table @var 506@item notebook 507a @code{<gtk-notebook>} 508 509@item ret 510the number of pages in the notebook. 511 512@end table 513 514Since 2.2 515 516@end deffn 517 518@deffn Function gtk-notebook-get-tab-label (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{<gtk-widget>}) 519@deffnx Method get-tab-label 520Returns the tab label widget for the page @var{child}. @samp{@code{#f}} is 521returned if @var{child} is not in @var{notebook} or if no tab label has 522specifically been set for @var{child}. 523 524@table @var 525@item notebook 526a @code{<gtk-notebook>} 527 528@item child 529the page 530 531@item ret 532the tab label 533 534@end table 535 536@end deffn 537 538@deffn Function gtk-notebook-set-menu-label (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (menu_label@tie{}@code{<gtk-widget>}) 539@deffnx Method set-menu-label 540Changes the menu label for the page containing @var{child}. 541 542@table @var 543@item notebook 544a @code{<gtk-notebook>} 545 546@item child 547the child widget 548 549@item menu-label 550the menu label, or NULL for default 551 552@end table 553 554@end deffn 555 556@deffn Function gtk-notebook-set-menu-label-text (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (menu_text@tie{}@code{mchars}) 557@deffnx Method set-menu-label-text 558Creates a new label and sets it as the menu label of @var{child}. 559 560@table @var 561@item notebook 562a @code{<gtk-notebook>} 563 564@item child 565the child widget 566 567@item menu-text 568the label text 569 570@end table 571 572@end deffn 573 574@deffn Function gtk-notebook-set-tab-label (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (tab_label@tie{}@code{<gtk-widget>}) 575@deffnx Method set-tab-label 576Changes the tab label for @var{child}. If @samp{@code{#f}} is specified for 577@var{tab-label}, then the page will have the label 'page N'. 578 579@table @var 580@item notebook 581a @code{<gtk-notebook>} 582 583@item child 584the page 585 586@item tab-label 587the tab label widget to use, or @samp{@code{#f}} for default tab label. 588 589@end table 590 591@end deffn 592 593@deffn Function gtk-notebook-set-tab-label-packing (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (expand@tie{}@code{bool}) (fill@tie{}@code{bool}) (pack_type@tie{}@code{<gtk-pack-type>}) 594@deffnx Method set-tab-label-packing 595Sets the packing parameters for the tab label of the page containing 596@var{child}. See @code{gtk-box-pack-start} for the exact meaning of the 597parameters. 598 599@table @var 600@item notebook 601a @code{<gtk-notebook>} 602 603@item child 604the child widget 605 606@item expand 607whether to expand the bookmark or not 608 609@item fill 610whether the bookmark should fill the allocated area or not 611 612@item pack-type 613the position of the bookmark 614 615@end table 616 617@end deffn 618 619@deffn Function gtk-notebook-set-tab-label-text (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (tab_text@tie{}@code{mchars}) 620@deffnx Method set-tab-label-text 621Creates a new label and sets it as the tab label for the page containing 622@var{child}. 623 624@table @var 625@item notebook 626a @code{<gtk-notebook>} 627 628@item child 629the page 630 631@item tab-text 632the label text 633 634@end table 635 636@end deffn 637 638@deffn Function gtk-notebook-set-tab-reorderable (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (reorderable@tie{}@code{bool}) 639@deffnx Method set-tab-reorderable 640Sets whether the notebook tab can be reordered via drag and drop or not. 641 642@table @var 643@item notebook 644a @code{<gtk-notebook>} 645 646@item child 647a child @code{<gtk-widget>} 648 649@item reorderable 650whether the tab is reorderable or not. 651 652@end table 653 654Since 2.10 655 656@end deffn 657 658@deffn Function gtk-notebook-set-tab-detachable (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) (detachable@tie{}@code{bool}) 659@deffnx Method set-tab-detachable 660Sets whether the tab can be detached from @var{notebook} to another notebook or 661widget. 662 663Note that 2 notebooks must share a common group identificator (see 664@code{gtk-notebook-set-group-id}) to allow automatic tabs interchange between 665them. 666 667If you want a widget to interact with a notebook through DnD (i.e.: accept 668dragged tabs from it) it must be set as a drop destination and accept the target 669"GTK_NOTEBOOK_TAB". The notebook will fill the selection with a GtkWidget** 670pointing to the child widget that corresponds to the dropped tab. 671 672@example 673 674 static void 675 on_drop_zone_drag_data_received (GtkWidget *widget, 676 GdkDragContext *context, 677 gint x, 678 gint y, 679 GtkSelectionData *selection_data, 680 guint info, 681 guint time, 682 gpointer user_data) 683 @{ 684 GtkWidget *notebook; 685 GtkWidget **child; 686 687 notebook = gtk_drag_get_source_widget (context); 688 child = (void*) selection_data->data; 689 690 process_widget (*child); 691 gtk_container_remove (GTK_CONTAINER (notebook), *child); 692 @} 693@end example 694 695If you want a notebook to accept drags from other widgets, you will have to set 696your own DnD code to do it. 697 698@table @var 699@item notebook 700a @code{<gtk-notebook>} 701 702@item child 703a child @code{<gtk-widget>} 704 705@item detachable 706whether the tab is detachable or not 707 708@end table 709 710Since 2.10 711 712@end deffn 713 714@deffn Function gtk-notebook-get-menu-label-text (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{mchars}) 715@deffnx Method get-menu-label-text 716Retrieves the text of the menu label for the page containing @var{child}. 717 718@table @var 719@item notebook 720a @code{<gtk-notebook>} 721 722@item child 723the child widget of a page of the notebook. 724 725@item ret 726value: the text of the tab label, or @samp{@code{#f}} if the widget does not 727have a menu label other than the default menu label, or the menu label widget is 728not a @code{<gtk-label>}. The string is owned by the widget and must not be 729freed. 730 731@end table 732 733@end deffn 734 735@deffn Function gtk-notebook-get-scrollable (self@tie{}@code{<gtk-notebook>}) @result{}@tie{} (ret@tie{}@code{bool}) 736@deffnx Method get-scrollable 737Returns whether the tab label area has arrows for scrolling. See 738@code{gtk-notebook-set-scrollable}. 739 740@table @var 741@item notebook 742a @code{<gtk-notebook>} 743 744@item ret 745@samp{@code{#t}} if arrows for scrolling are present 746 747@end table 748 749@end deffn 750 751@deffn Function gtk-notebook-get-show-border (self@tie{}@code{<gtk-notebook>}) @result{}@tie{} (ret@tie{}@code{bool}) 752@deffnx Method get-show-border 753Returns whether a bevel will be drawn around the notebook pages. See 754@code{gtk-notebook-set-show-border}. 755 756@table @var 757@item notebook 758a @code{<gtk-notebook>} 759 760@item ret 761@samp{@code{#t}} if the bevel is drawn 762 763@end table 764 765@end deffn 766 767@deffn Function gtk-notebook-get-show-tabs (self@tie{}@code{<gtk-notebook>}) @result{}@tie{} (ret@tie{}@code{bool}) 768@deffnx Method get-show-tabs 769Returns whether the tabs of the notebook are shown. See 770@code{gtk-notebook-set-show-tabs}. 771 772@table @var 773@item notebook 774a @code{<gtk-notebook>} 775 776@item ret 777@samp{@code{#t}} if the tabs are shown 778 779@end table 780 781@end deffn 782 783@deffn Function gtk-notebook-get-tab-label-text (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{mchars}) 784@deffnx Method get-tab-label-text 785Retrieves the text of the tab label for the page containing @var{child}. 786 787@table @var 788@item notebook 789a @code{<gtk-notebook>} 790 791@item child 792a widget contained in a page of @var{notebook} 793 794@item ret 795value: the text of the tab label, or @samp{@code{#f}} if the tab label widget is 796not a @code{<gtk-label>}. The string is owned by the widget and must not be 797freed. 798 799@end table 800 801@end deffn 802 803@deffn Function gtk-notebook-get-tab-pos (self@tie{}@code{<gtk-notebook>}) @result{}@tie{} (ret@tie{}@code{<gtk-position-type>}) 804@deffnx Method get-tab-pos 805Gets the edge at which the tabs for switching pages in the notebook are drawn. 806 807@table @var 808@item notebook 809a @code{<gtk-notebook>} 810 811@item ret 812the edge at which the tabs are drawn 813 814@end table 815 816@end deffn 817 818@deffn Function gtk-notebook-get-tab-reorderable (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{bool}) 819@deffnx Method get-tab-reorderable 820Gets whether the tab can be reordered via drag and drop or not. 821 822@table @var 823@item notebook 824a @code{<gtk-notebook>} 825 826@item child 827a child @code{<gtk-widget>} 828 829@item ret 830@samp{@code{#t}} if the tab is reorderable. 831 832@end table 833 834Since 2.10 835 836@end deffn 837 838@deffn Function gtk-notebook-get-tab-detachable (self@tie{}@code{<gtk-notebook>}) (child@tie{}@code{<gtk-widget>}) @result{}@tie{} (ret@tie{}@code{bool}) 839@deffnx Method get-tab-detachable 840Returns whether the tab contents can be detached from @var{notebook}. 841 842@table @var 843@item notebook 844a @code{<gtk-notebook>} 845 846@item child 847a child @code{<gtk-widget>} 848 849@item ret 850TRUE if the tab is detachable. 851 852@end table 853 854Since 2.10 855 856@end deffn 857 858@deffn Function gtk-notebook-set-current-page (self@tie{}@code{<gtk-notebook>}) (page_num@tie{}@code{int}) 859@deffnx Method set-current-page 860Switches to the page number @var{page-num}. 861 862Note that due to historical reasons, GtkNotebook refuses to switch to a page 863unless the child widget is visible. Therefore, it is recommended to show child 864widgets before adding them to a notebook. 865 866@table @var 867@item notebook 868a @code{<gtk-notebook>} 869 870@item page-num 871index of the page to switch to, starting from 0. If negative, the last page will 872be used. If greater than the number of pages in the notebook, nothing will be 873done. 874 875@end table 876 877@end deffn 878 879@deffn Function gtk-notebook-set-group-id (self@tie{}@code{<gtk-notebook>}) (group_id@tie{}@code{int}) 880@deffnx Method set-group-id 881Sets an group identificator for @var{notebook}, notebooks sharing the same group 882identificator will be able to exchange tabs via drag and drop. A notebook with 883group identificator -1 will not be able to exchange tabs with any other 884notebook. 885 886@table @var 887@item notebook 888a @code{<gtk-notebook>} 889 890@item group-id 891a group identificator, or -1 to unset it 892 893@end table 894 895Since 2.10 896 897@end deffn 898 899@deffn Function gtk-notebook-get-group-id (self@tie{}@code{<gtk-notebook>}) @result{}@tie{} (ret@tie{}@code{int}) 900@deffnx Method get-group-id 901Gets the current group identificator for @var{notebook}. 902 903@table @var 904@item notebook 905a @code{<gtk-notebook>} 906 907@item ret 908the group identificator, or -1 if none is set. 909 910@end table 911 912Since 2.10 913 914@end deffn 915 916 917@c %end of fragment 918