1Gtk2::TextView(3)     User Contributed Perl Documentation    Gtk2::TextView(3)
2
3
4

NAME

6       Gtk2::TextView - wrapper for GtkTextView
7

HIERARCHY

9         Glib::Object
10         +----Glib::InitiallyUnowned
11              +----Gtk2::Object
12                   +----Gtk2::Widget
13                        +----Gtk2::Container
14                             +----Gtk2::TextView
15

INTERFACES

17         Glib::Object::_Unregistered::AtkImplementorIface
18         Gtk2::Buildable
19

METHODS

21   widget = Gtk2::TextView->new
22   widget = Gtk2::TextView->new_with_buffer ($buffer)
23       ·   $buffer (Gtk2::TextBuffer)
24
25   boolean = $text_view->get_accepts_tab
26       Since: gtk+ 2.4
27
28   $text_view->set_accepts_tab ($accepts_tab)
29       ·   $accepts_tab (boolean)
30
31       Since: gtk+ 2.4
32
33   $text_view->add_child_at_anchor ($child, $anchor)
34       ·   $child (Gtk2::Widget)
35
36       ·   $anchor (Gtk2::TextChildAnchor)
37
38   $text_view->add_child_in_window ($child, $which_window, $xpos, $ypos)
39       ·   $child (Gtk2::Widget)
40
41       ·   $which_window (Gtk2::TextWindowType)
42
43       ·   $xpos (integer)
44
45       ·   $ypos (integer)
46
47   boolean = $text_view->backward_display_line ($iter)
48       ·   $iter (Gtk2::TextIter)
49
50   boolean = $text_view->backward_display_line_start ($iter)
51       ·   $iter (Gtk2::TextIter)
52
53   integer = $text_view->get_border_window_size ($type)
54       ·   $type (Gtk2::TextWindowType)
55
56   $text_view->set_border_window_size ($type, $size)
57       ·   $type (Gtk2::TextWindowType)
58
59       ·   $size (integer)
60
61   textbuffer = $text_view->get_buffer
62   $text_view->set_buffer ($buffer)
63       ·   $buffer (Gtk2::TextBuffer)
64
65   (window_x, window_y) = $text_view->buffer_to_window_coords ($win,
66       $buffer_x, $buffer_y)
67       ·   $win (Gtk2::TextWindowType)
68
69       ·   $buffer_x (integer)
70
71       ·   $buffer_y (integer)
72
73   boolean = $text_view->get_cursor_visible
74   $text_view->set_cursor_visible ($setting)
75       ·   $setting (boolean)
76
77   textattributes = $text_view->get_default_attributes
78   boolean = $text_view->get_editable
79   $text_view->set_editable ($setting)
80       ·   $setting (boolean)
81
82   boolean = $text_view->forward_display_line ($iter)
83       ·   $iter (Gtk2::TextIter)
84
85   boolean = $text_view->forward_display_line_end ($iter)
86       ·   $iter (Gtk2::TextIter)
87
88   adjustment = $text_view->get_hadjustment
89       Since: gtk+ 2.22
90
91   boolean = $text_view->im_context_filter_keypress ($event)
92       ·   $event (Gtk2::Gdk::Event)
93
94       Since: gtk+ 2.22
95
96   integer = $text_view->get_indent
97   $text_view->set_indent ($indent)
98       ·   $indent (integer)
99
100   textiter = $text_view->get_iter_at_location ($x, $y)
101       ·   $x (integer)
102
103       ·   $y (integer)
104
105   ($iter, $trailing) = $text_view->get_iter_at_position ($x, $y)
106   $iter = $text_view->get_iter_at_position ($x, $y)
107       ·   $x (integer)
108
109       ·   $y (integer)
110
111       Retrieves the iterator pointing to the character at buffer coordinates
112       x and y.  Buffer coordinates are coordinates for the entire buffer, not
113       just the currently-displayed portion.  If you have coordinates from an
114       event, you have to convert those to buffer coordinates with
115       "$text_view->window_to_buffer_coords()".
116
117       Note that this is different from "$text_view->get_iter_at_location()",
118       which returns cursor locations, i.e. positions between characters.
119
120       Since: gtk+ 2.6
121
122   rectangle = $text_view->get_iter_location ($iter)
123       ·   $iter (Gtk2::TextIter)
124
125   justification = $text_view->get_justification
126   $text_view->set_justification ($justification)
127       ·   $justification (Gtk2::Justification)
128
129   integer = $text_view->get_left_margin
130   $text_view->set_left_margin ($left_margin)
131       ·   $left_margin (integer)
132
133   (target_iter, line_top) = $text_view->get_line_at_y ($y)
134       ·   $y (integer)
135
136   (y, height) = $text_view->get_line_yrange ($iter)
137       ·   $iter (Gtk2::TextIter)
138
139   $text_view->move_child ($child, $xpos, $ypos)
140       ·   $child (Gtk2::Widget)
141
142       ·   $xpos (integer)
143
144       ·   $ypos (integer)
145
146   boolean = $text_view->move_mark_onscreen ($mark)
147       ·   $mark (Gtk2::TextMark)
148
149   boolean = $text_view->move_visually ($iter, $count)
150       ·   $iter (Gtk2::TextIter)
151
152       ·   $count (integer)
153
154   boolean = $text_view->get_overwrite
155       Since: gtk+ 2.4
156
157   $text_view->set_overwrite ($overwrite)
158       ·   $overwrite (boolean)
159
160       Since: gtk+ 2.4
161
162   integer = $text_view->get_pixels_above_lines
163   $text_view->set_pixels_above_lines ($pixels_above_lines)
164       ·   $pixels_above_lines (integer)
165
166   integer = $text_view->get_pixels_below_lines
167   $text_view->set_pixels_below_lines ($pixels_below_lines)
168       ·   $pixels_below_lines (integer)
169
170   integer = $text_view->get_pixels_inside_wrap
171   $text_view->set_pixels_inside_wrap ($pixels_inside_wrap)
172       ·   $pixels_inside_wrap (integer)
173
174   boolean = $text_view->place_cursor_onscreen
175   $text_view->reset_im_context
176       Since: gtk+ 2.22
177
178   integer = $text_view->get_right_margin
179   $text_view->set_right_margin ($right_margin)
180       ·   $right_margin (integer)
181
182   $text_view->scroll_mark_onscreen ($mark)
183       ·   $mark (Gtk2::TextMark)
184
185   boolean = $text_view->scroll_to_iter ($iter, $within_margin, $use_align,
186       $xalign, $yalign)
187       ·   $iter (Gtk2::TextIter)
188
189       ·   $within_margin (double)
190
191       ·   $use_align (boolean)
192
193       ·   $xalign (double)
194
195       ·   $yalign (double)
196
197   $text_view->scroll_to_mark ($mark, $within_margin, $use_align, $xalign,
198       $yalign)
199       ·   $mark (Gtk2::TextMark)
200
201       ·   $within_margin (double)
202
203       ·   $use_align (boolean)
204
205       ·   $xalign (double)
206
207       ·   $yalign (double)
208
209   boolean = $text_view->starts_display_line ($iter)
210       ·   $iter (Gtk2::TextIter)
211
212   tabarray = $text_view->get_tabs
213   $text_view->set_tabs ($tabs)
214       ·   $tabs (Pango::TabArray)
215
216   adjustment = $text_view->get_vadjustment
217       Since: gtk+ 2.22
218
219   rectangle = $text_view->get_visible_rect
220   window = $text_view->get_window ($win)
221       ·   $win (Gtk2::TextWindowType)
222
223   (buffer_x, buffer_y) = $text_view->window_to_buffer_coords ($win,
224       $window_x, $window_y)
225       ·   $win (Gtk2::TextWindowType)
226
227       ·   $window_x (integer)
228
229       ·   $window_y (integer)
230
231   textwindowtype = $text_view->get_window_type ($window)
232       ·   $window (Gtk2::Gdk::Window)
233
234   wrapmode = $text_view->get_wrap_mode
235   $text_view->set_wrap_mode ($wrap_mode)
236       ·   $wrap_mode (Gtk2::WrapMode)
237

