2
2
-- GtkAda - Ada95 binding for Gtk+/Gnome --
4
4
-- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet --
5
-- Copyright (C) 2000-2007 AdaCore --
6
7
-- This library is free software; you can redistribute it and/or --
7
8
-- modify it under the terms of the GNU General Public --
32
32
-- You can hide some of the pages of the notebook by simply calling Hide on
33
33
-- the widget that is contained in the page (or returned from Get_Nth_Page).
35
-- <c_version>2.10.9</c_version>
35
36
-- <group>Layout containers</group>
36
37
-- <testgtk>create_notebook.adb</testgtk>
37
38
-- <screenshot>gtk-notebook</screenshot>
159
159
-- Remove a page from the notebook.
160
160
-- The first position in the list of pages is 0.
162
------------------------
163
-- Tabs drag and drop --
164
------------------------
166
type Gtk_Notebook_Window_Creation_Func is access
167
function (Source : System.Address; -- Gtk_Notebook
168
Page : System.Address; -- Gtk_Widget
169
X : System.Address; -- Gint
170
Y : System.Address; -- Gint
171
Data : System.Address) return Gtk_Notebook;
172
pragma Convention (C, Gtk_Notebook_Window_Creation_Func);
174
procedure Set_Window_Creation_Hook
175
(Func : Gtk_Notebook_Window_Creation_Func;
176
Data : System.Address;
177
Destroy : Glib.G_Destroy_Notify_Address);
178
-- Install a global function used to create a window when a detached tab
179
-- is dropped in an empty area.
181
procedure Set_Group_Id
182
(Notebook : access Gtk_Notebook_Record; Group_Id : Gint);
183
-- Set a group identificator for Notebook. Notebooks sharing
184
-- the same group identificator will be able to exchange tabs
185
-- via drag and drop. A notebook with group identificator -1 will
186
-- not be able to exchange tabs with any other notebook.
188
function Get_Group_Id (Notebook : access Gtk_Notebook_Record) return Gint;
189
-- Gets the current group identificator for Notebook or -1 if not set.
162
191
--------------------------------------------
163
192
-- Modifying and getting the current page --
164
193
--------------------------------------------
371
400
Position : Gint);
372
401
-- Change the position of the page that contains Child.
403
function Get_Tab_Reorderable
404
(Notebook : access Gtk_Notebook_Record;
405
Child : access Gtk.Widget.Gtk_Widget_Record'Class;
408
-- Get whether the tab can be reordered via drag and drop or not.
410
procedure Set_Tab_Reorderable
411
(Notebook : access Gtk_Notebook_Record;
412
Child : access Gtk.Widget.Gtk_Widget_Record'Class;
413
Reorderable : Boolean := True);
414
-- Set whether the notebook tab can be reordered.
416
function Get_Tab_Detachable
417
(Notebook : access Gtk_Notebook_Record;
418
Child : access Gtk.Widget.Gtk_Widget_Record'Class;
421
-- Return whether the tab contents can be detached from Notebook.
423
procedure Set_Tab_Detachable
424
(Notebook : access Gtk_Notebook_Record;
425
Child : access Gtk.Widget.Gtk_Widget_Record'Class;
426
Detachable : Boolean := True);
427
-- Set whether the tab can be detached from Notebook to another
428
-- notebook or widget.
430
-- Note that 2 notebooks must share a common group identificator
431
-- (see Set_Group_Id) to allow automatic tabs interchange between them.
433
-- If you want a widget to interact with a notebook through DnD
434
-- (i.e.: accept dragged tabs from it) it must be set as a drop
435
-- destination and accept the target "GTK_NOTEBOOK_TAB". The notebook
436
-- will fill the selection with a Gtk_Widget pointing to the child
437
-- widget that corresponds to the dropped tab.
439
-- If you want a notebook to accept drags from other widgets,
440
-- you will have to set your own DnD code to do it.
374
442
--------------------
375
443
-- GValue support --
376
444
--------------------
473
541
-- Name: Homogeneous_Property
475
543
-- See: Set_Homogeneous_Tabs / -
546
-- Name: Group_Id_Property
548
-- See: Set_Group_Id / Get_Group_Id
478
551
Page_Property : constant Glib.Properties.Property_Int;
485
558
Scrollable_Property : constant Glib.Properties.Property_Boolean;
486
559
Enable_Popup_Property : constant Glib.Properties.Property_Boolean;
487
560
Homogeneous_Property : constant Glib.Properties.Property_Boolean;
561
Group_Id_Property : constant Glib.Properties.Property_Int;
489
563
----------------------
490
564
-- Child Properties --
518
592
-- Descr: A Gtk_Pack_Type indicating whether the child is packed with
519
593
-- reference to the start or end of the parent
595
-- Name: Detachable_Property
597
-- See: Set_Tab_Detachable / Get_Tab_Detachable
599
-- Name: Reorderable_Property
601
-- See: Set_Tab_Reorderable / Get_Tab_Reorderable
520
602
-- </child_properties>
522
604
Menu_Label_Property : constant Glib.Properties.Property_String;
525
607
Tab_Fill_Property : constant Glib.Properties.Property_Boolean;
526
608
Tab_Label_Property : constant Glib.Properties.Property_String;
527
609
Tab_Pack_Property : constant Gtk.Enums.Property_Pack_Type;
610
Detachable_Property : constant Glib.Properties.Property_Boolean;
611
Reorderable_Property : constant Glib.Properties.Property_Boolean;
529
613
----------------------
530
614
-- Style Properties --
551
635
-- Descr: Display a second forward arrow button on the opposite end of the
638
-- Name: Tab_Curvature_Property
640
-- Descr: Size of tab curvature
642
-- Name: Tab_Overlap_Property
644
-- Descr: Size of tab overlap area
553
645
-- </style_properties>
555
647
Has_Backward_Stepper_Property : constant Glib.Properties.Property_Boolean;
558
650
Glib.Properties.Property_Boolean;
559
651
Has_Secondary_Forward_Stepper_Property : constant
560
652
Glib.Properties.Property_Boolean;
653
Tab_Curvature_Property : constant Glib.Properties.Property_Int;
654
Tab_Overlap_Property : constant Glib.Properties.Property_Int;
613
Signal_Switch_Page : constant String := "switch_page";
614
Signal_Select_Page : constant String := "select_page";
615
Signal_Focus_Tab : constant String := "focus_tab";
616
Signal_Move_Focus_Out : constant String := "move_focus_out";
617
Signal_Change_Current_Page : constant String := "change_current_page";
707
Signal_Switch_Page : constant Glib.Signal_Name := "switch_page";
708
Signal_Select_Page : constant Glib.Signal_Name := "select_page";
709
Signal_Focus_Tab : constant Glib.Signal_Name := "focus_tab";
710
Signal_Move_Focus_Out : constant Glib.Signal_Name := "move_focus_out";
711
Signal_Change_Current_Page : constant Glib.Signal_Name :=
712
"change_current_page";
620
715
type Gtk_Notebook_Record is new Gtk.Container.Gtk_Container_Record
640
735
Enable_Popup_Property : constant Glib.Properties.Property_Boolean :=
641
736
Glib.Properties.Build ("enable-popup");
642
737
Homogeneous_Property : constant Glib.Properties.Property_Boolean :=
643
Glib.Properties.Build ("homgeneous");
738
Glib.Properties.Build ("homogeneous");
739
Group_Id_Property : constant Glib.Properties.Property_Int :=
740
Glib.Properties.Build ("group-id");
645
742
Menu_Label_Property : constant Glib.Properties.Property_String :=
646
743
Glib.Properties.Build ("menu-label");
654
751
Glib.Properties.Build ("tab-label");
655
752
Tab_Pack_Property : constant Gtk.Enums.Property_Pack_Type :=
656
753
Gtk.Enums.Build ("tab-pack");
754
Detachable_Property : constant Glib.Properties.Property_Boolean :=
755
Glib.Properties.Build ("detachable");
756
Reorderable_Property : constant Glib.Properties.Property_Boolean :=
757
Glib.Properties.Build ("reorderable");
659
759
Has_Backward_Stepper_Property : constant Glib.Properties.Property_Boolean :=
660
760
Glib.Properties.Build ("has-backward-stepper");
666
766
Has_Secondary_Forward_Stepper_Property : constant
667
767
Glib.Properties.Property_Boolean :=
668
768
Glib.Properties.Build ("has-secondary-forward-stepper");
769
Tab_Curvature_Property : constant Glib.Properties.Property_Int :=
770
Glib.Properties.Build ("tab-curvature");
771
Tab_Overlap_Property : constant Glib.Properties.Property_Int :=
772
Glib.Properties.Build ("tab-overlap");
669
774
end Gtk.Notebook;