## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --               GtkAda - Ada95 binding for Gtk+/Gnome               --

3.     --                                                                   --

4.     --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   --

5.     --               Copyright (C) 2000-2013, AdaCore                    --

6.     --                                                                   --

7.     -- This library is free software; you can redistribute it and/or     --

8.     -- modify it under the terms of the GNU General Public               --

9.     -- License as published by the Free Software Foundation; either      --

10.     -- version 2 of the License, or (at your option) any later version.  --

11.     --                                                                   --

12.     -- This library is distributed in the hope that it will be useful,   --

13.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

14.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

15.     -- General Public License for more details.                          --

16.     --                                                                   --

17.     -- You should have received a copy of the GNU General Public         --

18.     -- License along with this library; if not, write to the             --

19.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

20.     -- Boston, MA 02111-1307, USA.                                       --

21.     --                                                                   --

22.     -- As a special exception, if other files instantiate generics from  --

23.     -- this unit, or you link this unit with other files to produce an   --

24.     -- executable, this  unit  does not  by itself cause  the resulting  --

25.     -- executable to be covered by the GNU General Public License. This  --

26.     -- exception does not however invalidate any other reasons why the   --

27.     -- executable file  might be covered by the  GNU Public License.     --

28.     -----------------------------------------------------------------------

30.     --  <description>

31.     --  A Gtk_Notebook is a container that displays all of its children at the

32.     --  same location on the screen. They are organized into pages, that can be

33.     --  selected through tabs (either by clicking on them or by a contextual

34.     --  menu).

35.     --  This is the best way to organize complicated interfaces that have a lot

36.     --  of widgets, by putting the children into groups of coherent widgets.

37.     --

38.     --  You can hide some of the pages of the notebook by simply calling Hide on

39.     --  the widget that is contained in the page (or returned from Get_Nth_Page).

40.     --  </description>

41.     --  <c_version>2.16.6</c_version>

42.     --  <group>Layout containers</group>

43.     --  <testgtk>create_notebook.adb</testgtk>

44.     --  <screenshot>gtk-notebook</screenshot>

46.     with Glib.GlistTo API docTo specTo body;

47.     pragma Elaborate_All (Glib.GlistTo API docTo specTo body);

48.     with Glib.PropertiesTo API docTo specTo body;

49.     with Glib.ValuesTo API docTo specTo body;

50.     with Gtk.ContainerTo API docTo specTo body;

51.     with Gtk.EnumsTo API docTo specTo body;

52.     with Gtk.WidgetTo API docTo specTo body;

53.     with Unchecked_Conversion;

55.     package Gtk.NotebookTo API docTo specTo body is

57.        type Gtk_Notebook_RecordTo API docTo body is new Gtk.Container.Gtk_Container_RecordTo API docTo specTo body

58.          with private;

59.        type Gtk_Notebook is access all Gtk_Notebook_RecordTo API docTo specTo body'Class;

61.        subtype Gtk_Notebook_Page is Gtk.Gtk_Notebook_PageTo API docTo spec;

63.        type Gtk_Notebook_Tab is

64.          (Notebook_Tab_First,

65.           Notebook_Tab_Last);

66.        pragma Convention (C, Gtk_Notebook_TabTo API docTo spec);

68.        subtype Gtk_Notebook_Group is Glib.C_ProxyTo API docTo spec;

70.        ---------------------------------------------

71.        -- Creating a notebook and inserting pages --

72.        ---------------------------------------------

74.        procedure Gtk_NewTo API docTo body (Widget : out Gtk_NotebookTo API docTo spec);

75.        --  Create a new empty notebook.

