## GeditView GeditView |

## Functions

GtkWidget * | gedit_view_new ()
void | gedit_view_cut_clipboard ()
void | gedit_view_copy_clipboard ()
void | gedit_view_paste_clipboard ()
void | gedit_view_delete_selection ()
void | gedit_view_select_all ()
void | gedit_view_scroll_to_cursor ()
void | gedit_view_set_font ()

## Signals

void | drop-uris | Action

## Types and Values

| GeditViewPrivate
struct | GeditView

## Object Hierarchy

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

## Implemented Interfaces

GeditView implements AtkImplementorIface, GtkBuildable and GtkScrollable.

## Description

## Functions

### gedit_view_new ()

    GtkWidget *
    gedit_view_new (GeditDocument *doc);

Creates a new GeditView object displaying the `doc` document. `doc` cannot be `NULL`.

#### Parameters

doc | a GeditDocument |

#### Returns

a new GeditView.

### gedit_view_cut_clipboard ()

    void
    gedit_view_cut_clipboard (GeditView *view);

### gedit_view_copy_clipboard ()

    void
    gedit_view_copy_clipboard (GeditView *view);

### gedit_view_paste_clipboard ()

    void
    gedit_view_paste_clipboard (GeditView *view);

### gedit_view_delete_selection ()

    void
    gedit_view_delete_selection (GeditView *view);

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

#### Parameters

view | a GeditView |

### gedit_view_select_all ()

    void
    gedit_view_select_all (GeditView *view);

Selects all the text.

#### Parameters

view | a GeditView |

### gedit_view_scroll_to_cursor ()

    void
    gedit_view_scroll_to_cursor (GeditView *view);

Scrolls the `view` to the cursor position.

#### Parameters

view | a GeditView |

### gedit_view_set_font ()

    void
    gedit_view_set_font (GeditView *view,
                         gboolean default_font,
                         const gchar *font_name);

If `default_font` is TRUE, resets the font of the `view` to the default font. Otherwise sets it to `font_name` .

#### Parameters

view | a GeditView |
default_font | whether to reset to the default font |
font_name | the name of the font to use |

## Types and Values

### GeditViewPrivate

    typedef struct _GeditViewPrivate GeditViewPrivate;

### struct GeditView

    struct GeditView;

## Signal Details

### The `“drop-uris”` signal

    void
    user_function (GeditView *view,
                   GStrv      uri_list,
                   gpointer   user_data)

The “drop-uris” signal allows plugins to intercept the default drag-and-drop behaviour of 'text/uri-list'. GeditView handles drag-and-drop in the default handlers of “drag-drop”, “drag-motion” and “drag-data-received”. The view emits the “drop-uris” signal from “drag-data-received” if valid URIs have been dropped. Plugins should connect to “drag-motion”, “drag-drop” and “drag-data-received” to change this default behaviour. They should NOT use this signal because this will not prevent gedit from loading the URI.

#### Parameters

view | a GeditView. |
uri_list | a `NULL`-terminated list of URIs. |
user_data | user data set when the signal handler was connected. |

Flags: Action