Notebooks » History » Revision 9
Revision 8 (iri, 03/04/2011 12:04 AM) → Revision 9/10 (iri, 03/13/2011 09:19 PM)
h1. Notebooks A tabbed notebook container. !>http://library.gnome.org/devel/gtk/unstable/notebook.png! {{toc}} h2. _gtkNotebookNew Create a new Notebook. Prototype : *fun [Chn] ObjGtkWidget* Return the new object or nil if error. h2. _gtkNotebookAddPage Add/insert a new tab. Prototype : *fun [ObjGtkWidget ObjGtkWidget S I] [ObjGtkWidget ObjGtkWidget ObjGtkWidget I]* table. |*notebook*|ObjGtkWidget|any notebook already created| |*child*|ObjGtkWidget|any widget to include in the tab. Can be nil.| |*title*|S|a title for the tab. If nil, the title will be "Page N" (N the number of the pages)| |*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.| +Return :+ table. |*notebook*|ObjGtkWidget|the same notebook| |*label*|ObjGtkWidget|the label object (the title of the tab). So it can be modified ...| |*child*|ObjGtkWidget|the child of the tab. By default, it's a text (GtkTextView)| |*index*|I|the index (starting from 0) of the inserted page in the notebook| h2. _gtkNotebookRemPage _gtkNotebookRemovePage Remove a page from a notebook Prototype : *fun [ObjGtkWidget I] ObjGtkWidget* The integer is the index of the page. h2. _gtkNotebookIndex Finds the index of the page/tab which contains the given child widget Prototype : *fun [ObjGtkWidget ObjGtkWidget] I* # *notebook* : ObjGtkWidget : the notebook # *child* : ObjGtkWidget : the child +Return+ : I : the index or nil if error or not found h2. _gtkNotebookCurrent Returns the index of the current tab. Prototype : *fun [ObjGtkWidget] I* h2. _gtkNotebookChild Returns the child widget contained in a tab Prototype : *fun [objGtkWidget I] ObjGtkWidget* 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. h2. _gtkNotebookCount Returns the number of tabs in a notebook Prototype : *fun [ObjGtkWidget] I* h2. _gtkNotebookLabelGet Returns the Scol label of a tab (the title object) Prototype : *fun [objGtkWidget I] ObjGtkWidget* 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. Return [[Api]]