Project

General

Profile

Notebooks » History » Version 7

iri, 03/03/2011 11:54 PM

1 1 iri
h1. Notebooks
2
3 2 iri
A tabbed notebook container.
4 7 iri
!>http://library.gnome.org/devel/gtk/unstable/notebook.png!
5 1 iri
6 2 iri
{{toc}}
7
8 1 iri
h2. _gtkNotebookNew
9
10
Create a new Notebook.
11
12
Prototype : *fun [Chn] ObjGtkWidget*
13
Return the new object or nil if error.
14 2 iri
15
h2. _gtkNotebookAddPage
16
17
Add/insert a new tab.
18
19
Prototype : *fun [ObjGtkWidget ObjGtkWidget S I] [ObjGtkWidget ObjGtkWidget ObjGtkWidget I]*
20
21
table.
22
|*notebook*|ObjGtkWidget|any notebook already created|
23
|*child*|ObjGtkWidget|any widget to include in the tab. Can be nil.|
24
|*title*|S|a title for the tab. If nil, the title will be "Page N" (N the number of the pages)|
25
|*pos*|I|the position where the tab is inserted. If nil, the tab will be added to the end, if negative, it will be inserted from the end, if positive, it is inserted from the begin.|
26
27
+Return :+
28
29
table.
30
|*notebook*|ObjGtkWidget|the same notebook|
31
|*label*|ObjGtkWidget|the label object (the title of the tab). So it can be modified ...|
32
|*child*|ObjGtkWidget|the child of the tab. By default, it's a text (GtkTextView)|
33 4 iri
|*index*|I|the index (starting from 0) of the inserted page in the notebook|
34 2 iri
35 3 iri
h2. _gtkNotebookRemovePage
36
37
Remove a page from a notebook
38
39
Prototype : *fun [ObjGtkWidget I] ObjGtkWidget*
40
41 1 iri
The integer is the index of the page.
42 4 iri
43
h2. _gtkNotebookIndex
44
45
Finds the index of the page/tab which contains the given child widget
46
47
Prototype : *fun [ObjGtkWidget ObjGtkWidget] I*
48
49
# *notebook* : ObjGtkWidget : the notebook
50
# *child* : ObjGtkWidget : the child
51
52
+Return+ : I : the index or nil if error or not found
53
54
h2. _gtkNotebookCurrent
55
56
Returns the index of the current tab.
57
58
Prototype : *fun [ObjGtkWidget] I*
59 3 iri
60 5 iri
h2. _gtkNotebookChild
61
62
Returns the child widget contained in a tab
63
64
Prototype : *fun [objGtkWidget I] ObjGtkWidget*
65
66
If the Scol child object doesn't exist (but the GTK+ object exists), it will be created before. If it already exists, it will be returned directly.
67
68 6 iri
h2. _gtkNotebookCount
69
70
Returns the number of tabs in a notebook
71
72
Prototype : *fun [ObjGtkWidget] I*
73
74 2 iri
75
Return [[Api]]