PROPERTIES

239       'accepts-tab' (boolean : default true : readable / writable / private)
240           Whether Tab will result in a tab character being entered
241
242       'buffer' (Gtk2::TextBuffer : default undef : readable / writable /
243       private)
244           The buffer which is displayed
245
246       'cursor-visible' (boolean : default true : readable / writable /
247       private)
248           If the insertion cursor is shown
249
250       'editable' (boolean : default true : readable / writable / private)
251           Whether the text can be modified by the user
252
253       'im-module' (string : default undef : readable / writable / private)
254           Which IM module should be used
255
256       'indent' (integer : default 0 : readable / writable / private)
257           Amount to indent the paragraph, in pixels
258
259       'justification' (Gtk2::Justification : default "left" : readable /
260       writable / private)
261           Left, right, or center justification
262
263       'left-margin' (integer : default 0 : readable / writable / private)
264           Width of the left margin in pixels
265
266       'overwrite' (boolean : default false : readable / writable / private)
267           Whether entered text overwrites existing contents
268
269       'pixels-above-lines' (integer : default 0 : readable / writable /
270       private)
271           Pixels of blank space above paragraphs
272
273       'pixels-below-lines' (integer : default 0 : readable / writable /
274       private)
275           Pixels of blank space below paragraphs
276
277       'pixels-inside-wrap' (integer : default 0 : readable / writable /
278       private)
279           Pixels of blank space between wrapped lines in a paragraph
280
281       'right-margin' (integer : default 0 : readable / writable / private)
282           Width of the right margin in pixels
283
284       'tabs' (Pango::TabArray : default undef : readable / writable /
285       private)
286           Custom tabs for this text
287
288       'wrap-mode' (Gtk2::WrapMode : default "none" : readable / writable /
289       private)
290           Whether to wrap lines never, at word boundaries, or at character
291           boundaries
292

STYLE PROPERTIES

294       'error-underline-color' (Gtk2::Gdk::Color : default undef : readable /
295       private)
296           Color with which to draw error-indication underlines
297

SIGNALS