77.        procedure InitializeTo API docTo body (Widget : access Gtk_Notebook_RecordTo API docTo specTo body'Class);

78.        --  Internal initialization function.

79.        --  See the section "Creating your own widgets" in the documentation.

81.        function Get_TypeTo API docTo body return Gtk.Gtk_TypeTo API docTo spec;

82.        --  Return the internal value associated with a Gtk_Notebook.

84.        procedure Append_PageTo API docTo body

85.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

86.           Child     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

87.           Tab_Label : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

88.        --  Insert a new page in Notebook.

89.        --  The page is put at the end of the list of pages.

90.        --  The user will select it through a button that contains the

91.        --  Tab_Label widget, which is generally a Gtk_Label, but could be a box

92.        --  with a pixmap in it for instance.

93.        --  No entry is associated with the page in the contextual menu.

95.        procedure Append_PageTo API docTo body

96.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

97.           Child     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

98.        --  Same as above, but no label is specified.

100.        procedure Append_Page_MenuTo API docTo body

101.          (Notebook   : access Gtk_Notebook_RecordTo API docTo specTo body;

102.           Child      : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

103.           Tab_Label  : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

104.           Menu_Label : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

105.        --  Insert a new page in Notebook.

106.        --  The page is put at the end of the list of pages.

107.        --  The user will select it through a button that contains the

108.        --  Tab_Label widget, which is generally a Gtk_Label, but could be a box

109.        --  with a pixmap in it for instance.

110.        --  A new entry is inserted into the contextual menu. This new entry is

111.        --  made with Menu_Label.

113.        procedure Prepend_PageTo API docTo body

114.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

115.           Child     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

116.           Tab_Label : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

117.        --  Insert a new page in Notebook.

118.        --  The page is put at the beginning of the list of pages.

119.        --  The user will select it through a button that contains the

120.        --  Tab_Label widget, which is generally a Gtk_Label, but could be a box

121.        --  with a pixmap in it for instance.

122.        --  No entry is associated with the page in the contextual menu.

124.        procedure Prepend_Page_MenuTo API docTo body

125.          (Notebook   : access Gtk_Notebook_RecordTo API docTo specTo body;

126.           Child      : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

127.           Tab_Label  : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

128.           Menu_Label : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

129.        --  Insert a new page in Notebook.

130.        --  The page is put at the beginning of the list of pages.

131.        --  The user will select it through a button that contains the

132.        --  Tab_Label widget, which is generally a Gtk_Label, but could be a box

133.        --  with a pixmap in it for instance.

134.        --  A new entry is inserted into the contextual menu. This new entry is

135.        --  made with Menu_Label.

137.        procedure Insert_PageTo API docTo body

138.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

139.           Child     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

140.           Tab_Label : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

141.           Position  : GintTo API docTo spec);

142.        --  Insert a new page at a specific position in Notebook.

143.        --  The page is put at the beginning of the list of pages.

144.        --  The user will select it through a button that contains the

145.        --  Tab_Label widget, which is generally a Gtk_Label, but could be a box

146.        --  with a pixmap in it for instance.

147.        --  No entry is associated with the page in the contextual menu.

148.        --  The first position in the list of pages is 0.

150.        procedure Insert_Page_MenuTo API docTo body

151.          (Notebook   : access Gtk_Notebook_RecordTo API docTo specTo body;

152.           Child      : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

153.           Tab_Label  : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

154.           Menu_Label : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

155.           Position   : GintTo API docTo spec);

156.        --  Insert a new page at a specific position in Notebook.

157.        --  The page is put at the beginning of the list of pages.

158.        --  The user will select it through a button that contains the

159.        --  Tab_Label widget, which is generally a Gtk_Label, but could be a box

160.        --  with a pixmap in it for instance.

161.        --  A new entry is inserted into the contextual menu. This new entry is

162.        --  made with Menu_Label.

163.        --  The first position in the list of pages is 0.

165.        procedure Remove_PageTo API docTo body

166.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body; Page_Num : GintTo API docTo spec);

167.        --  Remove a page from the notebook.

168.        --  The first position in the list of pages is 0.

170.        ------------------------

171.        -- Tabs drag and drop --

172.        ------------------------

174.        type Gtk_Notebook_Window_Creation_Func is access

175.          function (Source : System.Address; --  Gtk_Notebook

176.                    Page   : System.Address; --  Gtk_Widget

177.                    X      : System.Address; --  Gint

178.                    Y      : System.Address; --  Gint

179.                    Data   : System.Address) return Gtk_NotebookTo API docTo spec;

180.        pragma Convention (C, Gtk_Notebook_Window_Creation_FuncTo API docTo spec);

182.        procedure Set_Window_Creation_HookTo API docTo body

183.          (Func     : Gtk_Notebook_Window_Creation_FuncTo API docTo spec;

184.           Data     : System.Address;

185.           Destroy  : Glib.G_Destroy_Notify_AddressTo API docTo spec);

186.        pragma Obsolescent (Set_Window_Creation_HookTo API docTo specTo body);

187.        --  Install a global function used to create a window when a detached tab

188.        --  is dropped in an empty area.

190.        --------------------------------------------

191.        -- Modifying and getting the current page --

192.        --------------------------------------------

194.        function Get_Current_PageTo API docTo body

195.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body) return GintTo API docTo spec;

196.        --  Get the number of the current page.

197.        --  The first page has the number 0.

199.        function Get_Nth_PageTo API docTo body

200.          (Widget   : access Gtk_Notebook_RecordTo API docTo specTo body'Class;

201.           Page_Num : GintTo API docTo spec) return Gtk.Widget.Gtk_WidgetTo API docTo spec;

202.        --  Convert from a page number to the real page.

204.        function Get_N_PagesTo API docTo body

205.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body) return GintTo API docTo spec;

206.        --  Return the number of pages in the notebook

208.        function Page_NumTo API docTo body

209.          (Widget : access Gtk_Notebook_RecordTo API docTo specTo body'Class;

210.           Child  : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class) return GintTo API docTo spec;

211.        --  Convert from a child to a page number.

212.        --  Note that Child is not the notebook page, but the widget you inserted

213.        --  with Insert_Page, Append_Page,...

