gtksourceview.SourceView — a widget that displays the source code
class gtksourceview.SourceView(gtk.TextView): |
+-- gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.TextView +-- gtksourceview.SourceView
|
"redo" | def callback( |
"undo" | def callback( |
A gtksourceview.SourceView
is a text widget that extends the standard
gtk.TextView
It improves the
gtk.TextView
by implementing syntax highlighting and other features typical of a source editor.
gtksourceview.SourceView(buffer
=None)
| a gtksourceview.SourceBuffer
or None |
Returns : | a new gtksourceview.SourceView . |
Creates a new gtksourceview.SourceView
widget displaying the gtksourceview.SourceBuffer
specified by buffer
. If buffer
is None
, a new gtksourceview.SourceBuffer
will be created. One sourcebuffer can be shared among many widgets.
def set_show_line_numbers(show
)
| if TRUE the line numbers will be shown. |
The set_show_line_numbers
() method sets the property
"show-line-numbers" to the value of show
. If show
is set to TRUE
the line numbers should be visible, otherwise not.
def get_show_line_numbers()
Returns : | TRUE if the line numbers are visible,
FALSE otherwise. |
The get_show_line_numbers
() method returns the
value of the "show-line-numbers" property which determines if the line numbers should be visible.
def set_show_line_markers(show
)
| if TRUE the line markers will be shown. |
The set_show_line_markers
() method sets the property
"show-line-markers" to the value of show
. If show
is set to TRUE
the line markers should be visible, otherwise not.
def get_show_line_markers()
Returns : | TRUE if the line markers are visible,
FALSE otherwise. |
The get_show_line_markers
() method returns the
value of the "show-line-markers" property which determines if the line markers should be visible.
def set_tabs_width(width
)
| The width of the tabs |
The set_tabs_width
() method sets the property
"tab-width" to the value of width
.
def get_tabs_width()
Returns : | The value of width . |
The get_tabs_width
() method returns the
value of width
.
def set_auto_indent(enable
)
| if TRUE the auto indentation will be active. |
The set_auto_indent
() method sets the property
"auto-indent" to the value of enable
. If enable
is set to TRUE
the auto indentation is active, otherwise not.
def get_auto_indent()
Returns : | TRUE if the auto indentation is turned on,
FALSE otherwise. |
The get_auto_indent
() method returns the
value of the "auto-indent" property which determines if the auto indentation should be used.
def set_insert_spaces_instead_of_tabs(enable
)
| if TRUE spaces will be used instead of tabs. |
The set_insert_spaces_instead_of_tabs
() method sets the property
"insert-spaces-instead-of-tabs" to the value of enable
. If enable
is set to TRUE
then spaces will be used instead of tabs, otherwise not.
def get_insert_spaces_instead_of_tabs()
Returns : | TRUE if spaces are used instead of tabs,
FALSE otherwise. |
The get_insert_spaces_instead_of_tabs
() method returns the
value of the "insert-spaces-instead-of-tabs" property which determines if spaces should be used instead of tabs.
def set_show_margin(show
)
| if TRUE the line markers will be shown. |
The set_show_margin
() method sets the property
"show-margin" to the value of show
. If show
is set to TRUE
the margin should be visible, otherwise not.
def get_show_margin()
Returns : | TRUE if the line markers are visible,
FALSE otherwise. |
The get_show_margin
() method returns the
value of the "show-margin" property which determines if the margin should be visible.
def set_margin(margin
)
| The width of the margin |
The set_margin
() method sets the property
"margin" to the value of margin
.
def get_margin()
Returns : | The value of margin . |
The get_margin
() method returns the
value of margin
.
def set_marker_pixbuf(marker_type
, pixbuf
)
| The marker that have to be shown in the margin. |
The set_marker_pixbuf
() method sets the marker
that have to be used.
def get_marker_pixbuf()
Returns : | The value of marker_type . |
The get_marker_pixbuf
() method returns the
value of marker_type
.
def set_smart_home_end(enable
)
| if TRUE spaces will be used instead of tabs. |
The set_smart_home_end
() method sets the property
"smart-home-end" to the value of enable
. If enable
is set to TRUE
then HOME and END keys move to first/last characters on
line first before going to the start/end of the line.
def get_smart_home_end()
Returns : | TRUE if HOME and END keys move
to first/last characters on line first before going to the start/end of the line.
FALSE otherwise. |
The get_smart_home_end
() method returns the
value of the "smart-home-end" property which determines if HOME and END keys
move to first/last characters on line first before going to the start/end of the line.