| Top |
| GtkWidget * | tepl_view_new () |
| GtkWidget * | tepl_view_new_with_buffer () |
| void | tepl_view_cut_clipboard () |
| void | tepl_view_copy_clipboard () |
| void | tepl_view_paste_clipboard () |
| void | tepl_view_delete_selection () |
| void | tepl_view_select_all () |
| void | tepl_view_scroll_to_cursor () |
| gboolean | tepl_view_goto_line () |
| gboolean | tepl_view_goto_line_offset () |
| void | tepl_view_select_lines () |
GObject
╰── GInitiallyUnowned
╰── GtkWidget
╰── GtkContainer
╰── GtkTextView
╰── GtkSourceView
╰── TeplView
GtkWidget *
tepl_view_new (void);
Creates a new TeplView.
By default, an empty TeplBuffer will be lazily created and can be retrieved
with gtk_text_view_get_buffer().
If you want to specify your own buffer, either override the
GtkTextViewClass create_buffer factory method, or use
tepl_view_new_with_buffer().
Since: 1.0
GtkWidget *
tepl_view_new_with_buffer (GtkSourceBuffer *buffer);
Creates a new TeplView widget displaying the buffer buffer
.
Since: 5.0
void
tepl_view_cut_clipboard (TeplView *view);
Cuts the clipboard and then scrolls to the cursor position.
Since: 1.0
void
tepl_view_copy_clipboard (TeplView *view);
Copies the clipboard.
Since: 1.0
void
tepl_view_paste_clipboard (TeplView *view);
Pastes the clipboard and then scrolls to the cursor position.
Since: 1.0
void
tepl_view_delete_selection (TeplView *view);
Deletes the text currently selected in the GtkTextBuffer associated to the view and then scrolls to the cursor position.
Since: 1.0
void
tepl_view_select_all (TeplView *view);
Selects all the text.
Since: 1.0
void
tepl_view_scroll_to_cursor (TeplView *view);
Scrolls the view
to the cursor position.
Since: 1.0
gboolean tepl_view_goto_line (TeplView *view,gint line);
Places the cursor at the position returned by
gtk_text_buffer_get_iter_at_line(), and scrolls to that position.
Since: 2.0
gboolean tepl_view_goto_line_offset (TeplView *view,gint line,gint line_offset);
Places the cursor at the position returned by
gtk_text_buffer_get_iter_at_line_offset(), and scrolls to that position.
view |
a TeplView. |
|
line |
a line number, counting from 0. |
|
line_offset |
the line offset, in characters (not bytes). |
TRUE if the cursor has been moved exactly to line
and
line_offset
, FALSE if that position didn't exist.
Since: 2.0
void tepl_view_select_lines (TeplView *view,gint start_line,gint end_line);
Selects the lines between start_line
and end_line
included, counting from
zero. And then scrolls to the cursor.
Possible use-case: line numbers coming from a compilation output, to go to the place where a warning or error occurred.
view |
a TeplView. |
|
start_line |
start of the region to select. |
|
end_line |
end of the region to select. |
Since: 2.0