1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
120
  
121
  
122
  
123
  
124
  
125
  
126
  
127
  
128
  
129
  
130
  
131
  
132
  
133
  
134
  
135
  
136
  
137
  
138
  
139
  
140
  
141
  
142
  
143
  
144
  
145
  
146
  
147
  
148
  
149
  
150
  
151
  
152
  
153
  
154
  
155
  
156
  
157
  
158
  
159
  
160
  
161
  
162
  
163
  
164
  
165
  
166
  
167
  
168
  
169
  
170
  
171
  
172
  
173
  
174
  
175
  
176
  
177
  
178
  
179
  
180
  
181
  
182
  
183
  
184
  
185
  
186
  
187
  
188
  
189
  
190
  
191
  
192
  
193
  
194
  
195
  
196
  
197
  
198
  
199
  
200
  
201
  
202
  
203
  
204
  
205
  
206
  
207
  
208
  
209
  
210
  
211
  
212
  
213
  
214
  
215
  
216
  
217
  
218
  
219
  
220
  
221
  
222
  
223
  
224
  
225
  
226
  
227
  
228
  
229
  
230
  
231
  
232
  
233
  
234
  
235
  
236
  
237
  
238
  
239
  
240
  
241
  
242
  
243
  
244
  
245
  
246
  
247
  
248
  
249
  
250
  
251
  
252
  
253
  
254
  
255
  
256
  
257
  
258
  
259
  
260
  
261
  
262
  
263
  
264
  
265
  
266
  
267
  
268
  
269
  
270
  
271
  
272
  
273
  
274
  
275
  
276
  
277
  
278
  
279
  
280
  
281
  
282
  
283
  
284
  
285
  
286
  
287
  
288
  
289
  
290
  
291
  
292
  
293
  
294
  
295
  
296
  
297
  
298
  
299
  
300
  
301
  
302
  
303
  
304
  
305
  
306
  
307
  
308
  
309
  
310
  
311
  
312
  
313
  
314
  
315
  
316
  
317
  
318
  
319
  
320
  
321
  
322
  
323
  
324
  
325
  
326
  
327
  
328
  
329
  
330
  
331
  
332
  
333
  
334
  
335
  
336
  
337
  
338
  
339
  
340
  
341
  
342
  
343
  
344
  
345
  
346
  
347
  
348
  
349
  
350
  
351
  
352
  
353
  
354
  
355
  
356
  
357
  
358
  
359
  
360
  
361
  
362
  
363
  
364
  
365
  
366
  
367
  
368
  
369
  
370
  
371
  
372
  
373
  
374
  
375
  
376
  
377
  
378
  
379
  
380
  
381
  
382
  
383
  
384
  
385
  
386
  
387
  
388
  
389
  
390
  
391
  
392
  
393
  
394
  
395
  
396
  
397
  
398
  
399
  
400
  
401
  
402
  
403
  
404
  
405
  
406
  
407
  
//! Properties: 
//! int accepts-tab 
//! GTK2.TextBuffer buffer 
//! int cursor-visible 
//! int editable 
//! int indent 
//! int justification 
//! int left-margin 
//! int overwrite 
//! int pixels-above-lines 
//! int pixels-below-lines 
//! int pixels-inside-wrap 
//! int right-margin 
//! Pango.TabArray tabs 
//! int wrap-mode 
//!  
//! Style properties: 
//! GDK2.Color error-underline-color 
//! 
//! 
//!  Signals: 
//! @b{backspace@} 
//! 
//! @b{copy_clipboard@} 
//! 
//! @b{cut_clipboard@} 
//! 
//! @b{delete_from_cursor@} 
//! 
//! @b{insert_at_cursor@} 
//! 
//! @b{move_cursor@} 
//! 
//! @b{move_focus@} 
//! 
//! @b{move_viewport@} 
//! 
//! @b{page_horizontally@} 
//! 
//! @b{paste_clipboard@} 
//! 
//! @b{populate_popup@} 
//! 
//! @b{select_all@} 
//! 
//! @b{set_anchor@} 
//! 
//! @b{set_scroll_adjustments@} 
//! 
//! @b{toggle_overwrite@} 
//! 
 
inherit GTK2.Container; 
 
GTK2.TextView add_child_at_anchor( GTK2.Widget child, GTK2.TextChildAnchor anchor ); 
//! Adds a child widget in the text buffer, at the given anchor. 
//! 
//! 
 
