1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Stores attributed text for display in a GtkTextView
7 <!-- ##### SECTION Long_Description ##### -->
10 You may wish to begin by reading the <link linkend="TextWidget">text widget
11 conceptual overview</link> which gives an overview of all the objects and data
12 types related to the text widget and how they work together.
19 <!-- ##### SECTION See_Also ##### -->
21 #GtkTextView, #GtkTextIter, #GtkTextMark
24 <!-- ##### SECTION Stability_Level ##### -->
27 <!-- ##### SECTION Image ##### -->
30 <!-- ##### STRUCT GtkTextBuffer ##### -->
36 <!-- ##### SIGNAL GtkTextBuffer::apply-tag ##### -->
41 @textbuffer: the object which received the signal.
46 <!-- ##### SIGNAL GtkTextBuffer::begin-user-action ##### -->
51 @textbuffer: the object which received the signal.
53 <!-- ##### SIGNAL GtkTextBuffer::changed ##### -->
58 @textbuffer: the object which received the signal.
60 <!-- ##### SIGNAL GtkTextBuffer::delete-range ##### -->
65 @textbuffer: the object which received the signal.
69 <!-- ##### SIGNAL GtkTextBuffer::end-user-action ##### -->
74 @textbuffer: the object which received the signal.
76 <!-- ##### SIGNAL GtkTextBuffer::insert-child-anchor ##### -->
81 @textbuffer: the object which received the signal.
85 <!-- ##### SIGNAL GtkTextBuffer::insert-pixbuf ##### -->
90 @textbuffer: the object which received the signal.
94 <!-- ##### SIGNAL GtkTextBuffer::insert-text ##### -->
99 @textbuffer: the object which received the signal.
104 <!-- ##### SIGNAL GtkTextBuffer::mark-deleted ##### -->
109 @textbuffer: the object which received the signal.
112 <!-- ##### SIGNAL GtkTextBuffer::mark-set ##### -->
117 @textbuffer: the object which received the signal.
121 <!-- ##### SIGNAL GtkTextBuffer::modified-changed ##### -->
126 @textbuffer: the object which received the signal.
128 <!-- ##### SIGNAL GtkTextBuffer::paste-done ##### -->
133 @textbuffer: the object which received the signal.
136 <!-- ##### SIGNAL GtkTextBuffer::remove-tag ##### -->
141 @textbuffer: the object which received the signal.
146 <!-- ##### ARG GtkTextBuffer:copy-target-list ##### -->
151 <!-- ##### ARG GtkTextBuffer:cursor-position ##### -->
156 <!-- ##### ARG GtkTextBuffer:has-selection ##### -->
161 <!-- ##### ARG GtkTextBuffer:paste-target-list ##### -->
166 <!-- ##### ARG GtkTextBuffer:tag-table ##### -->
171 <!-- ##### ARG GtkTextBuffer:text ##### -->
176 <!-- ##### FUNCTION gtk_text_buffer_new ##### -->
185 <!-- ##### FUNCTION gtk_text_buffer_get_line_count ##### -->
194 <!-- ##### FUNCTION gtk_text_buffer_get_char_count ##### -->
203 <!-- ##### FUNCTION gtk_text_buffer_get_tag_table ##### -->
212 <!-- ##### FUNCTION gtk_text_buffer_insert ##### -->
223 <!-- ##### FUNCTION gtk_text_buffer_insert_at_cursor ##### -->
233 <!-- ##### FUNCTION gtk_text_buffer_insert_interactive ##### -->
246 <!-- ##### FUNCTION gtk_text_buffer_insert_interactive_at_cursor ##### -->
258 <!-- ##### FUNCTION gtk_text_buffer_insert_range ##### -->
269 <!-- ##### FUNCTION gtk_text_buffer_insert_range_interactive ##### -->
282 <!-- ##### FUNCTION gtk_text_buffer_insert_with_tags ##### -->
295 <!-- ##### FUNCTION gtk_text_buffer_insert_with_tags_by_name ##### -->
308 <!-- ##### FUNCTION gtk_text_buffer_delete ##### -->
318 <!-- ##### FUNCTION gtk_text_buffer_delete_interactive ##### -->
330 <!-- ##### FUNCTION gtk_text_buffer_backspace ##### -->
342 <!-- ##### FUNCTION gtk_text_buffer_set_text ##### -->
352 <!-- ##### FUNCTION gtk_text_buffer_get_text ##### -->
360 @include_hidden_chars:
364 <!-- ##### FUNCTION gtk_text_buffer_get_slice ##### -->
372 @include_hidden_chars:
376 <!-- ##### FUNCTION gtk_text_buffer_insert_pixbuf ##### -->
386 <!-- ##### FUNCTION gtk_text_buffer_insert_child_anchor ##### -->
396 <!-- ##### FUNCTION gtk_text_buffer_create_child_anchor ##### -->
406 <!-- ##### FUNCTION gtk_text_buffer_create_mark ##### -->
418 <!-- ##### FUNCTION gtk_text_buffer_move_mark ##### -->
428 <!-- ##### FUNCTION gtk_text_buffer_move_mark_by_name ##### -->
438 <!-- ##### FUNCTION gtk_text_buffer_add_mark ##### -->
448 <!-- ##### FUNCTION gtk_text_buffer_delete_mark ##### -->
457 <!-- ##### FUNCTION gtk_text_buffer_delete_mark_by_name ##### -->
466 <!-- ##### FUNCTION gtk_text_buffer_get_mark ##### -->
476 <!-- ##### FUNCTION gtk_text_buffer_get_insert ##### -->
485 <!-- ##### FUNCTION gtk_text_buffer_get_selection_bound ##### -->
494 <!-- ##### FUNCTION gtk_text_buffer_get_has_selection ##### -->
503 <!-- ##### FUNCTION gtk_text_buffer_place_cursor ##### -->
512 <!-- ##### FUNCTION gtk_text_buffer_select_range ##### -->
522 <!-- ##### FUNCTION gtk_text_buffer_apply_tag ##### -->
533 <!-- ##### FUNCTION gtk_text_buffer_remove_tag ##### -->
544 <!-- ##### FUNCTION gtk_text_buffer_apply_tag_by_name ##### -->
555 <!-- ##### FUNCTION gtk_text_buffer_remove_tag_by_name ##### -->
566 <!-- ##### FUNCTION gtk_text_buffer_remove_all_tags ##### -->
576 <!-- ##### FUNCTION gtk_text_buffer_create_tag ##### -->
583 @first_property_name:
588 <!-- ##### FUNCTION gtk_text_buffer_get_iter_at_line_offset ##### -->
599 <!-- ##### FUNCTION gtk_text_buffer_get_iter_at_offset ##### -->
609 <!-- ##### FUNCTION gtk_text_buffer_get_iter_at_line ##### -->
619 <!-- ##### FUNCTION gtk_text_buffer_get_iter_at_line_index ##### -->
630 <!-- ##### FUNCTION gtk_text_buffer_get_iter_at_mark ##### -->
640 <!-- ##### FUNCTION gtk_text_buffer_get_iter_at_child_anchor ##### -->
650 <!-- ##### FUNCTION gtk_text_buffer_get_start_iter ##### -->
659 <!-- ##### FUNCTION gtk_text_buffer_get_end_iter ##### -->
668 <!-- ##### FUNCTION gtk_text_buffer_get_bounds ##### -->
678 <!-- ##### FUNCTION gtk_text_buffer_get_modified ##### -->
687 <!-- ##### FUNCTION gtk_text_buffer_set_modified ##### -->
696 <!-- ##### FUNCTION gtk_text_buffer_delete_selection ##### -->
707 <!-- ##### FUNCTION gtk_text_buffer_paste_clipboard ##### -->
718 <!-- ##### FUNCTION gtk_text_buffer_copy_clipboard ##### -->
727 <!-- ##### FUNCTION gtk_text_buffer_cut_clipboard ##### -->
737 <!-- ##### FUNCTION gtk_text_buffer_get_selection_bounds ##### -->
748 <!-- ##### FUNCTION gtk_text_buffer_begin_user_action ##### -->
756 <!-- ##### FUNCTION gtk_text_buffer_end_user_action ##### -->
764 <!-- ##### FUNCTION gtk_text_buffer_add_selection_clipboard ##### -->
773 <!-- ##### FUNCTION gtk_text_buffer_remove_selection_clipboard ##### -->
782 <!-- ##### ENUM GtkTextBufferTargetInfo ##### -->
787 @GTK_TEXT_BUFFER_TARGET_INFO_BUFFER_CONTENTS:
788 @GTK_TEXT_BUFFER_TARGET_INFO_RICH_TEXT:
789 @GTK_TEXT_BUFFER_TARGET_INFO_TEXT:
791 <!-- ##### USER_FUNCTION GtkTextBufferDeserializeFunc ##### -->
793 A function that is called to deserialize rich text that has been
794 serialized with gtk_text_buffer_serialize(), and insert it at @iter.
797 @register_buffer: the #GtkTextBuffer the format is registered with
798 @content_buffer: the #GtkTextBuffer to deserialize into
799 @iter: insertion point for the deserialized text
800 @data: data to deserialize
801 @length: length of %data
802 @create_tags: %TRUE if deserializing may create tags
803 @user_data: user data that was specified when registering the format
804 @error: return location for a #GError
805 @Returns: %TRUE on success, %FALSE otherwise
808 <!-- ##### FUNCTION gtk_text_buffer_deserialize ##### -->
823 <!-- ##### FUNCTION gtk_text_buffer_deserialize_get_can_create_tags ##### -->
833 <!-- ##### FUNCTION gtk_text_buffer_deserialize_set_can_create_tags ##### -->
843 <!-- ##### FUNCTION gtk_text_buffer_get_copy_target_list ##### -->
852 <!-- ##### FUNCTION gtk_text_buffer_get_deserialize_formats ##### -->
862 <!-- ##### FUNCTION gtk_text_buffer_get_paste_target_list ##### -->
871 <!-- ##### FUNCTION gtk_text_buffer_get_serialize_formats ##### -->
881 <!-- ##### FUNCTION gtk_text_buffer_register_deserialize_format ##### -->
894 <!-- ##### FUNCTION gtk_text_buffer_register_deserialize_tagset ##### -->
904 <!-- ##### FUNCTION gtk_text_buffer_register_serialize_format ##### -->
917 <!-- ##### FUNCTION gtk_text_buffer_register_serialize_tagset ##### -->
927 <!-- ##### USER_FUNCTION GtkTextBufferSerializeFunc ##### -->
929 A function that is called to serialize the content of a text buffer.
930 It must return the serialized form of the content.
933 @register_buffer: the #GtkTextBuffer for which the format is registered
934 @content_buffer: the #GtkTextsBuffer to serialize
935 @start: start of the block of text to serialize
936 @end: end of the block of text to serialize
937 @length: Return location for the length of the serialized data
938 @user_data: user data that was specified when registering the format
939 @Returns: a newly-allocated array of guint8 which contains the serialized
940 data, or %NULL if an error occurred
943 <!-- ##### FUNCTION gtk_text_buffer_serialize ##### -->
957 <!-- ##### FUNCTION gtk_text_buffer_unregister_deserialize_format ##### -->
966 <!-- ##### FUNCTION gtk_text_buffer_unregister_serialize_format ##### -->