1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 /* 25 * Conversion parameters: 26 * inFile = GtkNotebook.html 27 * outPack = gtk 28 * outFile = Notebook 29 * strct = GtkNotebook 30 * realStrct= 31 * ctorStrct= 32 * clss = Notebook 33 * interf = 34 * class Code: Yes 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_notebook_ 41 * - gtk_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - glib.Str 48 * - gtk.Label 49 * - gtk.Widget 50 * structWrap: 51 * - GtkWidget* -> Widget 52 * module aliases: 53 * local aliases: 54 * overrides: 55 */ 56 57 module gtk.Notebook; 58 59 public import gtkc.gtktypes; 60 61 private import gtkc.gtk; 62 private import glib.ConstructionException; 63 private import gobject.ObjectG; 64 65 private import gobject.Signals; 66 public import gtkc.gdktypes; 67 68 private import glib.Str; 69 private import gtk.Label; 70 private import gtk.Widget; 71 72 73 74 private import gtk.Container; 75 76 /** 77 * Description 78 * The GtkNotebook widget is a GtkContainer whose children are pages that 79 * can be switched between using tab labels along one edge. 80 * There are many configuration options for GtkNotebook. Among other 81 * things, you can choose on which edge the tabs appear 82 * (see gtk_notebook_set_tab_pos()), whether, if there are too many 83 * tabs to fit the notebook should be made bigger or scrolling 84 * arrows added (see gtk_notebook_set_scrollable), and whether there 85 * will be a popup menu allowing the users to switch pages. 86 * (see gtk_notebook_popup_enable(), gtk_notebook_popup_disable()) 87 * GtkNotebook as GtkBuildable 88 * The GtkNoteboopk implementation of the GtkBuildable interface 89 * supports placing children into tabs by specifying "tab" as the 90 * "type" attribute of a <child> element. Note that the content 91 * of the tab must be created before the tab can be filled. 92 * A tab child can be specified without specifying a <child> 93 * type attribute. 94 * To add a child widget in the notebooks action area, specify 95 * "action-start" or "action-end" as the "type" attribute of the <child> 96 * element. 97 * $(DDOC_COMMENT example) 98 */ 99 public class Notebook : Container 100 { 101 102 /** the main Gtk struct */ 103 protected GtkNotebook* gtkNotebook; 104 105 106 public GtkNotebook* getNotebookStruct() 107 { 108 return gtkNotebook; 109 } 110 111 112 /** the main Gtk struct as a void* */ 113 protected override void* getStruct() 114 { 115 return cast(void*)gtkNotebook; 116 } 117 118 /** 119 * Sets our main struct and passes it to the parent class 120 */ 121 public this (GtkNotebook* gtkNotebook) 122 { 123 super(cast(GtkContainer*)gtkNotebook); 124 this.gtkNotebook = gtkNotebook; 125 } 126 127 protected override void setStruct(GObject* obj) 128 { 129 super.setStruct(obj); 130 gtkNotebook = cast(GtkNotebook*)obj; 131 } 132 133 /** The GtkNotebookTab is not documented */ 134 public enum GtkNotebookTab 135 { 136 GTK_NOTEBOOK_TAB_FIRST, 137 GTK_NOTEBOOK_TAB_LAST 138 } 139 alias GtkNotebookTab NotebookTab; 140 141 /** 142 * Append a page with a widget and a text for a label 143 */ 144 public int appendPage(Widget child, string tabLabel) 145 { 146 return appendPage(child, new Label(tabLabel)); 147 } 148 149 /** */ 150 void setCurrentPage(Widget child) 151 { 152 gtk_notebook_set_current_page(gtkNotebook,gtk_notebook_page_num(gtkNotebook, child.getWidgetStruct())); 153 } 154 155 /** 156 */ 157 int[string] connectedSignals; 158 159 bool delegate(gint, Notebook)[] onChangeCurrentPageListeners; 160 /** 161 */ 162 void addOnChangeCurrentPage(bool delegate(gint, Notebook) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 163 { 164 if ( !("change-current-page" in connectedSignals) ) 165 { 166 Signals.connectData( 167 getStruct(), 168 "change-current-page", 169 cast(GCallback)&callBackChangeCurrentPage, 170 cast(void*)this, 171 null, 172 connectFlags); 173 connectedSignals["change-current-page"] = 1; 174 } 175 onChangeCurrentPageListeners ~= dlg; 176 } 177 extern(C) static gboolean callBackChangeCurrentPage(GtkNotebook* notebookStruct, gint arg1, Notebook _notebook) 178 { 179 foreach ( bool delegate(gint, Notebook) dlg ; _notebook.onChangeCurrentPageListeners ) 180 { 181 if ( dlg(arg1, _notebook) ) 182 { 183 return 1; 184 } 185 } 186 187 return 0; 188 } 189 190 GtkNotebook* delegate(Widget, gint, gint, Notebook)[] onCreateWindowListeners; 191 /** 192 * The ::create-window signal is emitted when a detachable 193 * tab is dropped on the root window. 194 * A handler for this signal can create a window containing 195 * a notebook where the tab will be attached. It is also 196 * responsible for moving/resizing the window and adding the 197 * necessary properties to the notebook (e.g. the 198 * "group" ). 199 * The default handler uses the global window creation hook, 200 * if one has been set with gtk_notebook_set_window_creation_hook(). 201 * Since 2.12 202 */ 203 void addOnCreateWindow(GtkNotebook* delegate(Widget, gint, gint, Notebook) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 204 { 205 if ( !("create-window" in connectedSignals) ) 206 { 207 Signals.connectData( 208 getStruct(), 209 "create-window", 210 cast(GCallback)&callBackCreateWindow, 211 cast(void*)this, 212 null, 213 connectFlags); 214 connectedSignals["create-window"] = 1; 215 } 216 onCreateWindowListeners ~= dlg; 217 } 218 extern(C) static void callBackCreateWindow(GtkNotebook* notebookStruct, GtkWidget* page, gint x, gint y, Notebook _notebook) 219 { 220 foreach ( GtkNotebook* delegate(Widget, gint, gint, Notebook) dlg ; _notebook.onCreateWindowListeners ) 221 { 222 dlg(ObjectG.getDObject!(Widget)(page), x, y, _notebook); 223 } 224 } 225 226 bool delegate(GtkNotebookTab, Notebook)[] onFocusTabListeners; 227 /** 228 */ 229 void addOnFocusTab(bool delegate(GtkNotebookTab, Notebook) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 230 { 231 if ( !("focus-tab" in connectedSignals) ) 232 { 233 Signals.connectData( 234 getStruct(), 235 "focus-tab", 236 cast(GCallback)&callBackFocusTab, 237 cast(void*)this, 238 null, 239 connectFlags); 240 connectedSignals["focus-tab"] = 1; 241 } 242 onFocusTabListeners ~= dlg; 243 } 244 extern(C) static gboolean callBackFocusTab(GtkNotebook* notebookStruct, GtkNotebookTab arg1, Notebook _notebook) 245 { 246 foreach ( bool delegate(GtkNotebookTab, Notebook) dlg ; _notebook.onFocusTabListeners ) 247 { 248 if ( dlg(arg1, _notebook) ) 249 { 250 return 1; 251 } 252 } 253 254 return 0; 255 } 256 257 void delegate(GtkDirectionType, Notebook)[] onMoveFocusOutListeners; 258 /** 259 */ 260 void addOnMoveFocusOut(void delegate(GtkDirectionType, Notebook) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 261 { 262 if ( !("move-focus-out" in connectedSignals) ) 263 { 264 Signals.connectData( 265 getStruct(), 266 "move-focus-out", 267 cast(GCallback)&callBackMoveFocusOut, 268 cast(void*)this, 269 null, 270 connectFlags); 271 connectedSignals["move-focus-out"] = 1; 272 } 273 onMoveFocusOutListeners ~= dlg; 274 } 275 extern(C) static void callBackMoveFocusOut(GtkNotebook* notebookStruct, GtkDirectionType arg1, Notebook _notebook) 276 { 277 foreach ( void delegate(GtkDirectionType, Notebook) dlg ; _notebook.onMoveFocusOutListeners ) 278 { 279 dlg(arg1, _notebook); 280 } 281 } 282 283 void delegate(Widget, guint, Notebook)[] onPageAddedListeners; 284 /** 285 * the ::page-added signal is emitted in the notebook 286 * right after a page is added to the notebook. 287 * Since 2.10 288 */ 289 void addOnPageAdded(void delegate(Widget, guint, Notebook) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 290 { 291 if ( !("page-added" in connectedSignals) ) 292 { 293 Signals.connectData( 294 getStruct(), 295 "page-added", 296 cast(GCallback)&callBackPageAdded, 297 cast(void*)this, 298 null, 299 connectFlags); 300 connectedSignals["page-added"] = 1; 301 } 302 onPageAddedListeners ~= dlg; 303 } 304 extern(C) static void callBackPageAdded(GtkNotebook* notebookStruct, GtkWidget* child, guint pageNum, Notebook _notebook) 305 { 306 foreach ( void delegate(Widget, guint, Notebook) dlg ; _notebook.onPageAddedListeners ) 307 { 308 dlg(ObjectG.getDObject!(Widget)(child), pageNum, _notebook); 309 } 310 } 311 312 void delegate(Widget, guint, Notebook)[] onPageRemovedListeners; 313 /** 314 * the ::page-removed signal is emitted in the notebook 315 * right after a page is removed from the notebook. 316 * Since 2.10 317 */ 318 void addOnPageRemoved(void delegate(Widget, guint, Notebook) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 319 { 320 if ( !("page-removed" in connectedSignals) ) 321 { 322 Signals.connectData( 323 getStruct(), 324 "page-removed", 325 cast(GCallback)&callBackPageRemoved, 326 cast(void*)this, 327 null, 328 connectFlags); 329 connectedSignals["page-removed"] = 1; 330 } 331 onPageRemovedListeners ~= dlg; 332 } 333 extern(C) static void callBackPageRemoved(GtkNotebook* notebookStruct, GtkWidget* child, guint pageNum, Notebook _notebook) 334 { 335 foreach ( void delegate(Widget, guint, Notebook) dlg ; _notebook.onPageRemovedListeners ) 336 { 337 dlg(ObjectG.getDObject!(Widget)(child), pageNum, _notebook); 338 } 339 } 340 341 void delegate(Widget, guint, Notebook)[] onPageReorderedListeners; 342 /** 343 * the ::page-reordered signal is emitted in the notebook 344 * right after a page has been reordered. 345 * Since 2.10 346 */ 347 void addOnPageReordered(void delegate(Widget, guint, Notebook) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 348 { 349 if ( !("page-reordered" in connectedSignals) ) 350 { 351 Signals.connectData( 352 getStruct(), 353 "page-reordered", 354 cast(GCallback)&callBackPageReordered, 355 cast(void*)this, 356 null, 357 connectFlags); 358 connectedSignals["page-reordered"] = 1; 359 } 360 onPageReorderedListeners ~= dlg; 361 } 362 extern(C) static void callBackPageReordered(GtkNotebook* notebookStruct, GtkWidget* child, guint pageNum, Notebook _notebook) 363 { 364 foreach ( void delegate(Widget, guint, Notebook) dlg ; _notebook.onPageReorderedListeners ) 365 { 366 dlg(ObjectG.getDObject!(Widget)(child), pageNum, _notebook); 367 } 368 } 369 370 bool delegate(GtkDirectionType, gboolean, Notebook)[] onReorderTabListeners; 371 /** 372 */ 373 void addOnReorderTab(bool delegate(GtkDirectionType, gboolean, Notebook) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 374 { 375 if ( !("reorder-tab" in connectedSignals) ) 376 { 377 Signals.connectData( 378 getStruct(), 379 "reorder-tab", 380 cast(GCallback)&callBackReorderTab, 381 cast(void*)this, 382 null, 383 connectFlags); 384 connectedSignals["reorder-tab"] = 1; 385 } 386 onReorderTabListeners ~= dlg; 387 } 388 extern(C) static gboolean callBackReorderTab(GtkNotebook* notebookStruct, GtkDirectionType arg1, gboolean arg2, Notebook _notebook) 389 { 390 foreach ( bool delegate(GtkDirectionType, gboolean, Notebook) dlg ; _notebook.onReorderTabListeners ) 391 { 392 if ( dlg(arg1, arg2, _notebook) ) 393 { 394 return 1; 395 } 396 } 397 398 return 0; 399 } 400 401 bool delegate(gboolean, Notebook)[] onSelectPageListeners; 402 /** 403 */ 404 void addOnSelectPage(bool delegate(gboolean, Notebook) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 405 { 406 if ( !("select-page" in connectedSignals) ) 407 { 408 Signals.connectData( 409 getStruct(), 410 "select-page", 411 cast(GCallback)&callBackSelectPage, 412 cast(void*)this, 413 null, 414 connectFlags); 415 connectedSignals["select-page"] = 1; 416 } 417 onSelectPageListeners ~= dlg; 418 } 419 extern(C) static gboolean callBackSelectPage(GtkNotebook* notebookStruct, gboolean arg1, Notebook _notebook) 420 { 421 foreach ( bool delegate(gboolean, Notebook) dlg ; _notebook.onSelectPageListeners ) 422 { 423 if ( dlg(arg1, _notebook) ) 424 { 425 return 1; 426 } 427 } 428 429 return 0; 430 } 431 432 void delegate(void*, guint, Notebook)[] onSwitchPageListeners; 433 /** 434 * Emitted when the user or a function changes the current page. 435 * See Also 436 * GtkContainer 437 * For functions that apply to every GtkContainer 438 */ 439 void addOnSwitchPage(void delegate(void*, guint, Notebook) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 440 { 441 if ( !("switch-page" in connectedSignals) ) 442 { 443 Signals.connectData( 444 getStruct(), 445 "switch-page", 446 cast(GCallback)&callBackSwitchPage, 447 cast(void*)this, 448 null, 449 connectFlags); 450 connectedSignals["switch-page"] = 1; 451 } 452 onSwitchPageListeners ~= dlg; 453 } 454 extern(C) static void callBackSwitchPage(GtkNotebook* notebookStruct, void* arg1, guint arg2, Notebook _notebook) 455 { 456 foreach ( void delegate(void*, guint, Notebook) dlg ; _notebook.onSwitchPageListeners ) 457 { 458 dlg(arg1, arg2, _notebook); 459 } 460 } 461 462 463 /** 464 * Creates a new GtkNotebook widget with no pages. 465 * Throws: ConstructionException GTK+ fails to create the object. 466 */ 467 public this () 468 { 469 // GtkWidget * gtk_notebook_new (void); 470 auto p = gtk_notebook_new(); 471 if(p is null) 472 { 473 throw new ConstructionException("null returned by gtk_notebook_new()"); 474 } 475 this(cast(GtkNotebook*) p); 476 } 477 478 /** 479 * Appends a page to notebook. 480 * Params: 481 * child = the GtkWidget to use as the contents of the page. 482 * tabLabel = the GtkWidget to be used as the label for the page, 483 * or NULL to use the default label, 'page N'. [allow-none] 484 * Returns: the index (starting from 0) of the appended page in the notebook, or -1 if function fails 485 */ 486 public int appendPage(Widget child, Widget tabLabel) 487 { 488 // gint gtk_notebook_append_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label); 489 return gtk_notebook_append_page(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), (tabLabel is null) ? null : tabLabel.getWidgetStruct()); 490 } 491 492 /** 493 * Appends a page to notebook, specifying the widget to use as the 494 * label in the popup menu. 495 * Params: 496 * child = the GtkWidget to use as the contents of the page. 497 * tabLabel = the GtkWidget to be used as the label for the page, 498 * or NULL to use the default label, 'page N'. [allow-none] 499 * menuLabel = the widget to use as a label for the page-switch 500 * menu, if that is enabled. If NULL, and tab_label 501 * is a GtkLabel or NULL, then the menu label will be 502 * a newly created label with the same text as tab_label; 503 * If tab_label is not a GtkLabel, menu_label must be 504 * specified if the page-switch menu is to be used. [allow-none] 505 * Returns: the index (starting from 0) of the appended page in the notebook, or -1 if function fails 506 */ 507 public int appendPageMenu(Widget child, Widget tabLabel, Widget menuLabel) 508 { 509 // gint gtk_notebook_append_page_menu (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label); 510 return gtk_notebook_append_page_menu(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), (tabLabel is null) ? null : tabLabel.getWidgetStruct(), (menuLabel is null) ? null : menuLabel.getWidgetStruct()); 511 } 512 513 /** 514 * Prepends a page to notebook. 515 * Params: 516 * child = the GtkWidget to use as the contents of the page. 517 * tabLabel = the GtkWidget to be used as the label for the page, 518 * or NULL to use the default label, 'page N'. [allow-none] 519 * Returns: the index (starting from 0) of the prepended page in the notebook, or -1 if function fails 520 */ 521 public int prependPage(Widget child, Widget tabLabel) 522 { 523 // gint gtk_notebook_prepend_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label); 524 return gtk_notebook_prepend_page(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), (tabLabel is null) ? null : tabLabel.getWidgetStruct()); 525 } 526 527 /** 528 * Prepends a page to notebook, specifying the widget to use as the 529 * label in the popup menu. 530 * Params: 531 * child = the GtkWidget to use as the contents of the page. 532 * tabLabel = the GtkWidget to be used as the label for the page, 533 * or NULL to use the default label, 'page N'. [allow-none] 534 * menuLabel = the widget to use as a label for the page-switch 535 * menu, if that is enabled. If NULL, and tab_label 536 * is a GtkLabel or NULL, then the menu label will be 537 * a newly created label with the same text as tab_label; 538 * If tab_label is not a GtkLabel, menu_label must be 539 * specified if the page-switch menu is to be used. [allow-none] 540 * Returns: the index (starting from 0) of the prepended page in the notebook, or -1 if function fails 541 */ 542 public int prependPageMenu(Widget child, Widget tabLabel, Widget menuLabel) 543 { 544 // gint gtk_notebook_prepend_page_menu (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label); 545 return gtk_notebook_prepend_page_menu(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), (tabLabel is null) ? null : tabLabel.getWidgetStruct(), (menuLabel is null) ? null : menuLabel.getWidgetStruct()); 546 } 547 548 /** 549 * Insert a page into notebook at the given position. 550 * Params: 551 * child = the GtkWidget to use as the contents of the page. 552 * tabLabel = the GtkWidget to be used as the label for the page, 553 * or NULL to use the default label, 'page N'. [allow-none] 554 * position = the index (starting at 0) at which to insert the page, 555 * or -1 to append the page after all other pages. 556 * Returns: the index (starting from 0) of the inserted page in the notebook, or -1 if function fails 557 */ 558 public int insertPage(Widget child, Widget tabLabel, int position) 559 { 560 // gint gtk_notebook_insert_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, gint position); 561 return gtk_notebook_insert_page(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), (tabLabel is null) ? null : tabLabel.getWidgetStruct(), position); 562 } 563 564 /** 565 * Insert a page into notebook at the given position, specifying 566 * the widget to use as the label in the popup menu. 567 * Params: 568 * child = the GtkWidget to use as the contents of the page. 569 * tabLabel = the GtkWidget to be used as the label for the page, 570 * or NULL to use the default label, 'page N'. [allow-none] 571 * menuLabel = the widget to use as a label for the page-switch 572 * menu, if that is enabled. If NULL, and tab_label 573 * is a GtkLabel or NULL, then the menu label will be 574 * a newly created label with the same text as tab_label; 575 * If tab_label is not a GtkLabel, menu_label must be 576 * specified if the page-switch menu is to be used. [allow-none] 577 * position = the index (starting at 0) at which to insert the page, 578 * or -1 to append the page after all other pages. 579 * Returns: the index (starting from 0) of the inserted page in the notebook 580 */ 581 public int insertPageMenu(Widget child, Widget tabLabel, Widget menuLabel, int position) 582 { 583 // gint gtk_notebook_insert_page_menu (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label, gint position); 584 return gtk_notebook_insert_page_menu(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), (tabLabel is null) ? null : tabLabel.getWidgetStruct(), (menuLabel is null) ? null : menuLabel.getWidgetStruct(), position); 585 } 586 587 /** 588 * Removes a page from the notebook given its index 589 * in the notebook. 590 * Params: 591 * pageNum = the index of a notebook page, starting 592 * from 0. If -1, the last page will 593 * be removed. 594 */ 595 public void removePage(int pageNum) 596 { 597 // void gtk_notebook_remove_page (GtkNotebook *notebook, gint page_num); 598 gtk_notebook_remove_page(gtkNotebook, pageNum); 599 } 600 601 /** 602 * Finds the index of the page which contains the given child 603 * widget. 604 * Params: 605 * child = a GtkWidget 606 * Returns: the index of the page containing child, or -1 if child is not in the notebook. 607 */ 608 public int pageNum(Widget child) 609 { 610 // gint gtk_notebook_page_num (GtkNotebook *notebook, GtkWidget *child); 611 return gtk_notebook_page_num(gtkNotebook, (child is null) ? null : child.getWidgetStruct()); 612 } 613 614 /** 615 * Switches to the next page. Nothing happens if the current page is 616 * the last page. 617 */ 618 public void nextPage() 619 { 620 // void gtk_notebook_next_page (GtkNotebook *notebook); 621 gtk_notebook_next_page(gtkNotebook); 622 } 623 624 /** 625 * Switches to the previous page. Nothing happens if the current page 626 * is the first page. 627 */ 628 public void prevPage() 629 { 630 // void gtk_notebook_prev_page (GtkNotebook *notebook); 631 gtk_notebook_prev_page(gtkNotebook); 632 } 633 634 /** 635 * Reorders the page containing child, so that it appears in position 636 * position. If position is greater than or equal to the number of 637 * children in the list or negative, child will be moved to the end 638 * of the list. 639 * Params: 640 * child = the child to move 641 * position = the new position, or -1 to move to the end 642 */ 643 public void reorderChild(Widget child, int position) 644 { 645 // void gtk_notebook_reorder_child (GtkNotebook *notebook, GtkWidget *child, gint position); 646 gtk_notebook_reorder_child(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), position); 647 } 648 649 /** 650 * Sets the edge at which the tabs for switching pages in the 651 * notebook are drawn. 652 * Params: 653 * pos = the edge to draw the tabs at. 654 */ 655 public void setTabPos(GtkPositionType pos) 656 { 657 // void gtk_notebook_set_tab_pos (GtkNotebook *notebook, GtkPositionType pos); 658 gtk_notebook_set_tab_pos(gtkNotebook, pos); 659 } 660 661 /** 662 * Sets whether to show the tabs for the notebook or not. 663 * Params: 664 * showTabs = TRUE if the tabs should be shown. 665 */ 666 public void setShowTabs(int showTabs) 667 { 668 // void gtk_notebook_set_show_tabs (GtkNotebook *notebook, gboolean show_tabs); 669 gtk_notebook_set_show_tabs(gtkNotebook, showTabs); 670 } 671 672 /** 673 * Sets whether a bevel will be drawn around the notebook pages. 674 * This only has a visual effect when the tabs are not shown. 675 * See gtk_notebook_set_show_tabs(). 676 * Params: 677 * showBorder = TRUE if a bevel should be drawn around the notebook. 678 */ 679 public void setShowBorder(int showBorder) 680 { 681 // void gtk_notebook_set_show_border (GtkNotebook *notebook, gboolean show_border); 682 gtk_notebook_set_show_border(gtkNotebook, showBorder); 683 } 684 685 /** 686 * Sets whether the tab label area will have arrows for scrolling if 687 * there are too many tabs to fit in the area. 688 * Params: 689 * scrollable = TRUE if scroll arrows should be added 690 */ 691 public void setScrollable(int scrollable) 692 { 693 // void gtk_notebook_set_scrollable (GtkNotebook *notebook, gboolean scrollable); 694 gtk_notebook_set_scrollable(gtkNotebook, scrollable); 695 } 696 697 /** 698 * Warning 699 * gtk_notebook_set_tab_border is deprecated and should not be used in newly-written code. 700 * Sets the width the border around the tab labels 701 * in a notebook. This is equivalent to calling 702 * gtk_notebook_set_tab_hborder (notebook, border_width) followed 703 * by gtk_notebook_set_tab_vborder (notebook, border_width). 704 * Params: 705 * borderWidth = width of the border around the tab labels. 706 */ 707 public void setTabBorder(uint borderWidth) 708 { 709 // void gtk_notebook_set_tab_border (GtkNotebook *notebook, guint border_width); 710 gtk_notebook_set_tab_border(gtkNotebook, borderWidth); 711 } 712 713 /** 714 * Enables the popup menu: if the user clicks with the right mouse button on 715 * the tab labels, a menu with all the pages will be popped up. 716 */ 717 public void popupEnable() 718 { 719 // void gtk_notebook_popup_enable (GtkNotebook *notebook); 720 gtk_notebook_popup_enable(gtkNotebook); 721 } 722 723 /** 724 * Disables the popup menu. 725 */ 726 public void popupDisable() 727 { 728 // void gtk_notebook_popup_disable (GtkNotebook *notebook); 729 gtk_notebook_popup_disable(gtkNotebook); 730 } 731 732 /** 733 * Returns the page number of the current page. 734 * Returns: the index (starting from 0) of the current page in the notebook. If the notebook has no pages, then -1 will be returned. 735 */ 736 public int getCurrentPage() 737 { 738 // gint gtk_notebook_get_current_page (GtkNotebook *notebook); 739 return gtk_notebook_get_current_page(gtkNotebook); 740 } 741 742 /** 743 * Retrieves the menu label widget of the page containing child. 744 * Params: 745 * child = a widget contained in a page of notebook 746 * Returns: the menu label, or NULL if the notebook page does not have a menu label other than the default (the tab label). [transfer none] 747 */ 748 public Widget getMenuLabel(Widget child) 749 { 750 // GtkWidget * gtk_notebook_get_menu_label (GtkNotebook *notebook, GtkWidget *child); 751 auto p = gtk_notebook_get_menu_label(gtkNotebook, (child is null) ? null : child.getWidgetStruct()); 752 753 if(p is null) 754 { 755 return null; 756 } 757 758 return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); 759 } 760 761 /** 762 * Returns the child widget contained in page number page_num. 763 * Params: 764 * pageNum = the index of a page in the notebook, or -1 765 * to get the last page. 766 * Returns: the child widget, or NULL if page_num is out of bounds. [transfer none] 767 */ 768 public Widget getNthPage(int pageNum) 769 { 770 // GtkWidget * gtk_notebook_get_nth_page (GtkNotebook *notebook, gint page_num); 771 auto p = gtk_notebook_get_nth_page(gtkNotebook, pageNum); 772 773 if(p is null) 774 { 775 return null; 776 } 777 778 return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); 779 } 780 781 /** 782 * Gets the number of pages in a notebook. 783 * Since 2.2 784 * Returns: the number of pages in the notebook. 785 */ 786 public int getNPages() 787 { 788 // gint gtk_notebook_get_n_pages (GtkNotebook *notebook); 789 return gtk_notebook_get_n_pages(gtkNotebook); 790 } 791 792 /** 793 * Returns the tab label widget for the page child. NULL is returned 794 * if child is not in notebook or if no tab label has specifically 795 * been set for child. 796 * Params: 797 * child = the page 798 * Returns: the tab label. [transfer none] 799 */ 800 public Widget getTabLabel(Widget child) 801 { 802 // GtkWidget * gtk_notebook_get_tab_label (GtkNotebook *notebook, GtkWidget *child); 803 auto p = gtk_notebook_get_tab_label(gtkNotebook, (child is null) ? null : child.getWidgetStruct()); 804 805 if(p is null) 806 { 807 return null; 808 } 809 810 return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); 811 } 812 813 /** 814 * Warning 815 * gtk_notebook_query_tab_label_packing has been deprecated since version 2.20 and should not be used in newly-written code. Modify the "tab-expand" and 816 * "tab-fill" child properties instead. 817 * Query the packing attributes for the tab label of the page 818 * containing child. 819 * Params: 820 * child = the page 821 * expand = location to store the expand value (or NULL) 822 * fill = location to store the fill value (or NULL) 823 * packType = location to store the pack_type (or NULL) 824 */ 825 public void queryTabLabelPacking(Widget child, out int expand, out int fill, out GtkPackType packType) 826 { 827 // void gtk_notebook_query_tab_label_packing (GtkNotebook *notebook, GtkWidget *child, gboolean *expand, gboolean *fill, GtkPackType *pack_type); 828 gtk_notebook_query_tab_label_packing(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), &expand, &fill, &packType); 829 } 830 831 /** 832 * Warning 833 * gtk_notebook_set_homogeneous_tabs is deprecated and should not be used in newly-written code. 834 * Sets whether the tabs must have all the same size or not. 835 * Params: 836 * homogeneous = TRUE if all tabs should be the same size. 837 */ 838 public void setHomogeneousTabs(int homogeneous) 839 { 840 // void gtk_notebook_set_homogeneous_tabs (GtkNotebook *notebook, gboolean homogeneous); 841 gtk_notebook_set_homogeneous_tabs(gtkNotebook, homogeneous); 842 } 843 844 /** 845 * Changes the menu label for the page containing child. 846 * Params: 847 * child = the child widget 848 * menuLabel = the menu label, or NULL for default. [allow-none] 849 */ 850 public void setMenuLabel(Widget child, Widget menuLabel) 851 { 852 // void gtk_notebook_set_menu_label (GtkNotebook *notebook, GtkWidget *child, GtkWidget *menu_label); 853 gtk_notebook_set_menu_label(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), (menuLabel is null) ? null : menuLabel.getWidgetStruct()); 854 } 855 856 /** 857 * Creates a new label and sets it as the menu label of child. 858 * Params: 859 * child = the child widget 860 * menuText = the label text 861 */ 862 public void setMenuLabelText(Widget child, string menuText) 863 { 864 // void gtk_notebook_set_menu_label_text (GtkNotebook *notebook, GtkWidget *child, const gchar *menu_text); 865 gtk_notebook_set_menu_label_text(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), Str.toStringz(menuText)); 866 } 867 868 /** 869 * Warning 870 * gtk_notebook_set_tab_hborder is deprecated and should not be used in newly-written code. 871 * Sets the width of the horizontal border of tab labels. 872 * Params: 873 * tabHborder = width of the horizontal border of tab labels. 874 */ 875 public void setTabHborder(uint tabHborder) 876 { 877 // void gtk_notebook_set_tab_hborder (GtkNotebook *notebook, guint tab_hborder); 878 gtk_notebook_set_tab_hborder(gtkNotebook, tabHborder); 879 } 880 881 /** 882 * Changes the tab label for child. If NULL is specified 883 * for tab_label, then the page will have the label 'page N'. 884 * Params: 885 * child = the page 886 * tabLabel = the tab label widget to use, or NULL for default tab 887 * label. [allow-none] 888 */ 889 public void setTabLabel(Widget child, Widget tabLabel) 890 { 891 // void gtk_notebook_set_tab_label (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label); 892 gtk_notebook_set_tab_label(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), (tabLabel is null) ? null : tabLabel.getWidgetStruct()); 893 } 894 895 /** 896 * Warning 897 * gtk_notebook_set_tab_label_packing has been deprecated since version 2.20 and should not be used in newly-written code. Modify the "tab-expand" and 898 * "tab-fill" child properties instead. 899 * Modifying the packing of the tab label is a deprecated feature and 900 * shouldn't be done anymore. 901 * Sets the packing parameters for the tab label of the page 902 * containing child. See gtk_box_pack_start() for the exact meaning 903 * of the parameters. 904 * Params: 905 * child = the child widget 906 * expand = whether to expand the tab label or not 907 * fill = whether the tab label should fill the allocated area or not 908 * packType = the position of the tab label 909 */ 910 public void setTabLabelPacking(Widget child, int expand, int fill, GtkPackType packType) 911 { 912 // void gtk_notebook_set_tab_label_packing (GtkNotebook *notebook, GtkWidget *child, gboolean expand, gboolean fill, GtkPackType pack_type); 913 gtk_notebook_set_tab_label_packing(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), expand, fill, packType); 914 } 915 916 /** 917 * Creates a new label and sets it as the tab label for the page 918 * containing child. 919 * Params: 920 * child = the page 921 * tabText = the label text 922 */ 923 public void setTabLabelText(Widget child, string tabText) 924 { 925 // void gtk_notebook_set_tab_label_text (GtkNotebook *notebook, GtkWidget *child, const gchar *tab_text); 926 gtk_notebook_set_tab_label_text(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), Str.toStringz(tabText)); 927 } 928 929 /** 930 * Warning 931 * gtk_notebook_set_tab_vborder is deprecated and should not be used in newly-written code. 932 * Sets the width of the vertical border of tab labels. 933 * Params: 934 * tabVborder = width of the vertical border of tab labels. 935 */ 936 public void setTabVborder(uint tabVborder) 937 { 938 // void gtk_notebook_set_tab_vborder (GtkNotebook *notebook, guint tab_vborder); 939 gtk_notebook_set_tab_vborder(gtkNotebook, tabVborder); 940 } 941 942 /** 943 * Sets whether the notebook tab can be reordered 944 * via drag and drop or not. 945 * Since 2.10 946 * Params: 947 * child = a child GtkWidget 948 * reorderable = whether the tab is reorderable or not. 949 */ 950 public void setTabReorderable(Widget child, int reorderable) 951 { 952 // void gtk_notebook_set_tab_reorderable (GtkNotebook *notebook, GtkWidget *child, gboolean reorderable); 953 gtk_notebook_set_tab_reorderable(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), reorderable); 954 } 955 956 /** 957 * Sets whether the tab can be detached from notebook to another 958 * notebook or widget. 959 * Note that 2 notebooks must share a common group identificator 960 * (see gtk_notebook_set_group_id()) to allow automatic tabs 961 * interchange between them. 962 * If you want a widget to interact with a notebook through DnD 963 * (i.e.: accept dragged tabs from it) it must be set as a drop 964 * destination and accept the target "GTK_NOTEBOOK_TAB". The notebook 965 * will fill the selection with a GtkWidget** pointing to the child 966 * widget that corresponds to the dropped tab. 967 * $(DDOC_COMMENT example) 968 * If you want a notebook to accept drags from other widgets, 969 * you will have to set your own DnD code to do it. 970 * Since 2.10 971 * Params: 972 * child = a child GtkWidget 973 * detachable = whether the tab is detachable or not 974 */ 975 public void setTabDetachable(Widget child, int detachable) 976 { 977 // void gtk_notebook_set_tab_detachable (GtkNotebook *notebook, GtkWidget *child, gboolean detachable); 978 gtk_notebook_set_tab_detachable(gtkNotebook, (child is null) ? null : child.getWidgetStruct(), detachable); 979 } 980 981 /** 982 * Retrieves the text of the menu label for the page containing 983 * child. 984 * Params: 985 * child = the child widget of a page of the notebook. 986 * Returns: the text of the tab label, or NULL if the widget does not have a menu label other than the default menu label, or the menu label widget is not a GtkLabel. The string is owned by the widget and must not be freed. 987 */ 988 public string getMenuLabelText(Widget child) 989 { 990 // const gchar * gtk_notebook_get_menu_label_text (GtkNotebook *notebook, GtkWidget *child); 991 return Str.toString(gtk_notebook_get_menu_label_text(gtkNotebook, (child is null) ? null : child.getWidgetStruct())); 992 } 993 994 /** 995 * Returns whether the tab label area has arrows for scrolling. See 996 * gtk_notebook_set_scrollable(). 997 * Returns: TRUE if arrows for scrolling are present 998 */ 999 public int getScrollable() 1000 { 1001 // gboolean gtk_notebook_get_scrollable (GtkNotebook *notebook); 1002 return gtk_notebook_get_scrollable(gtkNotebook); 1003 } 1004 1005 /** 1006 * Returns whether a bevel will be drawn around the notebook pages. See 1007 * gtk_notebook_set_show_border(). 1008 * Returns: TRUE if the bevel is drawn 1009 */ 1010 public int getShowBorder() 1011 { 1012 // gboolean gtk_notebook_get_show_border (GtkNotebook *notebook); 1013 return gtk_notebook_get_show_border(gtkNotebook); 1014 } 1015 1016 /** 1017 * Returns whether the tabs of the notebook are shown. See 1018 * gtk_notebook_set_show_tabs(). 1019 * Returns: TRUE if the tabs are shown 1020 */ 1021 public int getShowTabs() 1022 { 1023 // gboolean gtk_notebook_get_show_tabs (GtkNotebook *notebook); 1024 return gtk_notebook_get_show_tabs(gtkNotebook); 1025 } 1026 1027 /** 1028 * Retrieves the text of the tab label for the page containing 1029 * child. 1030 * Params: 1031 * child = a widget contained in a page of notebook 1032 * Returns: the text of the tab label, or NULL if the tab label widget is not a GtkLabel. The string is owned by the widget and must not be freed. 1033 */ 1034 public string getTabLabelText(Widget child) 1035 { 1036 // const gchar * gtk_notebook_get_tab_label_text (GtkNotebook *notebook, GtkWidget *child); 1037 return Str.toString(gtk_notebook_get_tab_label_text(gtkNotebook, (child is null) ? null : child.getWidgetStruct())); 1038 } 1039 1040 /** 1041 * Gets the edge at which the tabs for switching pages in the 1042 * notebook are drawn. 1043 * Returns: the edge at which the tabs are drawn 1044 */ 1045 public GtkPositionType getTabPos() 1046 { 1047 // GtkPositionType gtk_notebook_get_tab_pos (GtkNotebook *notebook); 1048 return gtk_notebook_get_tab_pos(gtkNotebook); 1049 } 1050 1051 /** 1052 * Gets whether the tab can be reordered via drag and drop or not. 1053 * Since 2.10 1054 * Params: 1055 * child = a child GtkWidget 1056 * Returns: TRUE if the tab is reorderable. 1057 */ 1058 public int getTabReorderable(Widget child) 1059 { 1060 // gboolean gtk_notebook_get_tab_reorderable (GtkNotebook *notebook, GtkWidget *child); 1061 return gtk_notebook_get_tab_reorderable(gtkNotebook, (child is null) ? null : child.getWidgetStruct()); 1062 } 1063 1064 /** 1065 * Returns whether the tab contents can be detached from notebook. 1066 * Since 2.10 1067 * Params: 1068 * child = a child GtkWidget 1069 * Returns: TRUE if the tab is detachable. 1070 */ 1071 public int getTabDetachable(Widget child) 1072 { 1073 // gboolean gtk_notebook_get_tab_detachable (GtkNotebook *notebook, GtkWidget *child); 1074 return gtk_notebook_get_tab_detachable(gtkNotebook, (child is null) ? null : child.getWidgetStruct()); 1075 } 1076 1077 /** 1078 * Returns the horizontal width of a tab border. 1079 * Since 2.22 1080 * Returns: horizontal width of a tab border 1081 */ 1082 public ushort getTabHborder() 1083 { 1084 // guint16 gtk_notebook_get_tab_hborder (GtkNotebook *notebook); 1085 return gtk_notebook_get_tab_hborder(gtkNotebook); 1086 } 1087 1088 /** 1089 * Returns the vertical width of a tab border. 1090 * Since 2.22 1091 * Returns: vertical width of a tab border 1092 */ 1093 public ushort getTabVborder() 1094 { 1095 // guint16 gtk_notebook_get_tab_vborder (GtkNotebook *notebook); 1096 return gtk_notebook_get_tab_vborder(gtkNotebook); 1097 } 1098 1099 /** 1100 * Switches to the page number page_num. 1101 * Note that due to historical reasons, GtkNotebook refuses 1102 * to switch to a page unless the child widget is visible. 1103 * Therefore, it is recommended to show child widgets before 1104 * adding them to a notebook. 1105 * Params: 1106 * pageNum = index of the page to switch to, starting from 0. 1107 * If negative, the last page will be used. If greater 1108 * than the number of pages in the notebook, nothing 1109 * will be done. 1110 */ 1111 public void setCurrentPage(int pageNum) 1112 { 1113 // void gtk_notebook_set_current_page (GtkNotebook *notebook, gint page_num); 1114 gtk_notebook_set_current_page(gtkNotebook, pageNum); 1115 } 1116 1117 /** 1118 * Warning 1119 * gtk_notebook_set_group_id has been deprecated since version 2.12 and should not be used in newly-written code. use gtk_notebook_set_group_name() instead. 1120 * Sets an group identificator for notebook, notebooks sharing 1121 * the same group identificator will be able to exchange tabs 1122 * via drag and drop. A notebook with group identificator -1 will 1123 * not be able to exchange tabs with any other notebook. 1124 * Since 2.10 1125 * Params: 1126 * groupId = a group identificator, or -1 to unset it 1127 */ 1128 public void setGroupId(int groupId) 1129 { 1130 // void gtk_notebook_set_group_id (GtkNotebook *notebook, gint group_id); 1131 gtk_notebook_set_group_id(gtkNotebook, groupId); 1132 } 1133 1134 /** 1135 * Warning 1136 * gtk_notebook_get_group_id has been deprecated since version 2.12 and should not be used in newly-written code. use gtk_notebook_get_group_name() instead. 1137 * Gets the current group identificator for notebook. 1138 * Since 2.10 1139 * Returns: the group identificator, or -1 if none is set. 1140 */ 1141 public int getGroupId() 1142 { 1143 // gint gtk_notebook_get_group_id (GtkNotebook *notebook); 1144 return gtk_notebook_get_group_id(gtkNotebook); 1145 } 1146 1147 /** 1148 * Warning 1149 * gtk_notebook_set_group has been deprecated since version 2.24 and should not be used in newly-written code. Use gtk_notebook_set_group_name() instead 1150 * Sets a group identificator pointer for notebook, notebooks sharing 1151 * the same group identificator pointer will be able to exchange tabs 1152 * via drag and drop. A notebook with a NULL group identificator will 1153 * not be able to exchange tabs with any other notebook. 1154 * Since 2.12 1155 * Params: 1156 * group = a pointer to identify the notebook group, or NULL to unset it. [allow-none] 1157 */ 1158 public void setGroup(void* group) 1159 { 1160 // void gtk_notebook_set_group (GtkNotebook *notebook, gpointer group); 1161 gtk_notebook_set_group(gtkNotebook, group); 1162 } 1163 1164 /** 1165 * Warning 1166 * gtk_notebook_get_group has been deprecated since version 2.24 and should not be used in newly-written code. Use gtk_notebook_get_group_name() instead 1167 * Gets the current group identificator pointer for notebook. 1168 * Since 2.12 1169 * Returns: the group identificator, or NULL if none is set. [transfer none] 1170 */ 1171 public void* getGroup() 1172 { 1173 // gpointer gtk_notebook_get_group (GtkNotebook *notebook); 1174 return gtk_notebook_get_group(gtkNotebook); 1175 } 1176 1177 /** 1178 * Sets a group name for notebook. 1179 * Notebooks with the same name will be able to exchange tabs 1180 * via drag and drop. A notebook with a NULL group name will 1181 * not be able to exchange tabs with any other notebook. 1182 * Since 2.24 1183 */ 1184 public void setGroupName(string groupName) 1185 { 1186 // void gtk_notebook_set_group_name (GtkNotebook *notebook, const gchar *group_name); 1187 gtk_notebook_set_group_name(gtkNotebook, Str.toStringz(groupName)); 1188 } 1189 1190 /** 1191 * Gets the current group name for notebook. 1192 * Note that this funtion can emphasis not be used 1193 * together with gtk_notebook_set_group() or 1194 * gtk_notebook_set_group_id(). 1195 * Since 2.24 1196 * Returns: the group name, or NULL if none is set. [transfer none] 1197 */ 1198 public string getGroupName() 1199 { 1200 // const gchar * gtk_notebook_get_group_name (GtkNotebook *notebook); 1201 return Str.toString(gtk_notebook_get_group_name(gtkNotebook)); 1202 } 1203 1204 /** 1205 * Sets widget as one of the action widgets. Depending on the pack type 1206 * the widget will be placed before or after the tabs. You can use 1207 * a GtkBox if you need to pack more than one widget on the same side. 1208 * Note that action widgets are "internal" children of the notebook and thus 1209 * not included in the list returned from gtk_container_foreach(). 1210 * Since 2.20 1211 * Params: 1212 * widget = a GtkWidget 1213 * packType = pack type of the action widget 1214 */ 1215 public void setActionWidget(Widget widget, GtkPackType packType) 1216 { 1217 // void gtk_notebook_set_action_widget (GtkNotebook *notebook, GtkWidget *widget, GtkPackType pack_type); 1218 gtk_notebook_set_action_widget(gtkNotebook, (widget is null) ? null : widget.getWidgetStruct(), packType); 1219 } 1220 1221 /** 1222 * Gets one of the action widgets. See gtk_notebook_set_action_widget(). 1223 * Since 2.20 1224 * Params: 1225 * packType = pack type of the action widget to receive 1226 * Returns: The action widget with the given pack_type or NULL when this action widget has not been set. [transfer none] 1227 */ 1228 public Widget getActionWidget(GtkPackType packType) 1229 { 1230 // GtkWidget * gtk_notebook_get_action_widget (GtkNotebook *notebook, GtkPackType pack_type); 1231 auto p = gtk_notebook_get_action_widget(gtkNotebook, packType); 1232 1233 if(p is null) 1234 { 1235 return null; 1236 } 1237 1238 return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); 1239 } 1240 1241 /** 1242 * Warning 1243 * gtk_notebook_set_window_creation_hook has been deprecated since version 2.24 and should not be used in newly-written code. Use the "create-window" signal instead 1244 * Installs a global function used to create a window 1245 * when a detached tab is dropped in an empty area. 1246 * Since 2.10 1247 * Params: 1248 * func = the GtkNotebookWindowCreationFunc, or NULL. [allow-none] 1249 * data = user data for func 1250 * destroy = Destroy notifier for data, or NULL. [allow-none] 1251 */ 1252 public static void setWindowCreationHook(GtkNotebookWindowCreationFunc func, void* data, GDestroyNotify destroy) 1253 { 1254 // void gtk_notebook_set_window_creation_hook (GtkNotebookWindowCreationFunc func, gpointer data, GDestroyNotify destroy); 1255 gtk_notebook_set_window_creation_hook(func, data, destroy); 1256 } 1257 }