API Reference

Public interface

Gtk.bufferMethod
buffer(iter::Union{Mutable{GtkTextIter}, GtkTextIter})

Returns the buffer associated with iter.

source
Gtk.create_markMethod
create_mark(buffer::GtkTextBuffer, mark_name, it::TI, left_gravity::Bool)
create_mark(buffer::GtkTextBuffer, it::TI)

Impements gtk_text_buffer_create_mark.

source
Gtk.place_cursorMethod
place_cursor(buffer::GtkTextBuffer, it::GtkTextIter)
place_cursor(buffer::GtkTextBuffer, pos::Int)

Place the cursor at indicated position.

source
Gtk.scroll_toMethod
scroll_to(view::GtkTextView, mark::GtkTextMark, within_margin::Real,
               use_align::Bool, xalign::Real, yalign::Real)

scroll_to(view::GtkTextView, iter::TI, within_margin::Real,
          use_align::Bool, xalign::Real, yalign::Real)

Implements gtk_text_view_scroll_to_mark and gtk_text_view_scroll_to_iter.

source
Gtk.searchFunction
search(buffer::GtkTextBuffer, str::AbstractString, direction = :forward,
    flag = GtkTextSearchFlags.GTK_TEXT_SEARCH_TEXT_ONLY)

Search text str in buffer in direction :forward or :backward starting from the cursor position in the buffer.

Returns a tuple (found, start, stop) where found indicates whether the search was successful and start and stop are GtkTextIters containing the location of the match.

source
Gtk.select_rangeMethod
select_range(buffer::GtkTextBuffer, ins::TI, bound::TI)
select_range(buffer::GtkTextBuffer, range::GtkTextRange)

Select the text in buffer accorind to GtkTextIter ins and bound.

Implements gtk_text_buffer_select_range.

source
Gtk.selection_boundsMethod
selection_bounds(buffer::GtkTextBuffer)

Returns a tuple (selected, start, stop) indicating if text is selected in the buffer, and if so sets the GtkTextIter start and stop to point to the selected text.

Implements gtk_text_buffer_get_selection_bounds.

source
Gtk.showallMethod
showall(w::Gtk.GtkWidget)

Recursively show a widget, and any child widgets (if the widget is a container).

This function overrides the visible property in all widgets in the hierarchy. Widgets can be protected from showall by setting the no_show_all property on the object to true.

source

Private methods

Gtk.GtkTextIterMethod
GtkTextIter(text::GtkTextBuffer, char_offset::Integer)

Creates a GtkTextIter with offset char_offset (one-based index).

source
Base.skipMethod
skip(iter::Mutable{GtkTextIter}, count::Integer, what::Symbol)

Moves iter according to the operation specified by what and count. Operations are :

  • :chars (gtk_text_iter_forward_chars)
  • :lines (gtk_text_iter_forward_lines)
  • :words (gtk_text_iter_forward_word_ends)
  • :word_cursor_positions (gtk_text_iter_forward_cursor_positions)
  • :sentences (gtk_text_iter_forward_sentence_ends)
  • :visible_words (gtk_text_iter_forward_visible_word_ends)
  • :visible_cursor_positions (gtk_text_iter_forward_visible_cursor_positions)
  • :visible_lines (gtk_text_iter_forward_visible_lines)
  • :line_ends (gtk_text_iter_forward_visible_lines)
source
Base.skipMethod
skip(iter::Mutable{GtkTextIter}, count::Integer)

Moves iter count characters. Returns a Bool indicating if the move was successful.

source
Base.skipMethod
skip(iter::Mutable{GtkTextIter}, what::Symbol)

Moves iter according to the operation specified by what. Operations are :

  • :forward_line (gtk_text_iter_forward_line)
  • :backward_line (gtk_text_iter_backward_line)
  • :forward_to_line_end (gtk_text_iter_forward_to_line_end)
  • :backward_word_start (gtk_text_iter_forward_word_end)
  • :forward_word_end (gtk_text_iter_backward_word_start)
  • :backward_sentence_start (gtk_text_iter_backward_sentence_start)
  • :forward_sentence_end (gtk_text_iter_forward_sentence_end)
source
Gtk.backward_searchMethod
backward_search(iter::Mutable{GtkTextIter},
    str::AbstractString, start::Mutable{GtkTextIter},
    stop::Mutable{GtkTextIter}, limit::Mutable{GtkTextIter}, flag::Int32)

Implements gtk_text_iter_backward_search.

source
Gtk.buffer_to_window_coordsFunction
buffer_to_window_coords(view::GtkTextView, buffer_x::Integer, buffer_y::Integer, wintype::Integer = 0)

Implements gtk_text_view_buffer_to_window_coords.

source
Gtk.char_offsetMethod
char_offset(iter::Union{Mutable{GtkTextIter}, GtkTextIter})

Returns the offset of iter (one-based index).

source
Gtk.forward_searchMethod
forward_search(iter::Mutable{GtkTextIter},
    str::AbstractString, start::Mutable{GtkTextIter},
    stop::Mutable{GtkTextIter}, limit::Mutable{GtkTextIter}, flag::Int32)

Implements gtk_text_iter_forward_search.

source
Gtk.pause_eventloopMethod
Gtk.pause_eventloop(f; force = false)

Pauses the eventloop around a function. Restores the state of the eventloop after pausing. Respects whether Gtk.jl is configured to allow auto-stopping of the eventloop, unless force = true.

source
Gtk.window_to_buffer_coordsFunction
window_to_buffer_coords(view::Gtk.GtkTextView, window_x::Integer, window_y::Integer, wintype::Integer = 2)

Implements gtk_text_view_window_to_buffer_coords.

source