Class

TalkatuHtmlBuffer

Description [src]

class Talkatu.HtmlBuffer : Talkatu.Buffer {
  parent_instance: TalkatuBuffer
}

A TalkatuBuffer subclass that renders HTML.

Constructors

talkatu_html_buffer_new

Creates a new TalkatuHtmlBuffer. A TalkatuHtmlBuffer supports HTML formatting as well as pasting rendered HTML.

Instance methods

talkatu_html_buffer_insert_html

Inserts and renders text as HTML into buffer.

Methods inherited from TalkatuBuffer (8)
talkatu_buffer_clear

Clears all text out of the buffer.

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.

talkatu_buffer_get_is_empty

Returns whether or not buffer has any text in it.

talkatu_buffer_get_plain_text

Returns the text from the buffer without markup.

talkatu_buffer_get_style

Gets format style of buffer.

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.

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.

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.

Methods inherited from GtkTextBuffer (73)

Please see GtkTextBuffer for a full list of methods.

Methods inherited from GObject (42)

Please see GObject for a full list of methods.

Properties

Properties inherited from TalkatuBuffer (2)
Talkatu.Buffer:action-group
No description available.
Talkatu.Buffer:style
No description available.
Properties inherited from GtkTextBuffer (6)
Gtk.TextBuffer:copy-target-list

The list of targets this buffer supports for clipboard copying and as DND source.

Available since: 2.10

Gtk.TextBuffer:cursor-position

The position of the insert mark (as offset from the beginning of the buffer). It is useful for getting notified when the cursor moves.

Available since: 2.10

Gtk.TextBuffer:has-selection

Whether the buffer has some text currently selected.

Available since: 2.10

Gtk.TextBuffer:paste-target-list

The list of targets this buffer supports for clipboard pasting and as DND destination.

Available since: 2.10

Gtk.TextBuffer:tag-table
No description available.
Gtk.TextBuffer:text

The text content of the buffer. Without child widgets and images, see gtk_text_buffer_get_text() for more information.

Available since: 2.8

Signals

Signals inherited from GtkTextBuffer (13)
Gtk.TextBuffer::apply-tag

The ::apply-tag signal is emitted to apply a tag to a range of text in a GtkTextBuffer. Applying actually occurs in the default handler.

Gtk.TextBuffer::begin-user-action

The ::begin-user-action signal is emitted at the beginning of a single user-visible operation on a GtkTextBuffer.

Gtk.TextBuffer::changed

The ::changed signal is emitted when the content of a GtkTextBuffer has changed.

Gtk.TextBuffer::delete-range

The ::delete-range signal is emitted to delete a range from a GtkTextBuffer.

Gtk.TextBuffer::end-user-action

The ::end-user-action signal is emitted at the end of a single user-visible operation on the GtkTextBuffer.

Gtk.TextBuffer::insert-child-anchor

The ::insert-child-anchor signal is emitted to insert a GtkTextChildAnchor in a GtkTextBuffer. Insertion actually occurs in the default handler.

Gtk.TextBuffer::insert-pixbuf

The ::insert-pixbuf signal is emitted to insert a GdkPixbuf in a GtkTextBuffer. Insertion actually occurs in the default handler.

Gtk.TextBuffer::insert-text

The ::insert-text signal is emitted to insert text in a GtkTextBuffer. Insertion actually occurs in the default handler.

Gtk.TextBuffer::mark-deleted

The ::mark-deleted signal is emitted as notification after a GtkTextMark is deleted.

Gtk.TextBuffer::mark-set

The ::mark-set signal is emitted as notification after a GtkTextMark is set.

Gtk.TextBuffer::modified-changed

The ::modified-changed signal is emitted when the modified bit of a GtkTextBuffer flips.

Gtk.TextBuffer::paste-done

The paste-done signal is emitted after paste operation has been completed. This is useful to properly scroll the view to the end of the pasted text. See gtk_text_buffer_paste_clipboard() for more details.

Available since: 2.16

Gtk.TextBuffer::remove-tag

The ::remove-tag signal is emitted to remove all occurrences of tag from a range of text in a GtkTextBuffer. Removal actually occurs in the default handler.

Signals inherited from GObject (1)
GObject.Object::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.

Class structure

struct TalkatuHtmlBufferClass {
  void (* insert_html) (
    TalkatuHtmlBuffer* buffer,
    GtkTextIter* iter,
    const gchar* text,
    gint len
  );
  
}
Class members
insert_html
void (* insert_html) (
    TalkatuHtmlBuffer* buffer,
    GtkTextIter* iter,
    const gchar* text,
    gint len
  )
  No description available.

Virtual methods

Talkatu.HtmlBufferClass.insert_html

Inserts and renders text as HTML into buffer.