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