Description
A
Gtk_Notebook is a container that displays all of its children at the
same location on the screen. They are organized into pages, that can be
selected through tabs (either by clicking on them or by a contextual
menu).
This is the best way to organize complicated interfaces that have a lot
of widgets, by putting the children into groups of coherent widgets.
You can hide some of the pages of the notebook by simply calling Hide on
the widget that is contained in the page (or returned from Get_Nth_Page).
Types
-
type Gtk_Notebook is access all Gtk_Notebook_Record'Class;
-
type Gtk_Notebook_Page is Gtk.Gtk_Notebook_Page;
-
-
type Gtk_Notebook_Tab is
(Notebook_Tab_First,
Notebook_Tab_Last);
-
type Gtk_Notebook_Window_Creation_Func is access
function (Source : System.Address; -- Gtk_Notebook
Page : System.Address; -- Gtk_Widget
X : System.Address; -- Gint
Y : System.Address; -- Gint
Data : System.Address) return Gtk_Notebook;
Subprograms
Creating a notebook and inserting pages
-
procedure Gtk_New (Widget : out Gtk_Notebook);
-
procedure Initialize (Widget : access Gtk_Notebook_Record'Class);
-
-
-
-
-
-
-
-
-
procedure Remove_Page
(Notebook : access Gtk_Notebook_Record; Page_Num : Gint);
Tabs drag and drop
-
-
procedure Set_Group_Id
(Notebook : access Gtk_Notebook_Record; Group_Id : Gint);
-
function Get_Group_Id (Notebook : access Gtk_Notebook_Record) return Gint;
Modifying and getting the current page
-
function Get_Current_Page
(Notebook : access Gtk_Notebook_Record) return Gint;
-
function Get_Nth_Page
(Widget :
access Gtk_Notebook_Record'Class;
Page_Num : Gint)
return Gtk.Widget.Gtk_Widget;
-
function Get_N_Pages
(Notebook : access Gtk_Notebook_Record) return Gint;
-
-
procedure Set_Current_Page
(Notebook : access Gtk_Notebook_Record;
Page_Num : in Gint := -1);
-
procedure Set_Page
(Notebook : access Gtk_Notebook_Record;
Page_Num : in Gint := -1)
renames Set_Current_Page;
-
procedure Next_Page (Notebook : access Gtk_Notebook_Record);
-
procedure Prev_Page (Notebook : access Gtk_Notebook_Record);
Style and visual aspect
-
procedure Set_Show_Border
(Notebook : access Gtk_Notebook_Record;
Show_Border : Boolean := True);
-
function Get_Show_Border
(Notebook : access Gtk_Notebook_Record) return Boolean;
-
procedure Set_Show_Tabs
(Notebook : access Gtk_Notebook_Record;
Show_Tabs : Boolean := True);
-
function Get_Show_Tabs
(Notebook : access Gtk_Notebook_Record) return Boolean;
-
-
-
procedure Set_Scrollable
(Notebook : access Gtk_Notebook_Record;
Scrollable : in Boolean := True);
-
function Get_Scrollable
(Notebook : access Gtk_Notebook_Record) return Boolean;
Popup Menu
-
procedure Popup_Enable (Notebook : access Gtk_Notebook_Record);
-
procedure Popup_Disable (Notebook : access Gtk_Notebook_Record);
Page properties
-
-
-
procedure Set_Tab_Label_Text
(Notebook :
access Gtk_Notebook_Record;
Child :
access Gtk.Widget.Gtk_Widget_Record'Class;
Tab_Text : UTF8_String);
-
-
-
-
-
procedure Set_Menu_Label_Text
(Notebook :
access Gtk_Notebook_Record;
Child :
access Gtk.Widget.Gtk_Widget_Record'Class;
Menu_Text : UTF8_String);
-
-
-
-
-
function Get_Tab_Reorderable
(Notebook :
access Gtk_Notebook_Record;
Child :
access Gtk.Widget.Gtk_Widget_Record'Class;
Position : Gint)
return Boolean;
-
procedure Set_Tab_Reorderable
(Notebook :
access Gtk_Notebook_Record;
Child :
access Gtk.Widget.Gtk_Widget_Record'Class;
Reorderable : Boolean := True);
-
function Get_Tab_Detachable
(Notebook :
access Gtk_Notebook_Record;
Child :
access Gtk.Widget.Gtk_Widget_Record'Class;
Position : Gint)
return Boolean;
-
procedure Set_Tab_Detachable
(Notebook :
access Gtk_Notebook_Record;
Child :
access Gtk.Widget.Gtk_Widget_Record'Class;
Detachable : Boolean := True);
GValue support
-
function Get_Notebook_Page
(Value : Glib.Values.GValue) return Gtk_Notebook_Page;