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         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   integer = $text_view->get_indent
89   $text_view->set_indent ($indent)
90           ·   $indent (integer)
91
92   textiter = $text_view->get_iter_at_location ($x, $y)
93           ·   $x (integer)
94
95           ·   $y (integer)
96
97   ($iter, $trailing) = $text_view->get_iter_at_position ($x, $y)
98   $iter = $text_view->get_iter_at_position ($x, $y)
99           ·   $x (integer)
100
101           ·   $y (integer)
102
103           Retrieves the iterator pointing to the character at buffer
104           coordinates x and y.  Buffer coordinates are coordinates for the
105           entire buffer, not just the currently-displayed portion.  If you
106           have coordinates from an event, you have to convert those to buffer
107           coordinates with "$text_view->window_to_buffer_coords()".
108
109           Note that this is different from
110           "$text_view->get_iter_at_location()", which returns cursor
111           locations, i.e. positions between characters.
112
113           Since: gtk+ 2.6
114
115   rectangle = $text_view->get_iter_location ($iter)
116           ·   $iter (Gtk2::TextIter)
117
118   justification = $text_view->get_justification
119   $text_view->set_justification ($justification)
120           ·   $justification (Gtk2::Justification)
121
122   integer = $text_view->get_left_margin
123   $text_view->set_left_margin ($left_margin)
124           ·   $left_margin (integer)
125
126   (target_iter, line_top) = $text_view->get_line_at_y ($y)
127           ·   $y (integer)
128
129   (y, height) = $text_view->get_line_yrange ($iter)
130           ·   $iter (Gtk2::TextIter)
131
132   $text_view->move_child ($child, $xpos, $ypos)
133           ·   $child (Gtk2::Widget)
134
135           ·   $xpos (integer)
136
137           ·   $ypos (integer)
138
139   boolean = $text_view->move_mark_onscreen ($mark)
140           ·   $mark (Gtk2::TextMark)
141
142   boolean = $text_view->move_visually ($iter, $count)
143           ·   $iter (Gtk2::TextIter)
144
145           ·   $count (integer)
146
147   boolean = $text_view->get_overwrite
148           Since: gtk+ 2.4
149
150   $text_view->set_overwrite ($overwrite)
151           ·   $overwrite (boolean)
152
153           Since: gtk+ 2.4
154
155   integer = $text_view->get_pixels_above_lines
156   $text_view->set_pixels_above_lines ($pixels_above_lines)
157           ·   $pixels_above_lines (integer)
158
159   integer = $text_view->get_pixels_below_lines
160   $text_view->set_pixels_below_lines ($pixels_below_lines)
161           ·   $pixels_below_lines (integer)
162
163   integer = $text_view->get_pixels_inside_wrap
164   $text_view->set_pixels_inside_wrap ($pixels_inside_wrap)
165           ·   $pixels_inside_wrap (integer)
166
167   boolean = $text_view->place_cursor_onscreen
168   integer = $text_view->get_right_margin
169   $text_view->set_right_margin ($right_margin)
170           ·   $right_margin (integer)
171
172   $text_view->scroll_mark_onscreen ($mark)
173           ·   $mark (Gtk2::TextMark)
174
175   boolean = $text_view->scroll_to_iter ($iter, $within_margin, $use_align,
176       $xalign, $yalign)
177           ·   $iter (Gtk2::TextIter)
178
179           ·   $within_margin (double)
180
181           ·   $use_align (boolean)
182
183           ·   $xalign (double)
184
185           ·   $yalign (double)
186
187   $text_view->scroll_to_mark ($mark, $within_margin, $use_align, $xalign,
188       $yalign)
189           ·   $mark (Gtk2::TextMark)
190
191           ·   $within_margin (double)
192
193           ·   $use_align (boolean)
194
195           ·   $xalign (double)
196
197           ·   $yalign (double)
198
199   boolean = $text_view->starts_display_line ($iter)
200           ·   $iter (Gtk2::TextIter)
201
202   tabarray = $text_view->get_tabs
203   $text_view->set_tabs ($tabs)
204           ·   $tabs (Gtk2::Pango::TabArray)
205
206   rectangle = $text_view->get_visible_rect
207   window = $text_view->get_window ($win)
208           ·   $win (Gtk2::TextWindowType)
209
210   (buffer_x, buffer_y) = $text_view->window_to_buffer_coords ($win,
211       $window_x, $window_y)
212           ·   $win (Gtk2::TextWindowType)
213
214           ·   $window_x (integer)
215
216           ·   $window_y (integer)
217
218   textwindowtype = $text_view->get_window_type ($window)
219           ·   $window (Gtk2::Gdk::Window)
220
221   wrapmode = $text_view->get_wrap_mode
222   $text_view->set_wrap_mode ($wrap_mode)
223           ·   $wrap_mode (Gtk2::WrapMode)
224

