Tepl.Buffer

g GObject.Object GObject.Object Gtk.TextBuffer Gtk.TextBuffer GObject.Object->Gtk.TextBuffer GtkSource.Buffer GtkSource.Buffer Gtk.TextBuffer->GtkSource.Buffer Tepl.Buffer Tepl.Buffer GtkSource.Buffer->Tepl.Buffer

Subclasses:

None

Methods

Inherited:

GtkSource.Buffer (36), Gtk.TextBuffer (74), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

connect_style_scheme_settings ()

get_file ()

get_full_title ()

get_metadata ()

get_selection_type ()

get_short_title ()

is_untouched ()

load_metadata_from_metadata_manager ()

save_metadata_into_metadata_manager ()

Virtual Methods

Inherited:

GtkSource.Buffer (3), Gtk.TextBuffer (13), GObject.Object (7)

do_tepl_cursor_moved ()

Properties

Inherited:

GtkSource.Buffer (9), Gtk.TextBuffer (6)

Name

Type

Flags

Short Description

tepl-full-title

str

r

tepl-short-title

str

r

Signals

Inherited:

GtkSource.Buffer (5), Gtk.TextBuffer (13), GObject.Object (1)

Name

Short Description

tepl-cursor-moved

The ::tepl-cursor-moved signal is emitted when the insert mark is moved explicitely or when the buffer changes (insert/delete).

Fields

Inherited:

GtkSource.Buffer (5), Gtk.TextBuffer (13), GObject.Object (1)

Name

Type

Access

Description

parent_instance

GtkSource.Buffer

r

Class Details

class Tepl.Buffer(**kwargs)
Bases:

GtkSource.Buffer

Abstract:

No

Structure:

Tepl.BufferClass

classmethod new()
Returns:

a new Tepl.Buffer.

Return type:

Tepl.Buffer

New in version 1.0.

connect_style_scheme_settings()

Connects Tepl.Settings :style-scheme-id to GtkSource.Buffer :style-scheme.

New in version 6.11.

get_file()
Returns:

the associated Tepl.File.

Return type:

Tepl.File

Returns the Tepl.File of self. The returned object is guaranteed to be the same for the lifetime of self.

Tepl.Buffer creates the Tepl.File with Tepl.AbstractFactory.create_file().

New in version 1.0.

get_full_title()
Returns:

the self full title. Free the return value with GLib.free() when no longer needed.

Return type:

str

Returns a title suitable for a Gtk.Window title. It contains (in that order):

New in version 3.0.

get_metadata()
Returns:

the associated Tepl.Metadata.

Return type:

Tepl.Metadata

Returns the Tepl.Metadata of self. The returned object is guaranteed to be the same for the lifetime of self.

New in version 5.0.

get_selection_type()
Returns:

the current Tepl.SelectionType.

Return type:

Tepl.SelectionType

New in version 1.0.

get_short_title()
Returns:

the self short title. Free the return value with GLib.free() when no longer needed.

Return type:

str

Returns a title suitable for a tab label. It contains (in that order):

New in version 3.0.

is_untouched()
Returns:

True if self has not been touched, False otherwise.

Return type:

bool

Returns whether self is untouched.

This function is for example useful to know if we can re-use this buffer to load a file, instead of opening a new tab or window.

For this function to return True, the self must be empty, non-modified, the undo/redo GtkSource.Buffer history must be empty, and the Tepl.File :location must be None.

New in version 1.0.

load_metadata_from_metadata_manager()

Calls Tepl.MetadataManager.copy_from() for Tepl.File :location (if not None) to the associated Tepl.Metadata of self.

New in version 5.0.

save_metadata_into_metadata_manager()

Calls Tepl.MetadataManager.merge_into() for Tepl.File :location (if not None) from the associated Tepl.Metadata of self.

New in version 5.0.

do_tepl_cursor_moved() virtual

Signal Details

Tepl.Buffer.signals.tepl_cursor_moved(buffer)
Signal Name:

tepl-cursor-moved

Flags:

RUN_FIRST

Parameters:

buffer (Tepl.Buffer) – The object which received the signal

The ::tepl-cursor-moved signal is emitted when the insert mark is moved explicitely or when the buffer changes (insert/delete).

A typical use-case for this signal is to update the cursor position in a statusbar.

New in version 2.0.

Property Details

Tepl.Buffer.props.tepl_full_title
Name:

tepl-full-title

Type:

str

Default Value:

None

Flags:

READABLE

The full title. See Tepl.Buffer.get_full_title().

New in version 3.0.

Tepl.Buffer.props.tepl_short_title
Name:

tepl-short-title

Type:

str

Default Value:

None

Flags:

READABLE

The short title. See Tepl.Buffer.get_short_title().

New in version 3.0.