GTK2.TextView add_child_in_window( GTK2.Widget child, int wintype, int xpos, int ypos ); 
//! Adds a child at fixed coordinates in one of the text widget's windows. 
//! The window must have nonzero size (see 
//! GTK2.TextView->set_border_window_size()).  Note that the child coordinates 
//! are given relative to the GDK2.Window in question, and that these 
//! coordinates have no sane relationship to scrolling.  When placing a child 
//! in GTK2.TEXT_WINDOW_WIDGET, scrolling is irrelevant, the child floats above 
//! all scrollable areas.  But when placing a child in one of the scrollable 
//! windows (border windows or text window), you'll need to compute the child's 
//! correct position in buffer coordinates any time scrolling occurs or buffer 
//! changes occur, and then call GTK2.TextView->move_child() to update the 
//! child's position.  Unfortunately there's no good way to detect that 
//! scrolling has occurred, using the current API; a possible hack would be to 
//! update all child positions when the scroll adjustments change or the text 
//! buffer changes. 
//! 
//! 
 
int backward_display_line( GTK2.TextIter iter ); 
//! See forward_display_line(). 
//! 
//! 
 
int backward_display_line_start( GTK2.TextIter iter ); 
//! Moves the iter backward to the next display line start. 
//! 
//! 
 
array buffer_to_window_coords( int wintype, int buffer_x, int buffer_y ); 
//! Converts coordinate (buffer_x,buffer_y) to coordinates for the window 
//! win, and returns the results.  wintype is one of @[TEXT_WINDOW_BOTTOM], @[TEXT_WINDOW_LEFT], @[TEXT_WINDOW_PRIVATE], @[TEXT_WINDOW_RIGHT], @[TEXT_WINDOW_TEXT], @[TEXT_WINDOW_TOP] and @[TEXT_WINDOW_WIDGET]. 
//! 
//! 
 
protected GTK2.TextView create( GTK2.TextBuffer buffer_or_props ); 
//! Create a new W(TextView).   
//! 
//! 
 
int forward_display_line( GTK2.TextIter iter ); 
//! Moves iter forward by one display (wrapped) line.  A display line is 
//! different from a paragraph.  Paragraphs are separated by newlines or 
//! other paragraph separator characters.  Display lines are created by 
//! line-wrapping a paragraph.  If wrapping is turned off, display lines and 
//! paragraphs will be the same.  Display lines are divided differently for 
//! each view, since they depend on the view's width; paragraphs are the same 
//! in all view, since they depend on the contents of the W(TextBuffer). 
//! 
//! 
 
int forward_display_line_end( GTK2.TextIter iter ); 
//! Moves the iter forward to the next display line end. 
//! 
//! 
 
int get_accepts_tab( ); 
//! Returns whether pressing the Tab key inserts a tab character. 
//! 
//! 
 
int get_border_window_size( int wintype ); 
//! Gets the width of the specified border window. 
//! 
//! 
 
GTK2.TextBuffer get_buffer( ); 
//! Returns the buffer displayed by this view. 
//! 
//! 
 
int get_cursor_visible( ); 
//! Find out whether the cursor is being displayed. 
//! 
//! 
 
GTK2.TextAttributes get_default_attributes( ); 
//! Obtains a copy of the default text attributes.  These are the attributes 
//! used for text unless a tag overrides them. 
//! 
//! 
 
int get_editable( ); 
//! Gets the default editability. 
//! 
//! 
 
int get_indent( ); 
//! Gets the default indentation for paragraphs. 
//! 
//! 
 
GTK2.TextIter get_iter_at_location( int x, int y ); 
//! Retrieves the iterator at buffer coordinates x and y.  Buffer coordinates 
//! are coordinates for the entire buffer, not just the currently-displayed 
//! portions.  If you have coordinates from an event, you have to convert 
//! those to buffer coordinates with window_to_buffer_coords(). 
//! 
//! 
 
GTK2.TextIter get_iter_at_position( int x, int y ); 
//! Retrieves the iterator pointing to the character at buffer coordinates 
//! x and y. 
//! 
//! 
 
GTK2.GdkRectangle get_iter_location( GTK2.TextIter iter ); 
//! Gets a rectangle which roughly contains the character at iter.  The 
//! rectangle position is in buffer coordinates; use buffer_to_window_coords() 
//! to convert these coordinates to coordinates for one of the windows in 
//! the text view. 
//! 
//! 
 