PROPERTIES

226       'accepts-tab' (boolean : readable / writable / private)
227           Whether Tab will result in a tab character being entered
228
229       'buffer' (Gtk2::TextBuffer : readable / writable / private)
230           The buffer which is displayed
231
232       'cursor-visible' (boolean : readable / writable / private)
233           If the insertion cursor is shown
234
235       'editable' (boolean : readable / writable / private)
236           Whether the text can be modified by the user
237
238       'im-module' (string : readable / writable / private)
239           Which IM module should be used
240
241       'indent' (integer : readable / writable / private)
242           Amount to indent the paragraph, in pixels
243
244       'justification' (Gtk2::Justification : readable / writable / private)
245           Left, right, or center justification
246
247       'left-margin' (integer : readable / writable / private)
248           Width of the left margin in pixels
249
250       'overwrite' (boolean : readable / writable / private)
251           Whether entered text overwrites existing contents
252
253       'pixels-above-lines' (integer : readable / writable / private)
254           Pixels of blank space above paragraphs
255
256       'pixels-below-lines' (integer : readable / writable / private)
257           Pixels of blank space below paragraphs
258
259       'pixels-inside-wrap' (integer : readable / writable / private)
260           Pixels of blank space between wrapped lines in a paragraph
261
262       'right-margin' (integer : readable / writable / private)
263           Width of the right margin in pixels
264
265       'tabs' (Gtk2::Pango::TabArray : readable / writable / private)
266           Custom tabs for this text
267
268       'wrap-mode' (Gtk2::WrapMode : readable / writable / private)
269           Whether to wrap lines never, at word boundaries, or at character
270           boundaries
271

SIGNALS

273       preedit-changed (Gtk2::TextView, string)
274       set-scroll-adjustments (Gtk2::TextView, Gtk2::Adjustment,
275       Gtk2::Adjustment)
276       select-all (Gtk2::TextView, boolean)
277       move-cursor (Gtk2::TextView, Gtk2::MovementStep, integer, boolean)
278       page-horizontally (Gtk2::TextView, integer, boolean)
279       move-viewport (Gtk2::TextView, GtkScrollStep, integer)
280       set-anchor (Gtk2::TextView)
281       insert-at-cursor (Gtk2::TextView, string)
282       delete-from-cursor (Gtk2::TextView, Gtk2::DeleteType, integer)
283       backspace (Gtk2::TextView)
284       cut-clipboard (Gtk2::TextView)
285       copy-clipboard (Gtk2::TextView)
286       paste-clipboard (Gtk2::TextView)
287       toggle-overwrite (Gtk2::TextView)
288       populate-popup (Gtk2::TextView, Gtk2::Menu)
289       toggle-cursor-visible (Gtk2::TextView)
290

ENUMS AND FLAGS

