## GtefView GtefView — Widget that displays a GtefBuffer |

## Functions

GtkWidget * | gtef_view_new ()
void | gtef_view_cut_clipboard ()
void | gtef_view_copy_clipboard ()
void | gtef_view_paste_clipboard ()
void | gtef_view_delete_selection ()
void | gtef_view_select_all ()
void | gtef_view_scroll_to_cursor ()
gboolean | gtef_view_goto_line ()
gboolean | gtef_view_goto_line_offset ()
void | gtef_view_select_lines ()

## Types and Values

| GtefView

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkTextView
                        ╰── GtkSourceView
                            ╰── GtefView

## Implemented Interfaces

GtefView implements AtkImplementorIface, GtkBuildable and GtkScrollable.

## Includes

    #include <gtef/gtef.h>

## Description

GtefView is a subclass of GtkSourceView, to add more features useful for a text editor.

## Functions

### gtef_view_new ()

    GtkWidget *
    gtef_view_new (void);

#### Returns

a new GtefView.

Since: 1.0

### gtef_view_cut_clipboard ()

    void
    gtef_view_cut_clipboard (GtefView *view);

Cuts the clipboard and then scrolls to the cursor position.

#### Parameters

view | a GtefView. |

Since: 1.0

### gtef_view_copy_clipboard ()

    void
    gtef_view_copy_clipboard (GtefView *view);

Copies the clipboard.

#### Parameters

view | a GtefView. |

Since: 1.0

### gtef_view_paste_clipboard ()

    void
    gtef_view_paste_clipboard (GtefView *view);

Pastes the clipboard and then scrolls to the cursor position.

#### Parameters

view | a GtefView. |

Since: 1.0

### gtef_view_delete_selection ()

    void
    gtef_view_delete_selection (GtefView *view);

Deletes the text currently selected in the GtkTextBuffer associated to the view and then scrolls to the cursor position.

#### Parameters

view | a GtefView. |

Since: 1.0

### gtef_view_select_all ()

    void
    gtef_view_select_all (GtefView *view);

Selects all the text.

#### Parameters

view | a GtefView. |

Since: 1.0

### gtef_view_scroll_to_cursor ()

    void
    gtef_view_scroll_to_cursor (GtefView *view);

Scrolls the `view` to the cursor position.

#### Parameters

view | a GtefView. |

Since: 1.0

### gtef_view_goto_line ()

    gboolean
    gtef_view_goto_line (GtefView *view,
                         gint line);

Places the cursor at the position returned by `gtk_text_buffer_get_iter_at_line()`, and scrolls to that position.

#### Parameters

view | a GtefView. |
line | a line number, counting from 0. |

#### Returns

`TRUE` if the cursor has been moved exactly to `line` , `FALSE` if that line didn't exist.

Since: 2.0

### gtef_view_goto_line_offset ()

    gboolean
    gtef_view_goto_line_offset (GtefView *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.

#### Parameters

view | a GtefView. |
line | a line number, counting from 0. |
line_offset | the line offset, in characters (not bytes). |

#### Returns

`TRUE` if the cursor has been moved exactly to `line` and `line_offset` , `FALSE` if that position didn't exist.

Since: 2.0

### gtef_view_select_lines ()

    void
    gtef_view_select_lines (GtefView *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.

#### Parameters

view | a GtefView. |
start_line | start of the region to select. |
end_line | end of the region to select. |

Since: 2.0

## Types and Values

### GtefView

    typedef struct _GtefView GtefView;