1Gtk2::TextBuffer(3) User Contributed Perl Documentation Gtk2::TextBuffer(3)
2
3
4
6 Gtk2::TextBuffer
7
9 Glib::Object
10 +----Gtk2::TextBuffer
11
13 textbuffer = Gtk2::TextBuffer->new ($tagtable=undef)
14
15 * $tagtable (Gtk2::TextTagTable or undef)
16
17 $buffer->add_selection_clipboard ($clipboard)
18
19 * $clipboard (Gtk2::Clipboard)
20
21 $buffer->apply_tag ($tag, $start, $end)
22
23 * $tag (Gtk2::TextTag)
24 * $start (Gtk2::TextIter)
25 * $end (Gtk2::TextIter)
26
27 $buffer->apply_tag_by_name ($name, $start, $end)
28
29 * $name (string)
30 * $start (Gtk2::TextIter)
31 * $end (Gtk2::TextIter)
32
33 boolean = $buffer->backspace ($iter, $interactive, $default_editable)
34
35 * $iter (Gtk2::TextIter)
36 * $interactive (boolean)
37 * $default_editable (boolean)
38
39 $buffer->begin_user_action
40
41 (start, end) = $buffer->get_bounds
42
43 Retrieves the first and last iterators in the buffer, i.e. the
44 entire buffer lies within the range (start,end).
45
46 integer = $buffer->get_char_count
47
48 $buffer->copy_clipboard ($clipboard)
49
50 * $clipboard (Gtk2::Clipboard)
51
52 targetlist = $buffer->get_copy_target_list
53
54 textchildanchor = $buffer->create_child_anchor ($iter)
55
56 * $iter (Gtk2::TextIter)
57
58 textmark = $buffer->create_mark ($mark_name, $where, $left_gravity)
59
60 * $mark_name (string or undef)
61 * $where (Gtk2::TextIter)
62 * $left_gravity (boolean)
63
64 texttag = $buffer->create_tag ($tag_name, $property_name1, $prop‐
65 erty_value1, ...)
66
67 * $tag_name (string or undef)
68 * $property_name1 (string) the first property name
69 * $property_value1 (string) the first property value
70 * ... (list) pairs of names and values
71
72 $buffer->cut_clipboard ($clipboard, $default_editable)
73
74 * $clipboard (Gtk2::Clipboard)
75 * $default_editable (boolean)
76
77 $buffer->delete ($start, $end)
78
79 * $start (Gtk2::TextIter)
80 * $end (Gtk2::TextIter)
81
82 boolean = $buffer->delete_interactive ($start_iter, $end_iter,
83 $default_editable)
84
85 * $start_iter (Gtk2::TextIter)
86 * $end_iter (Gtk2::TextIter)
87 * $default_editable (boolean)
88
89 $buffer->delete_mark ($mark)
90
91 * $mark (Gtk2::TextMark)
92
93 $buffer->delete_mark_by_name ($name)
94
95 * $name (string)
96
97 boolean = $buffer->delete_selection ($interactive, $default_editable)
98
99 * $interactive (boolean)
100 * $default_editable (boolean)
101
102 $register_buffer->deserialize ($content_buffer, $format, $iter, $data)
103
104 * $content_buffer (Gtk2::TextBuffer)
105 * $format (Gtk2::Gdk::Atom)
106 * $iter (Gtk2::TextIter)
107 * $data (scalar)
108
109 May croak with a Glib::Error in $@ on failure.
110
111 list = $buffer->get_deserialize_formats
112
113 boolean = $buffer->deserialize_get_can_create_tags ($format)
114
115 * $format (Gtk2::Gdk::Atom)
116
117 $buffer->deserialize_set_can_create_tags ($format, $can_create_tags)
118
119 * $format (Gtk2::Gdk::Atom)
120 * $can_create_tags (boolean)
121
122 textiter = $buffer->get_end_iter
123
124 $buffer->end_user_action
125
126 boolean = $buffer->get_has_selection
127
128 $buffer->insert ($iter, $text)
129
130 * $iter (Gtk2::TextIter)
131 * $text (string)
132
133 $buffer->insert_at_cursor ($text)
134
135 * $text (string)
136
137 $buffer->insert_child_anchor ($iter, $anchor)
138
139 * $iter (Gtk2::TextIter)
140 * $anchor (Gtk2::TextChildAnchor)
141
142 textmark = $buffer->get_insert
143
144 boolean = $buffer->insert_interactive ($iter, $text, $default_editable)
145
146 * $iter (Gtk2::TextIter)
147 * $text (string)
148 * $default_editable (boolean)
149
150 boolean = $buffer->insert_interactive_at_cursor ($text,
151 $default_editable)
152
153 * $text (string)
154 * $default_editable (boolean)
155
156 $buffer->insert_pixbuf ($iter, $pixbuf)
157
158 * $iter (Gtk2::TextIter)
159 * $pixbuf (Gtk2::Gdk::Pixbuf)
160
161 $buffer->insert_range ($iter, $start, $end)
162
163 * $iter (Gtk2::TextIter)
164 * $start (Gtk2::TextIter)
165 * $end (Gtk2::TextIter)
166
167 boolean = $buffer->insert_range_interactive ($iter, $start, $end,
168 $default_editable)
169
170 * $iter (Gtk2::TextIter)
171 * $start (Gtk2::TextIter)
172 * $end (Gtk2::TextIter)
173 * $default_editable (boolean)
174
175 $buffer->insert_with_tags ($iter, $text, ...)
176
177 * $iter (Gtk2::TextIter)
178 * $text (string)
179 * ... (list) of Gtk2::TextTag's
180
181 $buffer->insert_with_tags_by_name ($iter, $text, ...)
182
183 * $iter (Gtk2::TextIter)
184 * $text (string)
185 * ... (list) of strings, tag names
186
187 textiter = $buffer->get_iter_at_child_anchor ($anchor)
188
189 * $anchor (Gtk2::TextChildAnchor)
190
191 textiter = $buffer->get_iter_at_line ($line_number)
192
193 * $line_number (integer)
194
195 textiter = $buffer->get_iter_at_line_index ($line_number, $byte_index)
196
197 * $line_number (integer)
198 * $byte_index (integer)
199
200 textiter = $buffer->get_iter_at_line_offset ($line_number, $char_off‐
201 set)
202
203 * $line_number (integer)
204 * $char_offset (integer)
205
206 textiter = $buffer->get_iter_at_mark ($mark)
207
208 * $mark (Gtk2::TextMark)
209
210 textiter = $buffer->get_iter_at_offset ($char_offset)
211
212 * $char_offset (integer)
213
214 integer = $buffer->get_line_count
215
216 textmark or undef = $buffer->get_mark ($name)
217
218 * $name (string)
219
220 boolean = $buffer->get_modified
221
222 $buffer->set_modified ($setting)
223
224 * $setting (boolean)
225
226 $buffer->move_mark ($mark, $where)
227
228 * $mark (Gtk2::TextMark)
229 * $where (Gtk2::TextIter)
230
231 $buffer->move_mark_by_name ($name, $where)
232
233 * $name (string)
234 * $where (Gtk2::TextIter)
235
236 $buffer->paste_clipboard ($clipboard, $override_location,
237 $default_editable)
238
239 * $clipboard (Gtk2::Clipboard)
240 * $override_location (Gtk2::TextIter or undef)
241 * $default_editable (boolean)
242
243 targetlist = $buffer->get_paste_target_list
244
245 $buffer->place_cursor ($where)
246
247 * $where (Gtk2::TextIter)
248
249 atom = $buffer->register_deserialize_format ($mime_type, $function,
250 $user_data=undef)
251
252 * $mime_type (string)
253 * $function (scalar)
254 * $user_data (scalar)
255
256 atom = $buffer->register_deserialize_tagset ($tagset_name)
257
258 * $tagset_name (string or undef)
259
260 atom = $buffer->register_serialize_format ($mime_type, $function,
261 $user_data=undef)
262
263 * $mime_type (string)
264 * $function (scalar)
265 * $user_data (scalar)
266
267 atom = $buffer->register_serialize_tagset ($tagset_name)
268
269 * $tagset_name (string or undef)
270
271 $buffer->remove_all_tags ($start, $end)
272
273 * $start (Gtk2::TextIter)
274 * $end (Gtk2::TextIter)
275
276 $buffer->remove_selection_clipboard ($clipboard)
277
278 * $clipboard (Gtk2::Clipboard)
279
280 $buffer->remove_tag ($tag, $start, $end)
281
282 * $tag (Gtk2::TextTag)
283 * $start (Gtk2::TextIter)
284 * $end (Gtk2::TextIter)
285
286 $buffer->remove_tag_by_name ($name, $start, $end)
287
288 * $name (string)
289 * $start (Gtk2::TextIter)
290 * $end (Gtk2::TextIter)
291
292 $buffer->select_range ($ins, $bound)
293
294 * $ins (Gtk2::TextIter)
295 * $bound (Gtk2::TextIter)
296
297 textmark = $buffer->get_selection_bound
298
299 (start, end) = $buffer->get_selection_bounds
300
301 Returns start and end if some text is selected, empty otherwise;
302 places the bounds of the selection in start and end (if the selec‐
303 tion has length 0, then start and end are filled in with the same
304 value). start and end will be in ascending order.
305
306 scalar = $register_buffer->serialize ($content_buffer, $format, $start,
307 $end)
308
309 * $content_buffer (Gtk2::TextBuffer)
310 * $format (Gtk2::Gdk::Atom)
311 * $start (Gtk2::TextIter)
312 * $end (Gtk2::TextIter)
313
314 list = $buffer->get_serialize_formats
315
316 string = $buffer->get_slice ($start, $end, $include_hidden_chars)
317
318 * $start (Gtk2::TextIter)
319 * $end (Gtk2::TextIter)
320 * $include_hidden_chars (boolean)
321
322 textiter = $buffer->get_start_iter
323
324 texttagtable = $buffer->get_tag_table
325
326 string = $buffer->get_text ($start, $end, $include_hidden_chars)
327
328 * $start (Gtk2::TextIter)
329 * $end (Gtk2::TextIter)
330 * $include_hidden_chars (boolean)
331
332 $buffer->set_text ($text)
333
334 * $text (string)
335
336 $buffer->unregister_deserialize_format ($format)
337
338 * $format (Gtk2::Gdk::Atom)
339
340 $buffer->unregister_serialize_format ($format)
341
342 * $format (Gtk2::Gdk::Atom)
343
345 'copy-target-list' (Gtk2::TargetList : readable / private)
346 The list of targets this buffer supports for clipboard copying and
347 DND source
348
349 'cursor-position' (integer : readable / private)
350 The position of the insert mark (as offset from the beginning of
351 the buffer)
352
353 'has-selection' (boolean : readable / private)
354 Whether the buffer has some text currently selected
355
356 'paste-target-list' (Gtk2::TargetList : readable / private)
357 The list of targets this buffer supports for clipboard pasting and
358 DND destination
359
360 'tag-table' (Gtk2::TextTagTable : readable / writable / construct-only
361 / private)
362 Text Tag Table
363
364 'text' (string : readable / writable / private)
365 Current text of the buffer
366
368 changed (Gtk2::TextBuffer)
369 insert-text (Gtk2::TextBuffer, Gtk2::TextIter, string, integer)
370 insert-pixbuf (Gtk2::TextBuffer, Gtk2::TextIter, Gtk2::Gdk::Pixbuf)
371 insert-child-anchor (Gtk2::TextBuffer, Gtk2::TextIter,
372 Gtk2::TextChildAnchor)
373 delete-range (Gtk2::TextBuffer, Gtk2::TextIter, Gtk2::TextIter)
374 modified-changed (Gtk2::TextBuffer)
375 mark-set (Gtk2::TextBuffer, Gtk2::TextIter, Gtk2::TextMark)
376 mark-deleted (Gtk2::TextBuffer, Gtk2::TextMark)
377 apply-tag (Gtk2::TextBuffer, Gtk2::TextTag, Gtk2::TextIter, Gtk2::Tex‐
378 tIter)
379 remove-tag (Gtk2::TextBuffer, Gtk2::TextTag, Gtk2::TextIter, Gtk2::Tex‐
380 tIter)
381 begin-user-action (Gtk2::TextBuffer)
382 end-user-action (Gtk2::TextBuffer)
383
385 Gtk2, Glib::Object
386
388 Copyright (C) 2003-2007 by the gtk2-perl team.
389
390 This software is licensed under the LGPL. See Gtk2 for a full notice.
391
392
393
394perl v5.8.8 2007-03-18 Gtk2::TextBuffer(3)