299       backspace (Gtk2::TextView)
300       copy-clipboard (Gtk2::TextView)
301       cut-clipboard (Gtk2::TextView)
302       delete-from-cursor (Gtk2::TextView, Gtk2::DeleteType, integer)
303       insert-at-cursor (Gtk2::TextView, string)
304       move-cursor (Gtk2::TextView, Gtk2::MovementStep, integer, boolean)
305       move-viewport (Gtk2::TextView, GtkScrollStep, integer)
306       page-horizontally (Gtk2::TextView, integer, boolean)
307       paste-clipboard (Gtk2::TextView)
308       populate-popup (Gtk2::TextView, Gtk2::Menu)
309       preedit-changed (Gtk2::TextView, string)
310       select-all (Gtk2::TextView, boolean)
311       set-anchor (Gtk2::TextView)
312       set-scroll-adjustments (Gtk2::TextView, Gtk2::Adjustment,
313       Gtk2::Adjustment)
314       toggle-cursor-visible (Gtk2::TextView)
315       toggle-overwrite (Gtk2::TextView)
316

ENUMS AND FLAGS

318   enum Gtk2::DeleteType
319       ·   'chars' / 'GTK_DELETE_CHARS'
320
321       ·   'word-ends' / 'GTK_DELETE_WORD_ENDS'
322
323       ·   'words' / 'GTK_DELETE_WORDS'
324
325       ·   'display-lines' / 'GTK_DELETE_DISPLAY_LINES'
326
327       ·   'display-line-ends' / 'GTK_DELETE_DISPLAY_LINE_ENDS'
328
329       ·   'paragraph-ends' / 'GTK_DELETE_PARAGRAPH_ENDS'
330
331       ·   'paragraphs' / 'GTK_DELETE_PARAGRAPHS'
332
333       ·   'whitespace' / 'GTK_DELETE_WHITESPACE'
334
335   enum Gtk2::Justification
336       ·   'left' / 'GTK_JUSTIFY_LEFT'
337
338       ·   'right' / 'GTK_JUSTIFY_RIGHT'
339
340       ·   'center' / 'GTK_JUSTIFY_CENTER'
341
342       ·   'fill' / 'GTK_JUSTIFY_FILL'
343
344   enum Gtk2::MovementStep
345       ·   'logical-positions' / 'GTK_MOVEMENT_LOGICAL_POSITIONS'
346
347       ·   'visual-positions' / 'GTK_MOVEMENT_VISUAL_POSITIONS'
348
349       ·   'words' / 'GTK_MOVEMENT_WORDS'
350
351       ·   'display-lines' / 'GTK_MOVEMENT_DISPLAY_LINES'
352
353       ·   'display-line-ends' / 'GTK_MOVEMENT_DISPLAY_LINE_ENDS'
354
355       ·   'paragraphs' / 'GTK_MOVEMENT_PARAGRAPHS'
356
357       ·   'paragraph-ends' / 'GTK_MOVEMENT_PARAGRAPH_ENDS'
358
359       ·   'pages' / 'GTK_MOVEMENT_PAGES'
360
361       ·   'buffer-ends' / 'GTK_MOVEMENT_BUFFER_ENDS'
362
363       ·   'horizontal-pages' / 'GTK_MOVEMENT_HORIZONTAL_PAGES'
364
365   enum Gtk2::TextWindowType
366       ·   'private' / 'GTK_TEXT_WINDOW_PRIVATE'
367
368       ·   'widget' / 'GTK_TEXT_WINDOW_WIDGET'
369
370       ·   'text' / 'GTK_TEXT_WINDOW_TEXT'
371
372       ·   'left' / 'GTK_TEXT_WINDOW_LEFT'
373
374       ·   'right' / 'GTK_TEXT_WINDOW_RIGHT'
375
376       ·   'top' / 'GTK_TEXT_WINDOW_TOP'
377
378       ·   'bottom' / 'GTK_TEXT_WINDOW_BOTTOM'
379
380   enum Gtk2::WrapMode
381       ·   'none' / 'GTK_WRAP_NONE'
382
383       ·   'char' / 'GTK_WRAP_CHAR'
384
385       ·   'word' / 'GTK_WRAP_WORD'
386
387       ·   'word-char' / 'GTK_WRAP_WORD_CHAR'
388
389   enum GtkScrollStep
390       ·   'steps' / 'GTK_SCROLL_STEPS'
391
392       ·   'pages' / 'GTK_SCROLL_PAGES'
393
394       ·   'ends' / 'GTK_SCROLL_ENDS'
395
396       ·   'horizontal-steps' / 'GTK_SCROLL_HORIZONTAL_STEPS'
397
398       ·   'horizontal-pages' / 'GTK_SCROLL_HORIZONTAL_PAGES'
399
400       ·   'horizontal-ends' / 'GTK_SCROLL_HORIZONTAL_ENDS'
401

SEE ALSO

403       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
404       Gtk2::Container
405
407       Copyright (C) 2003-2011 by the gtk2-perl team.
408
409       This software is licensed under the LGPL.  See Gtk2 for a full notice.
410
411
412
413perl v5.30.0                      2019-07-26                 Gtk2::TextView(3)
Impressum