Class
IdeBuffer
Instance methods
ide_buffer_add_commit_funcs
Adds function callbacks to handle important changes to text
internally within the GtkTextBuffer. You can use these instead
of signals like GtkTextBuffer::insert-text
or
GtkTextBuffer::delete-range
when you want to be sure you’re
getting unprocessed changes right before they are committed to
underlying GTK data structures.
ide_buffer_addin_find_by_module_name
Locates an addin attached to the IdeBuffer
by the name of the module
that provides the addin.
ide_buffer_code_action_query_finish
Completes an asynchronous request to ide_buffer_query_code_action_async().
ide_buffer_dup_title
Gets a string to represent the title of the buffer. An attempt is made to make this relative to the project workdir if possible.
ide_buffer_format_selection_async
Formats the selection using an available IdeFormatter
for the buffer.
ide_buffer_format_selection_finish
Completes an asynchronous request to ide_buffer_format_selection_async().
ide_buffer_get_changed_on_volume
Returns TRUE
if the IdeBuffer
is known to have been modified on storage
externally from this IdeBuffer
.
ide_buffer_get_failed
Gets the IdeBuffer:failed
property, denoting if the buffer has failed
in some aspect such as loading or saving.
ide_buffer_get_loading
This checks to see if the buffer is currently loading. This is equivalent
to calling ide_buffer_get_state()
and checking for IDE_BUFFER_STATE_LOADING
.
ide_buffer_get_read_only
This function returns TRUE
if the underlying file has been discovered to
be read-only. This may be used by the interface to display information to
the user about saving the file.
ide_buffer_get_selection_bounds
This function acts like gtk_text_buffer_get_selection_bounds()
except that
it always places the location of the insert mark at insert
and the location
of the selection mark at selection
.
ide_buffer_get_style_scheme_name
Gets the name of the GtkSourceStyleScheme
from the IdeBuffer:style-scheme
property.
ide_buffer_get_symbol_at_location_finish
Completes an asynchronous request to locate a symbol at a location.
ide_buffer_get_symbol_resolvers
Gets the symbol resolvers for the buffer based on the current language. The resolvers in the resulting array are sorted by priority.
ide_buffer_save_file_finish
Completes an asynchronous request to save the buffer via ide_buffer_save_file_async().
ide_buffer_set_diagnostics
Sets the IdeDiagnostics
for the buffer. These will be used to highlight
the buffer for errors and warnings if IdeBuffer:highlight-diagnostics
is TRUE
.
ide_buffer_set_style_scheme_name
Sets the IdeBuffer:style-scheme
property by locating the style scheme
matching style_scheme_name
.
Methods inherited from GtkSourceBuffer (26)
Please see GtkSourceBuffer for a full list of methods.
Methods inherited from GtkTextBuffer (70)
Please see GtkTextBuffer for a full list of methods.
Properties
Ide.Buffer:buffer-manager
Sets the “buffer-manager” property, which is used by the buffer to clean-up state when the buffer is no longer in use.
Ide.Buffer:change-monitor
The “change-monitor” property is an IdeBufferChangeMonitor
that will be
used to track changes in the IdeBuffer
. This can be used to show line
changes in the editor gutter.
Ide.Buffer:changed-on-volume
The “changed-on-volume” property is set to TRUE
when it has been
discovered that the file represented by the IdeBuffer
has changed
externally to Builder.
Ide.Buffer:charset
Sets the encoding to use for the buffer based on the “charset” specified. This is useful to ensure that characters may not be lost from the original encoding.
Ide.Buffer:diagnostics
The “diagnostics” property contains an IdeDiagnostics
that represent
the diagnostics found in the buffer.
Ide.Buffer:enable-addins
The “enable-addins” property determines whether addins will be aware of
this buffer. When set to FALSE
no ide_buffer_addin_*() functions will be
called on this buffer.
Ide.Buffer:failed
The “failed” property is TRUE
when the buffer has entered a failed
state such as when loading or saving the buffer to disk.
Ide.Buffer:file-settings
The “file-settings” property are the settings to be used by the buffer and source-view for the underlying file.
Ide.Buffer:has-diagnostics
The “has-diagnostics” property denotes that there are a non-zero number of diangostics registered for the buffer.
Ide.Buffer:has-symbol-resolvers
The “has-symbol-resolvers” property is TRUE
if there are any symbol
resolvers loaded.
Ide.Buffer:highlight-diagnostics
The “highlight-diagnostics” property indicates that diagnostics which are discovered should be styled.
Ide.Buffer:is-temporary
The “is-temporary” property denotes the IdeBuffer:file
property points
to a temporary file. When saving the the buffer, various UI components
know to check this property and provide a file chooser to allow the user
to select the destination file.
Ide.Buffer:language-id
The “language-id” property is a convenience property to set the
GtkSourceBuffer:language
property using a string name.
Ide.Buffer:read-only
The “read-only” property is set to TRUE
when it has been
discovered that the file represented by the IdeBuffer
is read-only
on the underlying storage.
Ide.Buffer:state
The “state” property can be used to determine if the buffer is currently performing any specific background work, such as loading from or saving a buffer to storage.
Ide.Buffer:style-scheme-name
The “style-scheme-name” is the name of the style scheme that is used.
It is a convenience property so that you do not need to use the
GtkSourceStyleSchemeManager
to lookup style schemes.
Ide.Buffer:title
The “title” for the buffer which includes some variant of the path to the underlying file.
Properties inherited from GtkSourceBuffer (6)
GtkSource.Buffer:highlight-matching-brackets
Whether to highlight matching brackets in the buffer.
GtkSource.Buffer:highlight-syntax
Whether to highlight syntax in the buffer.
GtkSource.Buffer:implicit-trailing-newline
Whether the buffer has an implicit trailing newline. See
gtk_source_buffer_set_implicit_trailing_newline()
.
GtkSource.Buffer:language
GtkSource.Buffer:loading
The “loading” property denotes that a GtkSourceFileLoader
is
currently loading the buffer.
since: 5.10
GtkSource.Buffer:style-scheme
Style scheme. It contains styles for syntax highlighting, optionally foreground, background, cursor color, current line color, and matching brackets style.
Properties inherited from GtkTextBuffer (7)
Gtk.TextBuffer:can-redo
Denotes that the buffer can reapply the last undone action.
Gtk.TextBuffer:can-undo
Denotes that the buffer can undo the last applied action.
Gtk.TextBuffer:cursor-position
The position of the insert mark.
Gtk.TextBuffer:enable-undo
Denotes if support for undoing and redoing changes to the buffer is allowed.
Gtk.TextBuffer:has-selection
Whether the buffer has some text currently selected.
Gtk.TextBuffer:tag-table
The GtkTextTagTable for the buffer.
Gtk.TextBuffer:text
The text content of the buffer.
Signals
Ide.Buffer::change-settled
The “change-settled” signal is emitted when the buffer has stopped being edited for a short period of time. This is useful to connect to when you want to perform work as the user is editing, but you don’t want to get in the way of their editing.
Ide.Buffer::line-flags-changed
The “line-flags-changed” signal is emitted when the buffer has detected ancillary information has changed for lines in the buffer. Such information might include diagnostics or version control information.
Signals inherited from GtkSourceBuffer (4)
GtkSourceBuffer::bracket-matched
iter
is set to a valid iterator pointing to the matching bracket
if state
is GTK_SOURCE_BRACKET_MATCH_FOUND
. Otherwise iter
is meaningless.
GtkSourceBuffer::cursor-moved
The “cursor-moved” signal is emitted when then insertion mark has moved.
GtkSourceBuffer::highlight-updated
The ::highlight-updated signal is emitted when the syntax
highlighting and context classes are updated in a
certain region of the buffer
.
GtkSourceBuffer::source-mark-updated
The ::source-mark-updated signal is emitted each time
a mark is added to, moved or removed from the buffer
.
Signals inherited from GtkTextBuffer (15)
GtkTextBuffer::apply-tag
Emitted to apply a tag to a range of text in a GtkTextBuffer
.
GtkTextBuffer::begin-user-action
Emitted at the beginning of a single user-visible
operation on a GtkTextBuffer
.
GtkTextBuffer::changed
Emitted when the content of a GtkTextBuffer
has changed.
GtkTextBuffer::delete-range
Emitted to delete a range from a GtkTextBuffer
.
GtkTextBuffer::end-user-action
Emitted at the end of a single user-visible
operation on the GtkTextBuffer
.
GtkTextBuffer::insert-child-anchor
Emitted to insert a GtkTextChildAnchor
in a GtkTextBuffer
.
GtkTextBuffer::insert-paintable
Emitted to insert a GdkPaintable
in a GtkTextBuffer
.
GtkTextBuffer::insert-text
Emitted to insert text in a GtkTextBuffer
.
GtkTextBuffer::mark-deleted
Emitted as notification after a GtkTextMark
is deleted.
GtkTextBuffer::mark-set
Emitted as notification after a GtkTextMark
is set.
GtkTextBuffer::modified-changed
Emitted when the modified bit of a GtkTextBuffer
flips.
GtkTextBuffer::paste-done
Emitted after paste operation has been completed.
GtkTextBuffer::redo
Emitted when a request has been made to redo the previously undone operation.
GtkTextBuffer::remove-tag
Emitted to remove all occurrences of tag
from a range
of text in a GtkTextBuffer
.
GtkTextBuffer::undo
Emitted when a request has been made to undo the previous operation or set of operations that have been grouped together.
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.