215.        procedure Set_Current_PageTo API docTo body

216.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body;

217.           Page_Num : GintTo API docTo spec := -1);

218.        --  Modify the current page.

219.        --  The current page is the page that is currently visible on the screen.

220.        --  Nothing happens if there is no such page.

221.        --  Note also that the page has to be visible on the screen (ie you must

222.        --  have called Gtk.Widget.Show on it first).

223.        --  Use -1 to set the current page to the last one.

224.        --

225.        --  Note: This call won't succeeded unless you have called Show on the

226.        --  widget displayed in the page.

228.        procedure Set_Page

229.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body;

230.           Page_Num : GintTo API docTo spec := -1)

231.          renames Set_Current_PageTo API docTo specTo body;

232.        --  This function is deprecated. Use Set_Current_Page instead.

234.        procedure Next_PageTo API docTo body (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body);

235.        --  Display the next page on the screen.

237.        procedure Prev_PageTo API docTo body (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body);

238.        --  Display the previous page on the screen.

240.        -----------------------------

241.        -- Style and visual aspect --

242.        -----------------------------

244.        procedure Set_Show_BorderTo API docTo body

245.          (Notebook    : access Gtk_Notebook_RecordTo API docTo specTo body;

246.           Show_Border : Boolean := True);

247.        --  Indicate whether the notebook should display borders.

248.        --  This border gives a 3D aspect to the notebook.

250.        function Get_Show_BorderTo API docTo body

251.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body) return Boolean;

252.        --  Return whether the notebook displays borders.

254.        procedure Set_Show_TabsTo API docTo body

255.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

256.           Show_Tabs : Boolean := True);

257.        --  Indicate whether the tabs should be displayed.

258.        --  If the tabs are not displayed, the only way for the user to select a

259.        --  new page is through the contextual menu, and thus you should make sure

260.        --  that the pages were created with the Insert_Page_Menu, ... subprograms.

262.        function Get_Show_TabsTo API docTo body

263.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body) return Boolean;

264.        --  Return whether the tabs are displayed.

266.        procedure Set_Tab_PosTo API docTo body

267.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body;

268.           PosTo API docTo body      : Gtk.Enums.Gtk_Position_TypeTo API docTo spec);

269.        --  Change the position of the tabs.

270.        --  The tabs can be displayed on any of the four sides of the notebook.

272.        function Get_Tab_PosTo API docTo body

273.          (Widget : access Gtk_Notebook_RecordTo API docTo specTo body) return Gtk.Enums.Gtk_Position_TypeTo API docTo spec;

274.        --  Return the current position of the tabs.

276.        procedure Set_ScrollableTo API docTo body

277.          (Notebook   : access Gtk_Notebook_RecordTo API docTo specTo body;

278.           Scrollable : Boolean := True);

279.        --  Indicate whether Notebook display scrolling arrows when there are

280.        --  too many tabs.

281.        --  The default is not to display such scrolling arrows. Note also that

282.        --  a notebook with too many pages, even if the scrolling is activated,

283.        --  is sometimes hard to use for the user.

285.        function Get_ScrollableTo API docTo body

286.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body) return Boolean;

287.        --  Return whether Notebook is scrollable.

288.        --  See Set_Scrollable for more details.

290.        ----------------

291.        -- Popup Menu --

292.        ----------------

293.        --  The pages of a notebook can be selected both via tabs and a contextual

294.        --  menu (right mouse button). Note however that the menu is available only

295.        --  if the pages were inserted with Insert_Page_Menu, Append_Page_Menu or

296.        --  Prepend_Page_Menu.

298.        procedure Popup_EnableTo API docTo body (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body);

299.        --  Enable the popup menu.

300.        --  When the user pressed the right mouse button, a menu is selected that

301.        --  allows him to select a new page.

303.        procedure Popup_DisableTo API docTo body (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body);

304.        --  Disable the popup menu.

305.        --  This menu won't be display any more when the user pressed the right

306.        --  mouse button.

308.        ---------------------

309.        -- Page properties --

310.        ---------------------

312.        function Get_Tab_LabelTo API docTo body

313.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

314.           Child     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class)

315.           return Gtk.Widget.Gtk_WidgetTo API docTo spec;

316.        --  Return the widget displayed in the tab used to select Page.

317.        --  This widget is in fact the one given in argument to Insert_Page,etc.

318.        --  when the page was created.

320.        procedure Set_Tab_LabelTo API docTo body

321.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

322.           Child     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

323.           Tab_Label : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

324.        --  Modify the widget displayed in the tab for the page that contains Child.

325.        --  Tab_Label is generally a Gtk_Label, although it can also be a Gtk_Box

326.        --  that contains a Gtk_Pixmap and a Gtk_Label if you want to show pixmaps.

327.        --

328.        --  Note that you will need to call Show_All on Tab_Label: since it is not

329.        --  a Child of the notebook in the sense of Gtk_Container, the Show_All

