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

NAME

6       Gtk2::TextView
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

METHODS

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

PROPERTIES

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

SIGNALS

295       move-focus (Gtk2::TextView, Gtk2::DirectionType)
296       set-scroll-adjustments (Gtk2::TextView, Gtk2::Adjustment, Gtk2::Adjust‐
297       ment)
298       select-all (Gtk2::TextView, boolean)
299       move-cursor (Gtk2::TextView, Gtk2::MovementStep, integer, boolean)
300       populate-popup (Gtk2::TextView, Gtk2::Menu)
301       insert-at-cursor (Gtk2::TextView, string)
302       delete-from-cursor (Gtk2::TextView, Gtk2::DeleteType, integer)
303       backspace (Gtk2::TextView)
304       cut-clipboard (Gtk2::TextView)
305       copy-clipboard (Gtk2::TextView)
306       paste-clipboard (Gtk2::TextView)
307       toggle-overwrite (Gtk2::TextView)
308       page-horizontally (Gtk2::TextView, integer, boolean)
309       move-viewport (Gtk2::TextView, GtkScrollStep, integer)
310       set-anchor (Gtk2::TextView)
311

ENUMS AND FLAGS

313       enum Gtk2::DeleteType
314
315       * 'chars' / 'GTK_DELETE_CHARS'
316       * 'word-ends' / 'GTK_DELETE_WORD_ENDS'
317       * 'words' / 'GTK_DELETE_WORDS'
318       * 'display-lines' / 'GTK_DELETE_DISPLAY_LINES'
319       * 'display-line-ends' / 'GTK_DELETE_DISPLAY_LINE_ENDS'
320       * 'paragraph-ends' / 'GTK_DELETE_PARAGRAPH_ENDS'
321       * 'paragraphs' / 'GTK_DELETE_PARAGRAPHS'
322       * 'whitespace' / 'GTK_DELETE_WHITESPACE'
323
324       enum Gtk2::DirectionType
325
326       * 'tab-forward' / 'GTK_DIR_TAB_FORWARD'
327       * 'tab-backward' / 'GTK_DIR_TAB_BACKWARD'
328       * 'up' / 'GTK_DIR_UP'
329       * 'down' / 'GTK_DIR_DOWN'
330       * 'left' / 'GTK_DIR_LEFT'
331       * 'right' / 'GTK_DIR_RIGHT'
332
333       enum Gtk2::Justification
334
335       * 'left' / 'GTK_JUSTIFY_LEFT'
336       * 'right' / 'GTK_JUSTIFY_RIGHT'
337       * 'center' / 'GTK_JUSTIFY_CENTER'
338       * 'fill' / 'GTK_JUSTIFY_FILL'
339
340       enum Gtk2::MovementStep
341
342       * 'logical-positions' / 'GTK_MOVEMENT_LOGICAL_POSITIONS'
343       * 'visual-positions' / 'GTK_MOVEMENT_VISUAL_POSITIONS'
344       * 'words' / 'GTK_MOVEMENT_WORDS'
345       * 'display-lines' / 'GTK_MOVEMENT_DISPLAY_LINES'
346       * 'display-line-ends' / 'GTK_MOVEMENT_DISPLAY_LINE_ENDS'
347       * 'paragraphs' / 'GTK_MOVEMENT_PARAGRAPHS'
348       * 'paragraph-ends' / 'GTK_MOVEMENT_PARAGRAPH_ENDS'
349       * 'pages' / 'GTK_MOVEMENT_PAGES'
350       * 'buffer-ends' / 'GTK_MOVEMENT_BUFFER_ENDS'
351       * 'horizontal-pages' / 'GTK_MOVEMENT_HORIZONTAL_PAGES'
352
353       enum Gtk2::TextWindowType
354
355       * 'private' / 'GTK_TEXT_WINDOW_PRIVATE'
356       * 'widget' / 'GTK_TEXT_WINDOW_WIDGET'
357       * 'text' / 'GTK_TEXT_WINDOW_TEXT'
358       * 'left' / 'GTK_TEXT_WINDOW_LEFT'
359       * 'right' / 'GTK_TEXT_WINDOW_RIGHT'
360       * 'top' / 'GTK_TEXT_WINDOW_TOP'
361       * 'bottom' / 'GTK_TEXT_WINDOW_BOTTOM'
362
363       enum Gtk2::WrapMode
364
365       * 'none' / 'GTK_WRAP_NONE'
366       * 'char' / 'GTK_WRAP_CHAR'
367       * 'word' / 'GTK_WRAP_WORD'
368       * 'word-char' / 'GTK_WRAP_WORD_CHAR'
369
370       enum GtkScrollStep
371
372       * 'steps' / 'GTK_SCROLL_STEPS'
373       * 'pages' / 'GTK_SCROLL_PAGES'
374       * 'ends' / 'GTK_SCROLL_ENDS'
375       * 'horizontal-steps' / 'GTK_SCROLL_HORIZONTAL_STEPS'
376       * 'horizontal-pages' / 'GTK_SCROLL_HORIZONTAL_PAGES'
377       * 'horizontal-ends' / 'GTK_SCROLL_HORIZONTAL_ENDS'
378

SEE ALSO

380       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
381       Gtk2::Container
382
384       Copyright (C) 2003-2007 by the gtk2-perl team.
385
386       This software is licensed under the LGPL.  See Gtk2 for a full notice.
387
388
389
390perl v5.8.8                       2007-03-18                 Gtk2::TextView(3)
Impressum