Project

General

Profile

Notebooks » History » Version 10

iri, 03/13/2011 10:30 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 9 iri
h2. _gtkNotebookRemPage
36 3 iri
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 8 iri
h2. _gtkNotebookLabelGet
75
76
Returns the Scol label of a tab (the title object)
77
78
Prototype : *fun [objGtkWidget I] ObjGtkWidget*
79
80
If the Scol label doesn't exist (but the GTK+ object exists), it will be created before. If it already exists, it will be returned directly.
81 2 iri
82 10 iri
h2. _gtkNotebookGoto
83
84
Go to a specific page/tab.
85
86
Prototype : *fun [ObjGtkWidget I] ObjGtkWidget*
87
88
table.
89
|*notebook*|ObjGtkWidget|an valid object|
90
|*index*|I|the index of the page/tab|
91
92
+Return+ : ObjGtkWidget : the same notebook
93
94 2 iri
Return [[Api]]