gtksourceview.SourceView

a widget that displays the source code

## Synopsis

          gtksourceview.SourceView
          gtk.TextView

    	gtksourceview.SourceView
    	bufferNone

    	set_show_line_numbers
    	show

    	get_show_line_numbers

    	set_show_line_markers
    	show

    	get_show_line_markers

    	set_tabs_width
    	width

    	get_tabs_width

    	set_auto_indent
    	enable

    	get_auto_indent

    	set_insert_spaces_instead_of_tabs
    	enable

    	get_insert_spaces_instead_of_tabs

    	set_show_margin
    	show

    	get_show_margin

    	set_margin
    	margin

    	get_margin

    	set_marker_pixbuf
    	marker_type
    	pixbuf

    	get_marker_pixbuf

    	set_smart_home_end
    	enable

    	get_smart_home_end
    	window

## Ancestry

    +-- gobject.GObject
      +-- gtk.Object
        +-- gtk.Widget
          +-- gtk.Container
            +-- gtk.TextView
              +-- gtksourceview.SourceView

## Properties

> "auto-indent" | Read-Write | If `TRUE` enable auto indentation.
> "insert-spaces-instead-of-tabs" | Read-Write | If `TRUE` spaces will be inserted instead of tabs.
> "margin" | Read-Write | Position of the right margin.
> "show-line-markers" | Read-Write | If `TRUE`, the display line marker pixbufs will be shown.
> "show-line-numbers" | Read-Write | If `TRUE`, the line numbers will be shown.
> "show-margin" | Read-Write | If `TRUE`, the right margin will be shown.
> "smart-home-end" | Read-Write | HOME and END keys move to first/last characters on line first before going to the start/end of the line.
> "tabs-width" | Read-Write | Tabs Width.

## Signal Prototypes

"redo"

- `callback` `sourceview` `user_param1` `...`

"undo"

- `callback` `sourceview` `user_param1` `...`

## Description

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.

## Constructor

    	gtksourceview.SourceView
    	bufferNone

`buffer` :

- 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.

## Methods

### gtksourceview.SourceView.set_show_line_numbers

    	  set_show_line_numbers
    	  show

`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.

### gtksourceview.SourceView.get_show_line_numbers

    	  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.

### gtksourceview.SourceView.set_show_line_markers

    	  set_show_line_markers
    	  show

`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.

### gtksourceview.SourceView.get_show_line_markers

    	  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.

### gtksourceview.SourceView.set_tabs_width

    	  set_tabs_width
    	  width

`width` :

- The width of the tabs

The `set_tabs_width`() method sets the property "tab-width" to the value of `width`.

### gtksourceview.SourceView.get_tabs_width

    	  get_tabs_width

Returns :

- The value of `width`.

The `get_tabs_width`() method returns the value of `width`.

### gtksourceview.SourceView.set_auto_indent

    	  set_auto_indent
    	  enable

`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.

### gtksourceview.SourceView.get_auto_indent

    	  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.

### gtksourceview.SourceView.set_insert_spaces_instead_of_tabs

    	  set_insert_spaces_instead_of_tabs
    	  enable

`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.

### gtksourceview.SourceView.get_insert_spaces_instead_of_tabs

    	  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.

### gtksourceview.SourceView.set_show_margin

    	  set_show_margin
    	  show

`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.

### gtksourceview.SourceView.get_show_margin

    	  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.

### gtksourceview.SourceView.set_tabs_width

    	  set_margin
    	  margin

`margin` :

- The width of the margin

The `set_margin`() method sets the property "margin" to the value of `margin`.

### gtksourceview.SourceView.get_margin

    	  get_margin

Returns :

- The value of `margin`.

The `get_margin`() method returns the value of `margin`.

### gtksourceview.SourceView.set_marker_pixbuf

    	  set_marker_pixbuf
    	  marker_type
    	  pixbuf

`marker_type` :

- The marker that have to be shown in the margin.

The `set_marker_pixbuf`() method sets the marker that have to be used.

### gtksourceview.SourceView.get_marker_pixbuf

    	  get_marker_pixbuf

Returns :

- The value of `marker_type`.

The `get_marker_pixbuf`() method returns the value of `marker_type`.

### gtksourceview.SourceView.set_smart_home_end

    	  set_smart_home_end
    	  enable

`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.

### gtksourceview.SourceView.get_smart_home_end

    	  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.

## Signals

### The "redo" gtksourceview.SourceView Signal

    	  callback
    	  sourceview
    	  user_param1
    	  ...

`sourceview` :

- the sourceview that received the signal

`user_param1` :

- the first user parameter (if any) specified with the `connect`() method

`...` :

- additional user parameters (if any)

The "redo" signal is emitted when ...

### The "undo" gtksourceview.SourceView Signal

    	  callback
    	  sourceview
    	  user_param1
    	  ...

`sourceview` :

- the sourceview that received the signal

`user_param1` :

- the first user parameter (if any) specified with the `connect`() method

`...` :

- additional user parameters (if any)

The "undo" signal is emitted when ....