330.        --  passed to the notebook will not be transmitted to the Tab_Label.

332.        procedure Set_Tab_Label_TextTo API docTo body

333.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body;

334.           Child    : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

335.           Tab_Text : UTF8_StringTo API docTo spec);

336.        --  Modify the text displayed in the tab for the page that contains Child.

337.        --  This is a less general form of Set_Tab_Label above.

339.        function Get_Tab_Label_TextTo API docTo body

340.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body;

341.           Child    : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class) return UTF8_StringTo API docTo spec;

342.        --  Return the text displayed in the tab for the page that contains Child.

344.        procedure Set_TabTo API docTo body

345.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

346.           Page_Num  : GintTo API docTo spec;

347.           Tab_Label : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

348.        --  Set Notebook tab widget for a given page number.

349.        --  This function is mainly intended for use by Gate.

351.        function Get_Menu_LabelTo API docTo body

352.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body;

353.           Child    : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class)

354.           return Gtk.Widget.Gtk_WidgetTo API docTo spec;

355.        --  Return the widget displayed in the contextual menu for the Child.

356.        --  This is the widget given in argument to Insert_Page_Menu,

357.        --  Append_Page_Menu and Prepend_Page_Menu.

359.        procedure Set_Menu_LabelTo API docTo body

360.          (Notebook   : access Gtk_Notebook_RecordTo API docTo specTo body;

361.           Child      : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

362.           Menu_Label : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

363.        --  Modify the widget displayed in the contextual menu for the page

364.        --  that contains Child.

366.        procedure Set_Menu_Label_TextTo API docTo body

367.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

368.           Child     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

369.           Menu_Text : UTF8_StringTo API docTo spec);

370.        --  Modify the text displayed in the contextual menu for the page that

371.        --  contains Child.

372.        --  This is a less general form of Set_Menu_Label above.

374.        function Get_Menu_Label_TextTo API docTo body

375.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

376.           Child     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class)

377.           return UTF8_StringTo API docTo spec;

378.        --  Return the text displayed in the contextual menu for the page that

379.        --  contains Child.

381.        procedure Query_Tab_Label_PackingTo API docTo body

382.          (Notebook   : access Gtk_Notebook_RecordTo API docTo specTo body;

383.           Child      : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

384.           Expand     : out Boolean;

385.           Fill       : out Boolean;

386.           Pack_TypeTo API docTo body  : out Gtk.Enums.Gtk_Pack_TypeTo API docTo spec);

387.        pragma Obsolescent (Query_Tab_Label_PackingTo API docTo specTo body);

388.        --  Return the packing used for the tab associated with the page

389.        --  that contains Child.

390.        --  See the Gtk.Box package for more information on the parameters.

392.        procedure Set_Tab_Label_PackingTo API docTo body

393.          (Notebook  : access Gtk_Notebook_RecordTo API docTo specTo body;

394.           Child     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

395.           Expand    : Boolean;

396.           Fill      : Boolean;

397.           Pack_TypeTo API docTo body : Gtk.Enums.Gtk_Pack_TypeTo API docTo spec);

398.        pragma Obsolescent (Set_Tab_Label_PackingTo API docTo specTo body);

399.        --  Modify the packing used for the tab associated with the page that

400.        --  contains Child.

402.        procedure Reorder_ChildTo API docTo body

403.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body;

404.           Child    : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

405.           Position : GintTo API docTo spec);

406.        --  Change the position of the page that contains Child.

408.        function Get_Tab_ReorderableTo API docTo body

409.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body;

410.           Child    : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

411.           Position : GintTo API docTo spec)

412.           return Boolean;

413.        --  Get whether the tab can be reordered via drag and drop or not.

415.        procedure Set_Tab_ReorderableTo API docTo body

416.          (Notebook    : access Gtk_Notebook_RecordTo API docTo specTo body;

417.           Child       : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

418.           Reorderable : Boolean := True);

419.        --  Set whether the notebook tab can be reordered.

421.        function Get_Tab_DetachableTo API docTo body

422.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body;

423.           Child    : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

424.           Position : GintTo API docTo spec)

425.           return Boolean;

426.        --  Return whether the tab contents can be detached from Notebook.

428.        procedure Set_Tab_DetachableTo API docTo body

429.          (Notebook   : access Gtk_Notebook_RecordTo API docTo specTo body;

430.           Child      : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

431.           Detachable : Boolean := True);

432.        --  Set whether the tab can be detached from Notebook to another

433.        --  notebook or widget.

434.        --

435.        --  Note that 2 notebooks must share a common group identificator

436.        --  (see Set_Group_Id) to allow automatic tabs interchange between them.

437.        --

438.        --  If you want a widget to interact with a notebook through DnD

439.        --  (i.e.: accept dragged tabs from it) it must be set as a drop

440.        --  destination and accept the target "GTK_NOTEBOOK_TAB". The notebook

