SourceBuffer
Object Hierarchy:
Description:
[ CCode ( type_id = "gtk_source_buffer_get_type ()" ) ]
[ GIR ( name = "Buffer" ) ]
public class SourceBuffer : TextBuffer
[ GIR ( name = "Buffer" ) ]
public class SourceBuffer : TextBuffer
Namespace: Gtk
Package: gtksourceview-3.0
Content:
Properties:
- public bool can_redo { get; }
- public bool can_undo { get; }
- public bool highlight_matching_brackets { get; set; }
Whether to highlight matching brackets in the buffer.
- public bool highlight_syntax { get; set; }
Whether to highlight syntax in the buffer.
- public bool implicit_trailing_newline { get; set construct; }
Whether the buffer has an implicit trailing newline.
- public SourceLanguage language { get; set; }
- public int max_undo_levels { get; set; }
Number of undo levels for the buffer.
- public SourceStyleScheme style_scheme { get; set; }
Style scheme.
- public SourceUndoManager undo_manager { get; set construct; }
Creation methods:
- public SourceBuffer (TextTagTable? table)
Creates a new source buffer.
- public SourceBuffer.with_language (SourceLanguage language)
Creates a new source buffer using the highlighting patterns in
language
.
Methods:
- public bool backward_iter_to_source_mark (ref TextIter iter, string? category)
Moves
iter
to the position of the previous SourceMark of the given category. - public void begin_not_undoable_action ()
Marks the beginning of a not undoable action on the buffer, disabling the undo manager.
- public void change_case (SourceChangeCaseType case_type, TextIter start, TextIter end)
Changes the case of the text between the specified iterators.
- public unowned SourceMark create_source_mark (string? name, string category, TextIter where)
Creates a source mark in the this of category
category
. - public void end_not_undoable_action ()
Marks the end of a not undoable action on the buffer.
- public void ensure_highlight (TextIter start, TextIter end)
Forces buffer to analyze and highlight the given area synchronously.
- public bool forward_iter_to_source_mark (ref TextIter iter, string? category)
Moves
iter
to the position of the next SourceMark of the givencategory
. - public string[] get_context_classes_at_iter (TextIter iter)
Get all defined context classes at
iter
. - public bool get_highlight_matching_brackets ()
Determines whether bracket match highlighting is activated for the source buffer.
- public bool get_highlight_syntax ()
Determines whether syntax highlighting is activated in the source buffer.
- public bool get_implicit_trailing_newline ()
- public unowned SourceLanguage? get_language ()
Returns the SourceLanguage associated with the buffer, see set_language.
- public int get_max_undo_levels ()
Determines the number of undo levels the buffer will track for buffer edits.
- public SList<unowned SourceMark> get_source_marks_at_iter (TextIter iter, string? category)
Returns the list of marks of the given category at
iter
. - public SList<unowned SourceMark> get_source_marks_at_line (int line, string? category)
Returns the list of marks of the given category at
line
. - public unowned SourceStyleScheme? get_style_scheme ()
Returns the SourceStyleScheme associated with the buffer, see set_style_scheme.
- public unowned SourceUndoManager? get_undo_manager ()
Returns the SourceUndoManager associated with the buffer, see set_undo_manager.
- public bool iter_backward_to_context_class_toggle (ref TextIter iter, string context_class)
Moves backward to the next toggle (on or off) of the context class.
- public bool iter_forward_to_context_class_toggle (ref TextIter iter, string context_class)
Moves forward to the next toggle (on or off) of the context class.
- public bool iter_has_context_class (TextIter iter, string context_class)
Check if the class
context_class
is set oniter
. - public void join_lines (TextIter start, TextIter end)
Joins the lines of text between the specified iterators.
- public void remove_source_marks (TextIter start, TextIter end, string? category)
Remove all marks of
category
betweenstart
andend
from the buffer. - public void set_highlight_matching_brackets (bool highlight)
Controls the bracket match highlighting function in the buffer.
- public void set_highlight_syntax (bool highlight)
Controls whether syntax is highlighted in the buffer.
- public void set_implicit_trailing_newline (bool implicit_trailing_newline)
Sets whether the this has an implicit trailing newline.
- public void set_language (SourceLanguage? language)
Associates a SourceLanguage with the buffer.
- public void set_max_undo_levels (int max_undo_levels)
Sets the number of undo levels for user actions the buffer will track.
- public void set_style_scheme (SourceStyleScheme? scheme)
Sets a SourceStyleScheme to be used by the buffer and the view.
- public void set_undo_manager (SourceUndoManager? manager)
Set the buffer undo manager.
- public void sort_lines (TextIter start, TextIter end, SourceSortFlags flags, int column)
Sort the lines of text between the specified iterators.
Signals:
- public virtual signal void bracket_matched (TextIter? iter, SourceBracketMatchType state)
iter
is set to a valid iterator pointing to the matching bracket ifstate
is FOUND. - public signal void highlight_updated (TextIter start, TextIter end)
The highlight_updated signal is emitted when the syntax highlighting and [context classes][context-classes] are updated in a certain region of the
buffer
. - public virtual signal void redo ()
The redo signal is emitted to redo the last undo operation.
- public signal void source_mark_updated (TextMark mark)
The source_mark_updated signal is emitted each time a mark is added to, moved or removed from the
buffer
. - public virtual signal void undo ()
The undo signal is emitted to undo the last user action which modified the buffer.
Inherited Members:
All known members inherited from class Gtk.TextBuffer
- @delete
- add_mark
- add_selection_clipboard
- apply_tag
- apply_tag_by_name
- backspace
- begin_user_action
- changed
- copy_clipboard
- copy_target_list
- create_child_anchor
- create_mark
- create_tag
- cursor_position
- cut_clipboard
- delete_interactive
- delete_mark
- delete_mark_by_name
- delete_range
- delete_selection
- deserialize
- deserialize_get_can_create_tags
- deserialize_set_can_create_tags
- end_user_action
- get_bounds
- get_char_count
- get_copy_target_list
- get_deserialize_formats
- get_end_iter
- get_has_selection
- get_insert
- get_iter_at_child_anchor
- get_iter_at_line
- get_iter_at_line_index
- get_iter_at_line_offset
- get_iter_at_mark
- get_iter_at_offset
- get_line_count
- get_mark
- get_modified
- get_paste_target_list
- get_selection_bound
- get_selection_bounds
- get_serialize_formats
- get_slice
- get_start_iter
- get_tag_table
- get_text
- has_selection
- insert
- insert_at_cursor
- insert_child_anchor
- insert_interactive
- insert_interactive_at_cursor
- insert_markup
- insert_pixbuf
- insert_range
- insert_range_interactive
- insert_text
- insert_with_tags
- insert_with_tags_by_name
- mark_deleted
- mark_set
- modified_changed
- move_mark
- move_mark_by_name
- paste_clipboard
- paste_done
- paste_target_list
- place_cursor
- register_deserialize_format
- register_deserialize_tagset
- register_serialize_format
- register_serialize_tagset
- remove_all_tags
- remove_selection_clipboard
- remove_tag
- remove_tag_by_name
- select_range
- serialize
- set_modified
- set_text
- tag_table
- text
- unregister_deserialize_format
- unregister_serialize_format
All known members inherited from class GLib.Object