Tepl.View¶
- Subclasses:
None
Methods¶
- Inherited:
GtkSource.View (36), Gtk.TextView (73), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Scrollable (9)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
Style Properties¶
- Inherited:
Signals¶
Fields¶
- Inherited:
GtkSource.View (11), Gtk.TextView (16), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Tepl.View(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
Tepl.View
.- Return type:
Creates a new
Tepl.View
.By default, an empty
Tepl.Buffer
will be lazily created and can be retrieved withGtk.TextView.get_buffer
().If you want to specify your own buffer, either override the
Gtk.TextViewClass
create_buffer factory method, or useTepl.View.new_with_buffer
().New in version 1.0.
- classmethod new_with_buffer(buffer)¶
- Parameters:
buffer (
GtkSource.Buffer
) – aGtkSource.Buffer
or a subclass of it.- Returns:
a new
Tepl.View
.- Return type:
Creates a new
Tepl.View
widget displaying the buffer buffer.New in version 5.0.
- copy_clipboard()¶
Copies the clipboard.
New in version 1.0.
- cut_clipboard()¶
Cuts the clipboard and then scrolls to the cursor position.
New in version 1.0.
- delete_selection()¶
Deletes the text currently selected in the
Gtk.TextBuffer
associated to the view and then scrolls to the cursor position.New in version 1.0.
- goto_line(line)¶
- Parameters:
line (
int
) – a line number, counting from 0.- Returns:
True
if the cursor has been moved exactly to line,False
if that line didn’t exist.- Return type:
Places the cursor at the position returned by
Gtk.TextBuffer.get_iter_at_line
(), and scrolls to that position.New in version 2.0.
- goto_line_offset(line, line_offset)¶
- Parameters:
- Returns:
True
if the cursor has been moved exactly to line and line_offset,False
if that position didn’t exist.- Return type:
Places the cursor at the position returned by
Gtk.TextBuffer.get_iter_at_line_offset
(), and scrolls to that position.New in version 2.0.
- paste_clipboard()¶
Pastes the clipboard and then scrolls to the cursor position.
New in version 1.0.
- scroll_to_cursor()¶
Scrolls the self to the cursor position.
New in version 1.0.
- select_all()¶
Selects all the text.
New in version 1.0.
- select_lines(start_line, end_line)¶
- Parameters:
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.
New in version 2.0.