441.        --  will fill the selection with a Gtk_Widget pointing to the child

442.        --  widget that corresponds to the dropped tab.

443.        --

444.        --  If you want a notebook to accept drags from other widgets,

445.        --  you will have to set your own DnD code to do it.

447.        function Get_GroupTo API docTo body (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body)

448.           return Gtk_Notebook_GroupTo API docTo spec;

449.        pragma Obsolescent (Get_GroupTo API docTo specTo body);

450.        procedure Set_GroupTo API docTo body

451.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body;

452.           Group    : Gtk_Notebook_GroupTo API docTo spec);

453.        pragma Obsolescent (Set_GroupTo API docTo specTo body);

454.        --  Gets/Sets a group identificator pointer for Notebook, notebooks sharing

455.        --  the same group identificator pointer will be able to exchange tabs

456.        --  via drag and drop. A notebook with a null group identificator will

457.        --  not be able to exchange tabs with any other notebook.

459.        --------------------

460.        -- GValue support --

461.        --------------------

463.        function Get_Notebook_PageTo API docTo body

464.          (ValueTo API docTo body : Glib.Values.GValueTo API docTo specTo body) return Gtk_Notebook_PageTo API docTo spec;

465.        --  Convert a Value into a notebook page.

467.        -----------------

468.        -- Obsolescent --

469.        -----------------

470.        --  All subprograms below are now obsolescent in gtk+. They might be removed

471.        --  from future versions of gtk+ (and therefore GtkAda).

472.        --  To find out whether your code uses any of these, we recommend compiling

473.        --  with the -gnatwj switch

474.        --  <doc_ignore>

476.        function Convert is new Unchecked_Conversion

477.          (Gtk_Notebook_PageTo API docTo spec, System.Address);

478.        function Convert is new Unchecked_Conversion

479.          (System.Address, Gtk_Notebook_PageTo API docTo spec);

480.        package Page_List is new Glib.Glist.Generic_ListTo API docTo specTo body (Gtk_Notebook_PageTo API docTo spec);

482.        function Get_ChildrenTo API docTo body

483.          (Widget : access Gtk_Notebook_RecordTo API docTo specTo body) return Page_List.GlistTo API docTo specTo body;

484.        pragma Obsolescent (Get_ChildrenTo API docTo specTo body);

485.        --  Return the list of all pages in the notebook.

487.        procedure Set_Homogeneous_TabsTo API docTo body

488.          (Notebook    : access Gtk_Notebook_RecordTo API docTo specTo body;

489.           Homogeneous : Boolean := True);

490.        pragma Obsolescent (Set_Homogeneous_TabsTo API docTo specTo body);

491.        --  Indicate whether all the tabs should have the same size (width or

492.        --  height, depending on which side they are displayed on).

494.        procedure Set_Tab_BorderTo API docTo body

495.          (Notebook     : access Gtk_Notebook_RecordTo API docTo specTo body;

496.           Border_Width : GintTo API docTo spec);

497.        pragma Obsolescent (Set_Tab_BorderTo API docTo specTo body);

498.        --  Change the width of the tabs' borders.

499.        --  This modifies both the horizontal border and the vertical border.

501.        procedure Set_Tab_HborderTo API docTo body

502.          (Notebook     : access Gtk_Notebook_RecordTo API docTo specTo body;

503.           Border_Width : GintTo API docTo spec);

504.        pragma Obsolescent (Set_Tab_HborderTo API docTo specTo body);

505.        --  Modify the width of the horizontal borders of the tabs.

507.        procedure Set_Tab_VborderTo API docTo body

508.          (Notebook     : access Gtk_Notebook_RecordTo API docTo specTo body;

509.           Border_Width : GintTo API docTo spec);

510.        pragma Obsolescent (Set_Tab_VborderTo API docTo specTo body);

511.        --  Modify the height of the vertical borders of the tabs.

513.        procedure Set_Group_IdTo API docTo body

514.          (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body; Group_Id : GintTo API docTo spec);

515.        pragma Obsolescent (Set_Group_IdTo API docTo specTo body);

516.        --  Set a group identificator for Notebook. Notebooks sharing

517.        --  the same group identificator will be able to exchange tabs

518.        --  via drag and drop. A notebook with group identificator -1 will

519.        --  not be able to exchange tabs with any other notebook.

521.        function Get_Group_IdTo API docTo body (Notebook : access Gtk_Notebook_RecordTo API docTo specTo body) return GintTo API docTo spec;

522.        pragma Obsolescent (Get_Group_IdTo API docTo specTo body);

523.        --  Gets the current group identificator for Notebook or -1 if not set.

525.        --  </doc_ignore>

527.        ----------------

528.        -- Properties --

529.        ----------------

530.        --  The following properties are defined for this widget. See

531.        --  Glib.Properties for more information on properties.

533.        --  <properties>

534.        --  Name: Page_Property

535.        --  Type: Gint

