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

STYLE PROPERTIES

301       'error-underline-color' (Gtk2::Gdk::Color : default undef : readable /
302       private / static-nick / static-blurb)
303           Color with which to draw error-indication underlines
304

SIGNALS

306       backspace (Gtk2::TextView)
307       copy-clipboard (Gtk2::TextView)
308       cut-clipboard (Gtk2::TextView)
309       delete-from-cursor (Gtk2::TextView, Gtk2::DeleteType, integer)
310       insert-at-cursor (Gtk2::TextView, string)
311       move-cursor (Gtk2::TextView, Gtk2::MovementStep, integer, boolean)
312       move-viewport (Gtk2::TextView, GtkScrollStep, integer)
313       page-horizontally (Gtk2::TextView, integer, boolean)
314       paste-clipboard (Gtk2::TextView)
315       populate-popup (Gtk2::TextView, Gtk2::Menu)
316       preedit-changed (Gtk2::TextView, string)
317       select-all (Gtk2::TextView, boolean)
318       set-anchor (Gtk2::TextView)
319       set-scroll-adjustments (Gtk2::TextView, Gtk2::Adjustment,
320       Gtk2::Adjustment)
321       toggle-cursor-visible (Gtk2::TextView)
322       toggle-overwrite (Gtk2::TextView)
323

ENUMS AND FLAGS

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

SEE ALSO

410       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
411       Gtk2::Container
412
414       Copyright (C) 2003-2011 by the gtk2-perl team.
415
416       This software is licensed under the LGPL.  See Gtk2 for a full notice.
417
418
419
420perl v5.34.0                      2021-07-22                 Gtk2::TextView(3)
Impressum