int get_justification( ); 
//! Gets the default justification. 
//! 
//! 
 
int get_left_margin( ); 
//! Gets the default left margin size of paragraphs. 
//! 
//! 
 
GTK2.TextIter get_line_at_y( int y ); 
//! Returns a W(TextIter) for the start of the line containing the coordinate 
//! y.  y is in buffer coordinates, convert from window coordinates with 
//! window_to_buffer_coords(). 
//! 
//! 
 
mapping get_line_yrange( GTK2.TextIter iter ); 
//! Gets the y coordinate of the top of the line containing iter, and the 
//! height of the line.  The coordinate is a buffer coordinate; convert to 
//! window coordinates with buffer_to_window_coords(). 
//! 
//! 
 
int get_overwrite( ); 
//! Returns whether the view is in overwrite mode or not. 
//! 
//! 
 
int get_pixels_above_lines( ); 
//! Gets the default number of pixels to put above paragraphs. 
//! 
//! 
 
int get_pixels_below_lines( ); 
//! Gets the value set by set_pixels_below_lines(). 
//! 
//! 
 
int get_pixels_inside_wrap( ); 
//! Gets the value set by set_pixels_inside_wrap(). 
//! 
//! 
 
int get_right_margin( ); 
//! Gets the default right margin size of paragraphs. 
//! 
//! 
 
GTK2.Pango.TabArray get_tabs( ); 
//! Gets the default tabs.  Tags in the buffer may override the defaults. 
//! The return value will be 0 if "standard" (8-space) tabs are used. 
//! 
//! 
 
GTK2.GdkRectangle get_visible_rect( ); 
//! Returns a rectangle with the currently-visible region of the buffer, 
//! in buffer coordinates.  Convert to window coordinates with 
//! buffer_to_window_coords(). 
//! 
//! 
 
GTK2.GdkWindow get_window( int wintype ); 
//! Retrieves the GDK2.Window corresponding to an area of the text view; 
//! possible windows include the overall widget window, child windows on the 
//! left, right, top, bottom, and the window that displays the text buffer. 
//! Windows are 0 and nonexistent if their width or height is 0, and are 
//! nonexistent before the widget has been realized. 
//! 
//! 
 
int get_window_type( GTK2.GdkWindow window ); 
//! Usually used to find out which window an event corresponds to.  If you 
//! connect to an event signal, this function should be called on 
//! event->window to see which window it was.  One of @[TEXT_WINDOW_BOTTOM], @[TEXT_WINDOW_LEFT], @[TEXT_WINDOW_PRIVATE], @[TEXT_WINDOW_RIGHT], @[TEXT_WINDOW_TEXT], @[TEXT_WINDOW_TOP] and @[TEXT_WINDOW_WIDGET]. 
//! 
//! 
 
int get_wrap_mode( ); 
//! Gets the line wrapping mode. 
//! 
//! 
 
GTK2.TextView move_child( GTK2.Widget child, int x, int y ); 
//! Updates the position of a child. 
//! 
//! 
 
int move_mark_onscreen( GTK2.TextMark mark ); 
//! Moves a mark within the buffer so that it's located within the currently 
//! visible text-area. 
//! 
//! 
 
int move_visually( GTK2.TextIter iter, int count ); 
//! Move the iterator a given number of characters visually, treating it as 
//! the strong cursor position.  If count is positive, then the new strong 
//! cursor position will be count positions to the right of the old cursor 
//! position.  If count is negative then the new strong cursor position will 
//! be count positions to the left of the old cursor position. 
//!  
//! In the presence of bidirection text, the correspondence between logical 
//! and visual order will depend on the direction of the current run, and 
//! there may be jumps when the cursor is moved off the end of a run. 
//! 
//! 
 
int place_cursor_onscreen( ); 
//! Moves the cursor to the currently visible region of the buffer, if it 
//! isn't there already. 
//! 
//! 
 
GTK2.TextView scroll_mark_onscreen( GTK2.TextMark mark ); 
//! Scrolls the view the minimum distance such that mark is contained 
//! within the visible area. 
//! 
//! 
 
GTK2.TextView scroll_to_iter( GTK2.TextIter iter, float within_margin, int use_align, float xalign, float yalign ); 
//! Scrolls the view so that iter is on the screen as with scroll_to_mark(). 
//! 
//! 
 