536.        --  See:  Set_Current_Page / Get_Current_Page

537.        --

538.        --  Name: Tab_Pos_Property

539.        --  Type: Gtk_Position_Type

540.        --  See:  Set_Tab_Pos / Get_Tab_Pos

541.        --

542.        --  Name: Tab_Border_Property

543.        --  Type: Guint

544.        --  Descr: Width of the border around the tab labels

545.        --

546.        --  Name: Tab_HBorder_Property

547.        --  Type: Guint

548.        --  Descr: Width of the horizontal border around the tab labels

549.        --

550.        --  Name: Tab_VBorder_Property

551.        --  Type: Guint

552.        --  Descr: Width of the vertical border around the tab labels

553.        --

554.        --  Name: Show_Tabs_Property

555.        --  Type: Boolean

556.        --  See:  Set_Show_Tabs / Get_Show_Tabs

557.        --

558.        --  Name: Show_Border_Property

559.        --  Type: Boolean

560.        --  See:  Set_Show_Border / Get_Show_Border

561.        --

562.        --  Name: Scrollable_Property

563.        --  Type: Boolean

564.        --  See:  Set_Scrollable / Get_Scrollable

565.        --

566.        --  Name: Enable_Popup_Property

567.        --  Type: Boolean

568.        --  See:  Popup_Enable / Popup_Disable

569.        --

570.        --  Name: Homogeneous_Property

571.        --  Type: Boolean

572.        --  See:  Set_Homogeneous_Tabs / -

573.        --

574.        --  Name:  Group_Property

575.        --  Type:  Gtk_Notebook_Group

576.        --  Descr: Group for tabs drag and drop

577.        --

578.        --  Name:  Group_Id_Property

579.        --  Type:  Int

580.        --  See: Set_Group_Id / Get_Group_Id

581.        --  </properties>

583.        Page_Property         : constant Glib.Properties.Property_IntTo API docTo spec;

584.        Tab_Pos_Property      : constant Gtk.Enums.Property_Gtk_Position_TypeTo API docTo spec;

585.        Tab_Border_Property   : constant Glib.Properties.Property_UintTo API docTo spec;

586.        Tab_Hborder_Property  : constant Glib.Properties.Property_UintTo API docTo spec;

587.        Tab_Vborder_Property  : constant Glib.Properties.Property_UintTo API docTo spec;

588.        Show_Tabs_Property    : constant Glib.Properties.Property_BooleanTo API docTo spec;

589.        Show_Border_Property  : constant Glib.Properties.Property_BooleanTo API docTo spec;

590.        Scrollable_Property   : constant Glib.Properties.Property_BooleanTo API docTo spec;

591.        Enable_Popup_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

592.        Homogeneous_Property  : constant Glib.Properties.Property_BooleanTo API docTo spec;

593.        Group_Property        : constant Glib.Properties.Property_C_ProxyTo API docTo spec;

594.        Group_Id_Property     : constant Glib.Properties.Property_IntTo API docTo spec;

596.        ----------------------

597.        -- Child Properties --

598.        ----------------------

599.        --  The following properties can be set on children of this widget. See

600.        --  in particular Gtk.Containers.Child_Set_Property.

602.        --  <child_properties>

603.        --  Name:  Menu_Label_Property

604.        --  Type:  String

605.        --  Descr: The string displayed in the child's menu entry

606.        --

607.        --  Name:  Position_Property

608.        --  Type:  Int

609.        --  Descr: The index of the child in the parent

610.        --

611.        --  Name:  Tab_Expand_Property

612.        --  Type:  Boolean

613.        --  Descr: Whether to expand the child's tab or not

614.        --

615.        --  Name:  Tab_Fill_Property

616.        --  Type:  Boolean

617.        --  Descr: Whether the child's tab should fill the allocated area or not

618.        --

619.        --  Name:  Tab_Label_Property

620.        --  Type:  String

621.        --  Descr: The string displayed on the child's tab label

622.        --

623.        --  Name:  Tab_Pack_Property

624.        --  Type:  Enum

625.        --  Descr: A Gtk_Pack_Type indicating whether the child is packed with

626.        --  reference to the start or end of the parent

627.        --

628.        --  Name:  Detachable_Property

629.        --  Type:  Boolean

630.        --  See:   Set_Tab_Detachable / Get_Tab_Detachable

631.        --

632.        --  Name:  Reorderable_Property

633.        --  Type:  Boolean

634.        --  See:   Set_Tab_Reorderable / Get_Tab_Reorderable

635.        --  </child_properties>

637.        Menu_Label_Property : constant Glib.Properties.Property_StringTo API docTo spec;

638.        Position_Property   : constant Glib.Properties.Property_IntTo API docTo spec;

639.        Tab_Expand_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

640.        Tab_Fill_Property   : constant Glib.Properties.Property_BooleanTo API docTo spec;

