Class

TalkatuBuffer

since: 0.0

Description [src]

class Talkatu.Buffer : Gtk.TextBuffer
{
  /* No available fields */
}

A GtkTextBuffer subclass that will automatically apply formatting according to the actions in a GSimpleAction group.

Available since: 0.0

Hierarchy

hierarchy this TalkatuBuffer ancestor_0 GtkTextBuffer ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Constructors

talkatu_buffer_new

This is a simple GtkTextBuffer subclass that contains the shared behavior for the other Talkatu text buffers.

since: 0.0

Instance methods

talkatu_buffer_clear

Clears all text out of the buffer.

since: 0.0

talkatu_buffer_get_action_group

A TalkatuBuffer can support multiple actions, whether it’s formatting of text, or being able to insert images, code, etc. This function is called by TalkatuView to map them to keybindings as well as the format toolbar.

since: 0.0

talkatu_buffer_get_is_empty

Returns whether or not buffer has any text in it.

since: 0.0

talkatu_buffer_get_plain_text

Returns the text from the buffer without markup.

since: 0.0

talkatu_buffer_get_style

Gets format style of buffer.

since: 0.0

talkatu_buffer_insert_link

Inserts a link into buffer with the given url and display_text. If display_text is not given, url will be used.

since: 0.0

talkatu_buffer_insert_markup

Inserts text that will be or already is marked up. Calling this tells buffer to not apply the currently selected format to the newly inserted text, which is what it does when text is normally inserted.

since: 0.0

talkatu_buffer_insert_markup_with_tags_by_name

Similar to #talkatu_buffer_insert_markup but allows you to specify tags to apply to the newly inserted text.

since: 0.0

talkatu_buffer_set_action_group

Sets the GSimpleActionGroup of buffer to action_group. action_group is used to determine what formatting tags are currently enabled among other things.

since: 0.2.0

Methods inherited from GtkTextBuffer (70)

Please see GtkTextBuffer for a full list of methods.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Talkatu.Buffer:action-group
No description available.

since: 0.0

Talkatu.Buffer:style
No description available.

since: 0.0

Properties inherited from GtkTextBuffer (7)
Gtk.TextBuffer:can-redo

Denotes that the buffer can reapply the last undone action.

unstable since: 4.0

Gtk.TextBuffer:can-undo

Denotes that the buffer can undo the last applied action.

unstable since: 4.0

Gtk.TextBuffer:cursor-position

The position of the insert mark.

unstable since: 4.0

Gtk.TextBuffer:enable-undo

Denotes if support for undoing and redoing changes to the buffer is allowed.

unstable since: 4.0

Gtk.TextBuffer:has-selection

Whether the buffer has some text currently selected.

unstable since: 4.0

Gtk.TextBuffer:tag-table

The GtkTextTagTable for the buffer.

unstable since: 4.0

Gtk.TextBuffer:text

The text content of the buffer.

unstable since: 4.0

Signals

Signals inherited from GtkTextBuffer (15)
GtkTextBuffer::apply-tag

Emitted to apply a tag to a range of text in a GtkTextBuffer.

unstable since: 4.0

GtkTextBuffer::begin-user-action

Emitted at the beginning of a single user-visible operation on a GtkTextBuffer.

unstable since: 4.0

GtkTextBuffer::changed

Emitted when the content of a GtkTextBuffer has changed.

unstable since: 4.0

GtkTextBuffer::delete-range

Emitted to delete a range from a GtkTextBuffer.

unstable since: 4.0

GtkTextBuffer::end-user-action

Emitted at the end of a single user-visible operation on the GtkTextBuffer.

unstable since: 4.0

GtkTextBuffer::insert-child-anchor

Emitted to insert a GtkTextChildAnchor in a GtkTextBuffer.

unstable since: 4.0

GtkTextBuffer::insert-paintable

Emitted to insert a GdkPaintable in a GtkTextBuffer.

unstable since: 4.0

GtkTextBuffer::insert-text

Emitted to insert text in a GtkTextBuffer.

unstable since: 4.0

GtkTextBuffer::mark-deleted

Emitted as notification after a GtkTextMark is deleted.

unstable since: 4.0

GtkTextBuffer::mark-set

Emitted as notification after a GtkTextMark is set.

unstable since: 4.0

GtkTextBuffer::modified-changed

Emitted when the modified bit of a GtkTextBuffer flips.

unstable since: 4.0

GtkTextBuffer::paste-done

Emitted after paste operation has been completed.

unstable since: 4.0

GtkTextBuffer::redo

Emitted when a request has been made to redo the previously undone operation.

unstable since: 4.0

GtkTextBuffer::remove-tag

Emitted to remove all occurrences of tag from a range of text in a GtkTextBuffer.

unstable since: 4.0

GtkTextBuffer::undo

Emitted when a request has been made to undo the previous operation or set of operations that have been grouped together.

unstable since: 4.0

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.

unstable since: 2.0

Class structure

struct TalkatuBufferClass {
  void (* insert_markup) (
    TalkatuBuffer* buffer,
    GtkTextIter* pos,
    const gchar* new_text,
    gint new_text_length
  );
  
}

The backing class to TalkatuBuffer.

Class members
insert_markup: void (* insert_markup) ( TalkatuBuffer* buffer, GtkTextIter* pos, const gchar* new_text, gint new_text_length )

The insert_markup vfunc is called to insert already rendered text into the TalkatuBuffer.

Virtual methods

Talkatu.BufferClass.insert_markup

Inserts text that will be or already is marked up. Calling this tells buffer to not apply the currently selected format to the newly inserted text, which is what it does when text is normally inserted.

since: 0.0