292   enum Gtk2::DeleteType
293       ·   'chars' / 'GTK_DELETE_CHARS'
294
295       ·   'word-ends' / 'GTK_DELETE_WORD_ENDS'
296
297       ·   'words' / 'GTK_DELETE_WORDS'
298
299       ·   'display-lines' / 'GTK_DELETE_DISPLAY_LINES'
300
301       ·   'display-line-ends' / 'GTK_DELETE_DISPLAY_LINE_ENDS'
302
303       ·   'paragraph-ends' / 'GTK_DELETE_PARAGRAPH_ENDS'
304
305       ·   'paragraphs' / 'GTK_DELETE_PARAGRAPHS'
306
307       ·   'whitespace' / 'GTK_DELETE_WHITESPACE'
308
309   enum Gtk2::Justification
310       ·   'left' / 'GTK_JUSTIFY_LEFT'
311
312       ·   'right' / 'GTK_JUSTIFY_RIGHT'
313
314       ·   'center' / 'GTK_JUSTIFY_CENTER'
315
316       ·   'fill' / 'GTK_JUSTIFY_FILL'
317
318   enum Gtk2::MovementStep
319       ·   'logical-positions' / 'GTK_MOVEMENT_LOGICAL_POSITIONS'
320
321       ·   'visual-positions' / 'GTK_MOVEMENT_VISUAL_POSITIONS'
322
323       ·   'words' / 'GTK_MOVEMENT_WORDS'
324
325       ·   'display-lines' / 'GTK_MOVEMENT_DISPLAY_LINES'
326
327       ·   'display-line-ends' / 'GTK_MOVEMENT_DISPLAY_LINE_ENDS'
328
329       ·   'paragraphs' / 'GTK_MOVEMENT_PARAGRAPHS'
330
331       ·   'paragraph-ends' / 'GTK_MOVEMENT_PARAGRAPH_ENDS'
332
333       ·   'pages' / 'GTK_MOVEMENT_PAGES'
334
335       ·   'buffer-ends' / 'GTK_MOVEMENT_BUFFER_ENDS'
336
337       ·   'horizontal-pages' / 'GTK_MOVEMENT_HORIZONTAL_PAGES'
338
339   enum Gtk2::TextWindowType
340       ·   'private' / 'GTK_TEXT_WINDOW_PRIVATE'
341
342       ·   'widget' / 'GTK_TEXT_WINDOW_WIDGET'
343
344       ·   'text' / 'GTK_TEXT_WINDOW_TEXT'
345
346       ·   'left' / 'GTK_TEXT_WINDOW_LEFT'
347
348       ·   'right' / 'GTK_TEXT_WINDOW_RIGHT'
349
350       ·   'top' / 'GTK_TEXT_WINDOW_TOP'
351
352       ·   'bottom' / 'GTK_TEXT_WINDOW_BOTTOM'
353
354   enum Gtk2::WrapMode
355       ·   'none' / 'GTK_WRAP_NONE'
356
357       ·   'char' / 'GTK_WRAP_CHAR'
358
359       ·   'word' / 'GTK_WRAP_WORD'
360
361       ·   'word-char' / 'GTK_WRAP_WORD_CHAR'
362
363   enum GtkScrollStep
364       ·   'steps' / 'GTK_SCROLL_STEPS'
365
366       ·   'pages' / 'GTK_SCROLL_PAGES'
367
368       ·   'ends' / 'GTK_SCROLL_ENDS'
369
370       ·   'horizontal-steps' / 'GTK_SCROLL_HORIZONTAL_STEPS'
371
372       ·   'horizontal-pages' / 'GTK_SCROLL_HORIZONTAL_PAGES'
373
374       ·   'horizontal-ends' / 'GTK_SCROLL_HORIZONTAL_ENDS'
375

SEE ALSO

377       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
378       Gtk2::Container
379
381       Copyright (C) 2003-2008 by the gtk2-perl team.
382
383       This software is licensed under the LGPL.  See Gtk2 for a full notice.
384
385
386
387perl v5.12.0                      2010-05-02                 Gtk2::TextView(3)
Impressum