641.        Tab_Label_Property  : constant Glib.Properties.Property_StringTo API docTo spec;

642.        Tab_Pack_Property   : constant Gtk.Enums.Property_Pack_TypeTo API docTo spec;

643.        Detachable_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

644.        Reorderable_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

646.        ----------------------

647.        -- Style Properties --

648.        ----------------------

649.        --  The following properties can be changed through the gtk theme and

650.        --  configuration files, and retrieved through Gtk.Widget.Style_Get_Property

652.        --  <style_properties>

653.        --  Name:  Arrow_Spacing_Property

654.        --  Type:  Int

655.        --  Descr: Scroll arrow spacing

656.        --

657.        --  Name:  Has_Backward_Stepper_Property

658.        --  Type:  Boolean

659.        --  Descr: Display the standard backward arrow button

660.        --

661.        --  Name:  Has_Forward_Stepper_Property

662.        --  Type:  Boolean

663.        --  Descr: Display the standard forward arrow button

664.        --

665.        --  Name:  Has_Secondary_Backward_Stepper_Property

666.        --  Type:  Boolean

667.        --  Descr: Display a second backward arrow button on the opposite end of the

668.        --         tab area

669.        --

670.        --  Name:  Has_Secondary_Forward_Stepper_Property

671.        --  Type:  Boolean

672.        --  Descr: Display a second forward arrow button on the opposite end of the

673.        --         tab area

674.        --

675.        --  Name:  Tab_Curvature_Property

676.        --  Type:  Int

677.        --  Descr: Size of tab curvature

678.        --

679.        --  Name:  Tab_Overlap_Property

680.        --  Type:  Int

681.        --  Descr: Size of tab overlap area

682.        --  </style_properties>

684.        Arrow_Spacing_Property        : constant Glib.Properties.Property_IntTo API docTo spec;

685.        Has_Backward_Stepper_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

686.        Has_Forward_Stepper_Property  : constant Glib.Properties.Property_BooleanTo API docTo spec;

687.        Has_Secondary_Backward_Stepper_Property : constant

688.          Glib.Properties.Property_BooleanTo API docTo spec;

689.        Has_Secondary_Forward_Stepper_Property  : constant

690.          Glib.Properties.Property_BooleanTo API docTo spec;

691.        Tab_Curvature_Property        : constant Glib.Properties.Property_IntTo API docTo spec;

692.        Tab_Overlap_Property          : constant Glib.Properties.Property_IntTo API docTo spec;

694.        -------------

695.        -- Signals --

696.        -------------

698.        --  <signals>

699.        --  The following new signals are defined for this widget:

700.        --

701.        --  - "switch_page"

702.        --    procedure Handler

703.        --      (Notebook : access Gtk_Notebook_Record'Class;

704.        --       Page     : Gtk_Notebook_Page;

705.        --       Page_Num : Guint);

706.        --   Notify when the current page is modified in the notebook.

707.        --   This is called every time the user selected a new page, or the

708.        --   program selected a new page with Next_Page, Prev_Page, ...

709.        --

710.        --  - "select_page"

711.        --    function Handler

712.        --      (Notebook   : access Gtk_Notebook_Record'Class;

713.        --       Move_Focus : Boolean) return Boolean;

714.        --    You should emit this signal to request that the notebook selects the

715.        --    page corresponding to the focus tab. If Move_Focus is true, the page

716.        --    acquires the keyboard focus.

717.        --    Seldom used.

718.        --

719.        --  - "focus_tab"

720.        --    function Handler

721.        --       (Notebook : access Gtk_Notebook_Record'Class;

722.        --        Tab      : Gtk_Notebook_Tab) return Boolean;

723.        --    Gives the focus to one of the tabs in the notebook. This signal is

724.        --    mostly used as a keybinding for Home, End,... so that the proper

725.        --    behavior can be implemented

726.        --

727.        --  - "move_focus_out"

728.        --    procedure Handler

729.        --      (Notebook  : access Gtk_Notebook_Record'Class;

730.        --       Direction : Gtk_Direction_Type);

731.        --    You should emit this signal to request that the focus be transfered

732.        --    from the current page to the parent widget.

733.        --    Seldom used.

734.        --

735.        --  - "change_current_page"

736.        --    procedure Handler

737.        --      (Notebook : access Gtk_Notebook_Record'Class;

738.        --       Offset   : Gint);

739.        --    You should emit this signal to request that the notebook selects

740.        --    another page as the current page. The offset is relative to the

741.        --    currently selected page.

742.        --

743.        --  </signals>

745.        Signal_Switch_Page         : constant Glib.Signal_NameTo API docTo spec := "switch_page";

746.        Signal_Select_Page         : constant Glib.Signal_NameTo API docTo spec := "select_page";

747.        Signal_Focus_Tab           : constant Glib.Signal_NameTo API docTo spec := "focus_tab";

748.        Signal_Move_Focus_Out      : constant Glib.Signal_NameTo API docTo spec := "move_focus_out";

