Texts » History » Version 5
iri, 03/14/2011 10:06 PM
| 1 | 5 | iri | {{toc}} |
|---|---|---|---|
| 2 | |||
| 3 | 1 | iri | h1. Texts |
| 4 | |||
| 5 | Widget that displays a text string, typically on multi lines. |
||
| 6 | !>http://library.gnome.org/devel/gtk/2.21/multiline-text.png! |
||
| 7 | 4 | iri | A text object can be seen as a container. Each text object has a buffer object. The buffer object stores the content (the string). You can change buffer object to a same text object. |
| 8 | |||
| 9 | 1 | iri | |
| 10 | 5 | iri | |
| 11 | 1 | iri | h2. _gtkTextView |
| 12 | |||
| 13 | Create a new text object. |
||
| 14 | |||
| 15 | Prototype : *fun [Chn ObjGtkWidget S] [ObjGtkWidgetObjGtkWidget]* |
||
| 16 | |||
| 17 | table. |
||
| 18 | |*channel*|Chn|a channel. Can not be nil| |
||
| 19 | |*buffer*|ObjGtkWidget|a text buffer object. It can be nil; in this case, a default buffer will be created| |
||
| 20 | |*content*|S|an initial content. It can be nil| |
||
| 21 | |||
| 22 | +Return+ : [ObjGtkWidget ObjGtkWidget] : the new text object and the buffer text object. If _buffer_ was not nil, this will be the same, otherwise, it will be a new buffer text object too. |
||
| 23 | 2 | iri | |
| 24 | 3 | iri | h2. _gtkTextGetBuffer |
| 25 | |||
| 26 | Return the current buffer object. |
||
| 27 | |||
| 28 | Prototype : *fun [ObjGtkWidget] ObjGtkWidget* |
||
| 29 | 1 | iri | Text object -> buffer object. |
| 30 | 5 | iri | |
| 31 | h2. _gtkTextGetEditable |
||
| 32 | |||
| 33 | Return if a text object is editable or not. |
||
| 34 | |||
| 35 | Prototype : *fun [ObjGtkWidget] I* |
||
| 36 | +Return+ : I : 1 if editable, else 0. Nil if error (object is nil). |
||
| 37 | 3 | iri | |
| 38 | 2 | iri | Return [[Api]] |