GTK2.TextView scroll_to_mark( GTK2.TextMark mark, float within_margin, int use_align, float xalign, float yalign ); 
//! Scrolls the view so that mark is on the screen in the position indicated 
//! by xalign and yalign.  An alignment of 0.0 indicates left or top, 1.0 
//! indicates right or bottom, 0.5 means center.  If use_align is false, 
//! the text scrolls the minimal distance to get the mark onscreen, possibly 
//! not scrolling at all.  The effective screen for purposes of this function 
//! is reduced by the margin of size within_margin. 
//! 
//! 
 
GTK2.TextView set_accepts_tab( int accepts_tab ); 
//! Sets the behavior of the text widget when the Tab key is pressed.  If 
//! accepts_tab is true a tab character is inserted.  If accepts_tab is false 
//! the keyboard focus is moved to the next widget in the focus chain. 
//! 
//! 
 
GTK2.TextView set_border_window_size( int wintype, int size ); 
//! Sets the width of GTK2.TEXT_WINDOW_LEFT or GTK2.TEXT_WINDOW_RIGHT, or the 
//! height of GTK2.TEXT_WINDOW_TOP or GTK2.TEXT_WINDOW_BOTTOM.  Automatically 
//! destroys the corresponding window if the size is set to 0, and creates 
//! the window if the size is set to non-zero.  This function can only be 
//! used for the "border windows", it doesn't work with GTK2.TEXT_WINDOW_WIDGET, 
//! GTK2.TEXT_WINDOW_TEXT, or GTK2.TEXT_WINDOW_PRIVATE. 
//! 
//! 
 
GTK2.TextView set_buffer( GTK2.TextBuffer buffer ); 
//! Sets buffer as the buffer being displayed.   
//! 
//! 
 
GTK2.TextView set_cursor_visible( int setting ); 
//! Toggles whether the insertion point is displayed.  A buffer with no 
//! editable text probably shouldn't have a visible cursor, so you may want 
//! to turn the cursor off. 
//! 
//! 
 
GTK2.TextView set_editable( int setting ); 
//! Sets the default editability.  You can override this default setting with 
//! tags in the buffer, using the "editable" attribute of tags. 
//! 
//! 
 
GTK2.TextView set_indent( int indent ); 
//! Sets the default indentation for paragraphs.  May be overridden by tags. 
//! 
//! 
 
GTK2.TextView set_justification( int just ); 
//! Sets the default justification of text.  One of @[JUSTIFY_CENTER], @[JUSTIFY_FILL], @[JUSTIFY_LEFT] and @[JUSTIFY_RIGHT]. 
//! 
//! 
 
GTK2.TextView set_left_margin( int margin ); 
//! Sets the default left margin.  May be overridden by tags. 
//! 
//! 
 
GTK2.TextView set_overwrite( int overwrite ); 
//! Changes the overwrite mode, true for on, false for off. 
//! 
//! 
 
GTK2.TextView set_pixels_above_lines( int pixels ); 
//! Sets the default number of blank pixels above paragraphs.  Tags in 
//! the buffer may override the defaults. 
//! 
//! 
 
GTK2.TextView set_pixels_below_lines( int pixels ); 
//! Sets the default number of blank pixels to put below paragraphs.  May be 
//! overridden by tags applied to the buffer. 
//! 
//! 
 
GTK2.TextView set_pixels_inside_wrap( int pixels ); 
//! Sets the default number of pixels of blank space to leave between 
//! displayed/wrapped lines within a paragraph.  May be overridden by tags. 
//! 
//! 
 
GTK2.TextView set_right_margin( int margin ); 
//! Sets the default right margin.  May be overridden by tags. 
//! 
//! 
 
GTK2.TextView set_tabs( GTK2.Pango.TabArray tabs ); 
//! Sets the default tab stops for paragraphs.  Tags in the buffer may 
//! override the default. 
//! 
//! 
 
GTK2.TextView set_wrap_mode( int wrap_mode ); 
//! Sets the line wrapping.  One of @[WRAP_CHAR], @[WRAP_NONE], @[WRAP_WORD] and @[WRAP_WORD_CHAR]. 
//! 
//! 
 
int starts_display_line( GTK2.TextIter iter ); 
//! Determines whether iter is at the start of a display line. 
//! 
//! 
 
array window_to_buffer_coords( int wintype, int window_x, int window_y ); 
//! Converts coordinates on the window identified by wintype to buffer 
//! coordinates, returning the result. 
//! 
//!