749.        Signal_Change_Current_Page : constant Glib.Signal_NameTo API docTo spec :=

750.                                       "change_current_page";

752.     private

753.        type Gtk_Notebook_RecordTo API docTo spec is new Gtk.Container.Gtk_Container_RecordTo API docTo specTo body

754.          with null record;

755.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_notebook_get_type");

757.        Page_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

758.          Glib.Properties.BuildTo API docTo specTo body ("page");

759.        Tab_Pos_PropertyTo API docTo spec : constant Gtk.Enums.Property_Gtk_Position_TypeTo API docTo spec :=

760.          Gtk.Enums.BuildTo API docTo specTo body ("tab-pos");

761.        Tab_Border_PropertyTo API docTo spec : constant Glib.Properties.Property_UintTo API docTo spec :=

762.          Glib.Properties.BuildTo API docTo specTo body ("tab-border");

763.        Tab_Hborder_PropertyTo API docTo spec : constant Glib.Properties.Property_UintTo API docTo spec :=

764.          Glib.Properties.BuildTo API docTo specTo body ("tab-hborder");

765.        Tab_Vborder_PropertyTo API docTo spec : constant Glib.Properties.Property_UintTo API docTo spec :=

766.          Glib.Properties.BuildTo API docTo specTo body ("tab-vborder");

767.        Show_Tabs_PropertyTo API docTo spec   : constant Glib.Properties.Property_BooleanTo API docTo spec :=

768.          Glib.Properties.BuildTo API docTo specTo body ("show-tabs");

769.        Show_Border_PropertyTo API docTo spec   : constant Glib.Properties.Property_BooleanTo API docTo spec :=

770.          Glib.Properties.BuildTo API docTo specTo body ("show-border");

771.        Scrollable_PropertyTo API docTo spec   : constant Glib.Properties.Property_BooleanTo API docTo spec :=

772.          Glib.Properties.BuildTo API docTo specTo body ("scrollable");

773.        Enable_Popup_PropertyTo API docTo spec   : constant Glib.Properties.Property_BooleanTo API docTo spec :=

774.          Glib.Properties.BuildTo API docTo specTo body ("enable-popup");

775.        Homogeneous_PropertyTo API docTo spec  : constant Glib.Properties.Property_BooleanTo API docTo spec :=

776.          Glib.Properties.BuildTo API docTo specTo body ("homogeneous");

777.        Group_PropertyTo API docTo spec : constant Glib.Properties.Property_C_ProxyTo API docTo spec :=

778.          Glib.Properties.BuildTo API docTo specTo body ("group");

779.        Group_Id_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

780.          Glib.Properties.BuildTo API docTo specTo body ("group-id");

782.        Menu_Label_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

783.          Glib.Properties.BuildTo API docTo specTo body ("menu-label");

784.        Position_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

785.          Glib.Properties.BuildTo API docTo specTo body ("position");

786.        Tab_Expand_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

787.          Glib.Properties.BuildTo API docTo specTo body ("tab-expand");

788.        Tab_Fill_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

789.          Glib.Properties.BuildTo API docTo specTo body ("tab-fill");

790.        Tab_Label_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

791.          Glib.Properties.BuildTo API docTo specTo body ("tab-label");

792.        Tab_Pack_PropertyTo API docTo spec : constant Gtk.Enums.Property_Pack_TypeTo API docTo spec :=

793.          Gtk.Enums.BuildTo API docTo specTo body ("tab-pack");

794.        Detachable_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

795.          Glib.Properties.BuildTo API docTo specTo body ("detachable");

796.        Reorderable_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

797.          Glib.Properties.BuildTo API docTo specTo body ("reorderable");

799.        Arrow_Spacing_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

800.          Glib.Properties.BuildTo API docTo specTo body ("arrow-spacing");

801.        Has_Backward_Stepper_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

802.          Glib.Properties.BuildTo API docTo specTo body ("has-backward-stepper");

803.        Has_Forward_Stepper_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

804.          Glib.Properties.BuildTo API docTo specTo body ("has-forward-stepper");

805.        Has_Secondary_Backward_Stepper_PropertyTo API docTo spec : constant

806.          Glib.Properties.Property_BooleanTo API docTo spec :=

807.          Glib.Properties.BuildTo API docTo specTo body ("has-secondary-backward-stepper");

808.        Has_Secondary_Forward_Stepper_PropertyTo API docTo spec : constant

809.          Glib.Properties.Property_BooleanTo API docTo spec :=

810.          Glib.Properties.BuildTo API docTo specTo body ("has-secondary-forward-stepper");

811.        Tab_Curvature_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

812.          Glib.Properties.BuildTo API docTo specTo body ("tab-curvature");

813.        Tab_Overlap_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

814.          Glib.Properties.BuildTo API docTo specTo body ("tab-overlap");

816.     end Gtk.NotebookTo API docTo specTo body;