IdeSourceView: Builder SDK Reference

## IdeSourceView IdeSourceView |

## Functions

gboolean | ide_source_view_has_snippet ()
void | ide_source_view_clear_snippets ()
IdeSnippet * | ide_source_view_get_current_snippet ()
guint | ide_source_view_get_visual_column ()
void | ide_source_view_get_visual_position ()
gint | ide_source_view_get_count ()
IdeFileSettings * | ide_source_view_get_file_settings ()
const PangoFontDescription * | ide_source_view_get_font_desc ()
PangoFontDescription * | ide_source_view_get_scaled_font_desc ()
gboolean | ide_source_view_get_highlight_current_line ()
gboolean | ide_source_view_get_insert_matching_brace ()
void | ide_source_view_get_iter_at_visual_column ()
const gchar * | ide_source_view_get_mode_display_name ()
const gchar * | ide_source_view_get_mode_name ()
gboolean | ide_source_view_get_overwrite_braces ()
gboolean | ide_source_view_get_overwrite ()
guint | ide_source_view_get_scroll_offset ()
gboolean | ide_source_view_get_show_grid_lines ()
gboolean | ide_source_view_get_show_line_changes ()
gboolean | ide_source_view_get_show_line_diagnostics ()
gboolean | ide_source_view_get_show_line_numbers ()
gboolean | ide_source_view_get_snippet_completion ()
gboolean | ide_source_view_get_spell_checking ()
void | ide_source_view_get_visible_rect ()
void | ide_source_view_jump ()
void | ide_source_view_pop_snippet ()
void | ide_source_view_push_snippet ()
void | ide_source_view_rollback_search ()
void | ide_source_view_save_search ()
void | ide_source_view_set_count ()
void | ide_source_view_set_font_desc ()
void | ide_source_view_set_font_name ()
void | ide_source_view_set_highlight_current_line ()
void | ide_source_view_set_insert_matching_brace ()
void | ide_source_view_set_misspelled_word ()
void | ide_source_view_set_overwrite_braces ()
void | ide_source_view_set_scroll_offset ()
void | ide_source_view_set_show_grid_lines ()
void | ide_source_view_set_show_line_changes ()
void | ide_source_view_set_show_line_diagnostics ()
void | ide_source_view_set_show_line_numbers ()
void | ide_source_view_set_snippet_completion ()
void | ide_source_view_set_spell_checking ()
gboolean | ide_source_view_move_mark_onscreen ()
gboolean | ide_source_view_place_cursor_onscreen ()
void | ide_source_view_clear_search ()
void | ide_source_view_scroll_mark_onscreen ()
void | ide_source_view_scroll_to_mark ()
void | ide_source_view_scroll_to_iter ()
void | ide_source_view_scroll_to_insert ()
IdeCompletion * | ide_source_view_get_completion ()
gboolean | ide_source_view_is_processing_key ()

## Properties

guint | completion-n-rows | Read / Write
gint | count | Read / Write
IdeFileSettings * | file-settings | Read
PangoFontDescription * | font-desc | Read / Write
gchar * | font-name | Write / Construct
IdeIndentStyle | indent-style | Write
IdeIndenter * | indenter | Read
gboolean | insert-matching-brace | Read / Write
gboolean | interactive-completion | Read / Write
gchar * | mode-display-name | Read
gint | overscroll | Read / Write
gboolean | overwrite-braces | Read / Write
guint | scroll-offset | Read / Write
gboolean | show-grid-lines | Read / Write
gboolean | show-line-changes | Read / Write
gboolean | show-line-diagnostics | Read / Write

## Signals

void | action | Action
void | add-cursor | Action
void | append-to-count | Action
void | begin-macro | Action
void | begin-rename | Action
void | begin-user-action | Action
void | capture-modifier | Action
void | clear-count | Action
void | clear-modifier | Action
void | clear-search | Action
void | clear-selection | Action
void | clear-snippets | Action
void | copy-clipboard-extended | Action
void | cycle-completion | Action
void | decrease-font-size | Action
void | delete-selection | Action
void | draw-bubbles | Run Last
void | duplicate-entire-line | Action
void | end-macro | Action
void | end-user-action | Action
void | find-references | Action
void | focus-location | Run Last
void | format-selection | Action
void | goto-definition | Action
void | hide-completion | Action
void | increase-font-size | Action
void | indent-selection | Action
void | insert-modifier | Action
void | jump | Run Last
void | move-error | Action
void | move-search | Action
void | movement | Action
void | paste-clipboard-extended | Action
void | pop-selection | Action
void | pop-snippet | Run Last
void | push-selection | Action
void | push-snippet | Run Last
void | rebuild-highlight | Action
void | reindent | Action
void | remove-cursors | Action
void | replay-macro | Action
void | request-documentation | Action
void | reset | Action
void | reset-font-size | Action
void | restore-insert-mark | Action
void | save-command | Action
void | save-insert-mark | Action
void | save-search-char | Action
void | select-inner | Action
void | select-tag | Action
void | selection-theatric | Action
void | set-mode | Action
void | set-overwrite | Action
void | set-search-text | Action
void | sort | Action
void | swap-selection-bounds | Action

## Types and Values

#define | IDE_TYPE_SOURCE_VIEW
enum | IdeCursorType
enum | IdeSourceViewModeType
enum | IdeSourceViewTheatric
enum | IdeSourceViewMovement
enum | IdeSourceScrollAlign
struct | IdeSourceViewClass
| IdeSourceView

## Object Hierarchy

        GEnum
        ├── IdeCursorType
        ├── IdeSourceViewModeType
        ├── IdeSourceViewMovement
        ╰── IdeSourceViewTheatric
        GFlags
        ╰── IdeSourceScrollAlign
        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkTextView
                        ╰── GtkSourceView
                            ╰── IdeSourceView

## Implemented Interfaces

IdeSourceView implements AtkImplementorIface, GtkBuildable and GtkScrollable.

## Description

## Functions

### ide_source_view_has_snippet ()

    gboolean
    ide_source_view_has_snippet (IdeSourceView *self);

Checks if there is an active snippet.

#### Parameters

self | a IdeSourceView |

#### Returns

`TRUE` if there is an active snippet.

Since: 3.30

### ide_source_view_clear_snippets ()

    void
    ide_source_view_clear_snippets (IdeSourceView *self);

### ide_source_view_get_current_snippet ()

    IdeSnippet *
    ide_source_view_get_current_snippet (IdeSourceView *self);

Gets the current snippet if there is one, otherwise `NULL`.

#### Returns

An IdeSnippet or `NULL`.

[transfer none][nullable]

### ide_source_view_get_visual_column ()

    guint
    ide_source_view_get_visual_column (IdeSourceView *self,
                                       const GtkTextIter *location);

### ide_source_view_get_visual_position ()

    void
    ide_source_view_get_visual_position (IdeSourceView *self,
                                         guint *line,
                                         guint *line_column);

### ide_source_view_get_count ()

    gint
    ide_source_view_get_count (IdeSourceView *self);

### ide_source_view_get_file_settings ()

    IdeFileSettings *
    ide_source_view_get_file_settings (IdeSourceView *self);

Gets the “file-settings” property. This contains various settings for how the file should be rendered in the view, and preferences such as spaces vs tabs.

#### Parameters

self | an IdeSourceView. |

#### Returns

An IdeFileSettings or `NULL`.

[transfer none][nullable]

### ide_source_view_get_font_desc ()

    const PangoFontDescription *
    ide_source_view_get_font_desc (IdeSourceView *self);

### ide_source_view_get_scaled_font_desc ()

    PangoFontDescription *
    ide_source_view_get_scaled_font_desc (IdeSourceView *self);

Like `ide_source_view_get_font_desc()` but takes the editor zoom into account. You must free the result with `pango_font_description_free()`.

#### Parameters

self | a IdeSourceView |

#### Returns

a PangoFontDescription.

[transfer full]

### ide_source_view_get_highlight_current_line ()

    gboolean
    ide_source_view_get_highlight_current_line
                                   (IdeSourceView *self);

### ide_source_view_get_insert_matching_brace ()

    gboolean
    ide_source_view_get_insert_matching_brace
                                   (IdeSourceView *self);

### ide_source_view_get_iter_at_visual_column ()

    void
    ide_source_view_get_iter_at_visual_column
                                   (IdeSourceView *self,
                                    guint column,
                                    GtkTextIter *location);

### ide_source_view_get_mode_display_name ()

    const gchar *
    ide_source_view_get_mode_display_name (IdeSourceView *self);

### ide_source_view_get_mode_name ()

    const gchar *
    ide_source_view_get_mode_name (IdeSourceView *self);

### ide_source_view_get_overwrite_braces ()

    gboolean
    ide_source_view_get_overwrite_braces (IdeSourceView *self);

### ide_source_view_get_overwrite ()

    gboolean
    ide_source_view_get_overwrite (IdeSourceView *self);

### ide_source_view_get_scroll_offset ()

    guint
    ide_source_view_get_scroll_offset (IdeSourceView *self);

Gets the “scroll-offset” property. This property contains the number of lines that should be kept above or below the line containing the insertion cursor relative to the top and bottom of the visible text window.

### ide_source_view_get_show_grid_lines ()

    gboolean
    ide_source_view_get_show_grid_lines (IdeSourceView *self);

### ide_source_view_get_show_line_changes ()

    gboolean
    ide_source_view_get_show_line_changes (IdeSourceView *self);

### ide_source_view_get_show_line_diagnostics ()

    gboolean
    ide_source_view_get_show_line_diagnostics
                                   (IdeSourceView *self);

### ide_source_view_get_show_line_numbers ()

    gboolean
    ide_source_view_get_show_line_numbers (IdeSourceView *self);

### ide_source_view_get_snippet_completion ()

    gboolean
    ide_source_view_get_snippet_completion
                                   (IdeSourceView *self);

### ide_source_view_get_spell_checking ()

    gboolean
    ide_source_view_get_spell_checking (IdeSourceView *self);

### ide_source_view_get_visible_rect ()

    void
    ide_source_view_get_visible_rect (IdeSourceView *self,
                                      GdkRectangle *visible_rect);

Gets the visible region in buffer coordinates that is the visible area of the buffer. This is similar to `gtk_text_view_get_visible_area()` except that it takes into account the “scroll-offset” property to ensure there is space above and below the visible_rect.

#### Parameters

self | An IdeSourceView. |
visible_rect | a GdkRectangle. | [out]

### ide_source_view_jump ()

    void
    ide_source_view_jump (IdeSourceView *self,
                          const GtkTextIter *from,
                          const GtkTextIter *to);

### ide_source_view_pop_snippet ()

    void
    ide_source_view_pop_snippet (IdeSourceView *self);

### ide_source_view_push_snippet ()

    void
    ide_source_view_push_snippet (IdeSourceView *self,
                                  IdeSnippet *snippet,
                                  const GtkTextIter *location);

Pushes a new snippet onto the source view.

#### Parameters

self | An IdeSourceView |
snippet | An IdeSnippet. |
location | A location for the snippet or `NULL`. | [allow-none]

### ide_source_view_rollback_search ()

    void
    ide_source_view_rollback_search (IdeSourceView *self);

### ide_source_view_save_search ()

    void
    ide_source_view_save_search (IdeSourceView *self,
                                 const gchar *search_text);

### ide_source_view_set_count ()

    void
    ide_source_view_set_count (IdeSourceView *self,
                               gint count);

### ide_source_view_set_font_desc ()

    void
    ide_source_view_set_font_desc (IdeSourceView *self,
                                   const PangoFontDescription *font_desc);

### ide_source_view_set_font_name ()

    void
    ide_source_view_set_font_name (IdeSourceView *self,
                                   const gchar *font_name);

### ide_source_view_set_highlight_current_line ()

    void
    ide_source_view_set_highlight_current_line
                                   (IdeSourceView *self,
                                    gboolean highlight_current_line);

### ide_source_view_set_insert_matching_brace ()

    void
    ide_source_view_set_insert_matching_brace
                                   (IdeSourceView *self,
                                    gboolean insert_matching_brace);

### ide_source_view_set_misspelled_word ()

    void
    ide_source_view_set_misspelled_word (IdeSourceView *self,
                                         GtkTextIter *start,
                                         GtkTextIter *end);

### ide_source_view_set_overwrite_braces ()

    void
    ide_source_view_set_overwrite_braces (IdeSourceView *self,
                                          gboolean overwrite_braces);

### ide_source_view_set_scroll_offset ()

    void
    ide_source_view_set_scroll_offset (IdeSourceView *self,
                                       guint scroll_offset);

Sets the “scroll-offset” property. See `ide_source_view_get_scroll_offset()` for more information. Set to 0 to unset this property.

### ide_source_view_set_show_grid_lines ()

    void
    ide_source_view_set_show_grid_lines (IdeSourceView *self,
                                         gboolean show_grid_lines);

### ide_source_view_set_show_line_changes ()

    void
    ide_source_view_set_show_line_changes (IdeSourceView *self,
                                           gboolean show_line_changes);

### ide_source_view_set_show_line_diagnostics ()

    void
    ide_source_view_set_show_line_diagnostics
                                   (IdeSourceView *self,
                                    gboolean show_line_diagnostics);

### ide_source_view_set_show_line_numbers ()

    void
    ide_source_view_set_show_line_numbers (IdeSourceView *self,
                                           gboolean show_line_numbers);

### ide_source_view_set_snippet_completion ()

    void
    ide_source_view_set_snippet_completion
                                   (IdeSourceView *self,
                                    gboolean snippet_completion);

### ide_source_view_set_spell_checking ()

    void
    ide_source_view_set_spell_checking (IdeSourceView *self,
                                        gboolean enable);

### ide_source_view_move_mark_onscreen ()

    gboolean
    ide_source_view_move_mark_onscreen (IdeSourceView *self,
                                        GtkTextMark *mark);

### ide_source_view_place_cursor_onscreen ()

    gboolean
    ide_source_view_place_cursor_onscreen (IdeSourceView *self);

### ide_source_view_clear_search ()

    void
    ide_source_view_clear_search (IdeSourceView *self);

### ide_source_view_scroll_mark_onscreen ()

    void
    ide_source_view_scroll_mark_onscreen (IdeSourceView *self,
                                          GtkTextMark *mark,
                                          IdeSourceScrollAlign use_align,
                                          gdouble alignx,
                                          gdouble aligny);

### ide_source_view_scroll_to_mark ()

    void
    ide_source_view_scroll_to_mark (IdeSourceView *self,
                                    GtkTextMark *mark,
                                    gdouble within_margin,
                                    IdeSourceScrollAlign use_align,
                                    gdouble xalign,
                                    gdouble yalign,
                                    gboolean animate_scroll);

### ide_source_view_scroll_to_iter ()

    void
    ide_source_view_scroll_to_iter (IdeSourceView *self,
                                    const GtkTextIter *iter,
                                    gdouble within_margin,
                                    IdeSourceScrollAlign use_align,
                                    gdouble xalign,
                                    gdouble yalign,
                                    gboolean animate_scroll);

### ide_source_view_scroll_to_insert ()

    void
    ide_source_view_scroll_to_insert (IdeSourceView *self);

### ide_source_view_get_completion ()

    IdeCompletion *
    ide_source_view_get_completion (IdeSourceView *self);

Get the completion for the IdeSourceView

#### Parameters

self | a IdeSourceView |

#### Returns

an IdeCompletion.

[transfer none]

Since: 3.30

### ide_source_view_is_processing_key ()

    gboolean
    ide_source_view_is_processing_key (IdeSourceView *self);

## Types and Values

### IDE_TYPE_SOURCE_VIEW

    #define IDE_TYPE_SOURCE_VIEW  (ide_source_view_get_type())

### enum IdeCursorType

#### Members

IDE_CURSOR_COLUMN |  |
IDE_CURSOR_SELECT |  |
IDE_CURSOR_MATCH |  |

### enum IdeSourceViewModeType

The type of keyboard mode.

#### Members

IDE_SOURCE_VIEW_MODE_TYPE_TRANSIENT |  |
IDE_SOURCE_VIEW_MODE_TYPE_PERMANENT |  |
IDE_SOURCE_VIEW_MODE_TYPE_MODAL |  |

### enum IdeSourceViewTheatric

The style of theatric.

#### Members

IDE_SOURCE_VIEW_THEATRIC_EXPAND | expand from selection location. |
IDE_SOURCE_VIEW_THEATRIC_SHRINK | shrink from selection location. |

### enum IdeSourceViewMovement

The type of movement.

Some of these movements may be modified by using the modify-repeat action. First adjust the repeat and then perform the "movement" action.

#### Members

IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_OFFSET | move to previous character in the file. This includes line breaks. |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_OFFSET | move to next character in the file. This includes line breaks. |
IDE_SOURCE_VIEW_MOVEMENT_NTH_CHAR | move to nth character in line. Use a repeat to specify the target character within the line. |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_CHAR | move to previous character in line. |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_CHAR | move to next character in line. |
IDE_SOURCE_VIEW_MOVEMENT_FIRST_CHAR | move to line offset of zero. |
IDE_SOURCE_VIEW_MOVEMENT_FIRST_NONSPACE_CHAR | move to first non-whitespace character in line. |
IDE_SOURCE_VIEW_MOVEMENT_MIDDLE_CHAR | move to the middle character in the line. |
IDE_SOURCE_VIEW_MOVEMENT_LAST_CHAR | move to the last character in the line. this can be inclusve or exclusive. inclusive is equivalent to `IDE_SOURCE_VIEW_MOVEMENT_LINE_END`. |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_WORD_START | move to beginning of next word. |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_FULL_WORD_START |  |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_SUB_WORD_START | move to the next sub-word start, similar to the default in GtkTextView. This includes the underline character as a word break, as is common in Emacs. |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_SUB_WORD_START | move to the previous sub-wird start, similar to the default in GtkTextView. This includes the underline character as a word break, as is common in Emacs. |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_WORD_START | move to beginning of previous word. |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_FULL_WORD_START |  |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_WORD_END | move to end of previous word. |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_FULL_WORD_END |  |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_WORD_END | move to end of next word. |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_FULL_WORD_END |  |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_WORD_START_NEWLINE_STOP |  |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_FULL_WORD_START_NEWLINE_STOP |  |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_WORD_START_NEWLINE_STOP |  |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_FULL_WORD_START_NEWLINE_STOP |  |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_WORD_END_NEWLINE_STOP |  |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_FULL_WORD_END_NEWLINE_STOP |  |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_WORD_END_NEWLINE_STOP |  |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_FULL_WORD_END_NEWLINE_STOP |  |
IDE_SOURCE_VIEW_MOVEMENT_SENTENCE_START | move to beginning of sentance. |
IDE_SOURCE_VIEW_MOVEMENT_SENTENCE_END | move to end of sentance. |
IDE_SOURCE_VIEW_MOVEMENT_PARAGRAPH_START | move to start of paragraph. |
IDE_SOURCE_VIEW_MOVEMENT_PARAGRAPH_END | move to end of paragraph. |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_LINE | move to previous line, keeping line offset if possible. |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_LINE | move to next line, keeping line offset if possible. |
IDE_SOURCE_VIEW_MOVEMENT_FIRST_LINE | move to first line in file, line offset of zero. |
IDE_SOURCE_VIEW_MOVEMENT_NTH_LINE | move to nth line, line offset of zero. use repeat to select the given line number. |
IDE_SOURCE_VIEW_MOVEMENT_LAST_LINE | move to last line in file, with line offset of zero. |
IDE_SOURCE_VIEW_MOVEMENT_LINE_PERCENTAGE | move to line based on percentage. Use repeat to specify the percentage, 0 to 100. |
IDE_SOURCE_VIEW_MOVEMENT_LINE_CHARS | special selection to select all line characters up to the cursor position. special care will be taken if the line is blank to select only the blank space if any. otherwise, the line break will be selected. |
IDE_SOURCE_VIEW_MOVEMENT_LINE_END | This will move you to the location of the newline at the end of the current line. It does not support exclusive will not select the newline, while inclusive will select the newline. |
IDE_SOURCE_VIEW_MOVEMENT_HALF_PAGE_UP | move half a page up. |
IDE_SOURCE_VIEW_MOVEMENT_HALF_PAGE_DOWN | move half a page down. |
IDE_SOURCE_VIEW_MOVEMENT_HALF_PAGE_LEFT | move half a page left. |
IDE_SOURCE_VIEW_MOVEMENT_HALF_PAGE_RIGHT | move half a page right. |
IDE_SOURCE_VIEW_MOVEMENT_PAGE_UP | move a full page up. |
IDE_SOURCE_VIEW_MOVEMENT_PAGE_UP_LINES | move a full page up, but extend to whole line. |
IDE_SOURCE_VIEW_MOVEMENT_PAGE_DOWN | move a full page down. |
IDE_SOURCE_VIEW_MOVEMENT_PAGE_DOWN_LINES | move a full page down, but extend to whole line. |
IDE_SOURCE_VIEW_MOVEMENT_SCREEN_UP | move to viewport up by visible line, adjusting cursor to stay on screen if necessary. |
IDE_SOURCE_VIEW_MOVEMENT_SCREEN_DOWN | move to viewport down by visible line, adjusting cursor to stay on screen if necessary. |
IDE_SOURCE_VIEW_MOVEMENT_SCREEN_LEFT | move to viewport left by visible char, adjusting cursor to stay on screen if necessary. |
IDE_SOURCE_VIEW_MOVEMENT_SCREEN_RIGHT | move to viewport right by visible char, adjusting cursor to stay on screen if necessary. |
IDE_SOURCE_VIEW_MOVEMENT_SCREEN_TOP | move to the top of the screen. |
IDE_SOURCE_VIEW_MOVEMENT_SCREEN_MIDDLE | move to the middle of the screen. |
IDE_SOURCE_VIEW_MOVEMENT_SCREEN_BOTTOM | move to the bottom of the screen. |
IDE_SOURCE_VIEW_MOVEMENT_MATCH_SPECIAL | move to match of brace, bracket, comment. |
IDE_SOURCE_VIEW_MOVEMENT_SCROLL_SCREEN_TOP | scroll until insert cursor or [count]th line is at screen top. |
IDE_SOURCE_VIEW_MOVEMENT_SCROLL_SCREEN_CENTER | scroll until insert cursor or [count]th line is at screen center. |
IDE_SOURCE_VIEW_MOVEMENT_SCROLL_SCREEN_BOTTOM | scroll until insert cursor or [count]th line is at screen bottom. |
IDE_SOURCE_VIEW_MOVEMENT_SCROLL_SCREEN_LEFT | scroll until insert cursor or [count]th char is at screen left. |
IDE_SOURCE_VIEW_MOVEMENT_SCROLL_SCREEN_RIGHT | scroll until insert cursor or [count]th char is at screen right. |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_UNMATCHED_BRACE |  |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_UNMATCHED_BRACE |  |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_UNMATCHED_PAREN |  |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_UNMATCHED_PAREN |  |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_MATCH_MODIFIER |  |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_MATCH_MODIFIER |  |
IDE_SOURCE_VIEW_MOVEMENT_NEXT_MATCH_SEARCH_CHAR | move to the next matching char according to f and t in vim. |
IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_MATCH_SEARCH_CHAR | move to the previous matching char according to F and T in vim. |
IDE_SOURCE_VIEW_MOVEMENT_SMART_HOME | Moves to the first non-whitespace character unless already positioned there. Otherwise, it moves to the first character. |

### enum IdeSourceScrollAlign

#### Members

IDE_SOURCE_SCROLL_NONE |  |
IDE_SOURCE_SCROLL_BOTH |  |
IDE_SOURCE_SCROLL_X |  |
IDE_SOURCE_SCROLL_Y |  |

### struct IdeSourceViewClass

    struct IdeSourceViewClass {
      GtkSourceViewClass parent_class;

      void (*append_to_count)             (IdeSourceView           *self,
                                           gint                     digit);
      void (*auto_indent)                 (IdeSourceView           *self);
      void (*begin_macro)                 (IdeSourceView           *self);
      void (*capture_modifier)            (IdeSourceView           *self);
      void (*clear_count)                 (IdeSourceView           *self);
      void (*clear_modifier)              (IdeSourceView           *self);
      void (*clear_search)                (IdeSourceView           *self);
      void (*clear_selection)             (IdeSourceView           *self);
      void (*clear_snippets)              (IdeSourceView           *self);
      void (*cycle_completion)            (IdeSourceView           *self,
                                           GtkDirectionType         direction);
      void (*delete_selection)            (IdeSourceView           *self);
      void (*end_macro)                   (IdeSourceView           *self);
      void (*focus_location)              (IdeSourceView           *self,
                                           IdeSourceLocation       *location);
      void (*goto_definition)             (IdeSourceView           *self);
      void (*hide_completion)             (IdeSourceView           *self);
      void (*indent_selection)            (IdeSourceView           *self,
                                           gint                     level);
      void (*insert_at_cursor_and_indent) (IdeSourceView           *self,
                                           const gchar             *str);
      void (*insert_modifier)             (IdeSourceView           *self,
                                           gboolean                 use_count);
      void (*jump)                        (IdeSourceView           *self,
                                           const GtkTextIter       *from,
                                           const GtkTextIter       *to);
      void (*movement)                    (IdeSourceView           *self,
                                           IdeSourceViewMovement    movement,
                                           gboolean                 extend_selection,
                                           gboolean                 exclusive,
                                           gboolean                 apply_count);
      void (*move_error)                  (IdeSourceView           *self,
                                           GtkDirectionType         dir);
      void (*move_search)                 (IdeSourceView           *self,
                                           GtkDirectionType         dir,
                                           gboolean                 extend_selection,
                                           gboolean                 select_match,
                                           gboolean                 exclusive,
                                           gboolean                 apply_count,
                                           gboolean                 at_word_boundaries);
      void (*paste_clipboard_extended)    (IdeSourceView           *self,
                                           gboolean                 smart_lines,
                                           gboolean                 after_cursor,
                                           gboolean                 place_cursor_at_original);
      void (*push_selection)              (IdeSourceView           *self);
      void (*pop_selection)               (IdeSourceView           *self);
      void (*rebuild_highlight)           (IdeSourceView           *self);
      void (*replay_macro)                (IdeSourceView           *self,
                                           gboolean                 use_count);
      void (*request_documentation)       (IdeSourceView           *self);
      void (*restore_insert_mark)         (IdeSourceView           *self);
      void (*save_command)                (IdeSourceView           *self);
      void (*save_search_char)            (IdeSourceView           *self);
      void (*save_insert_mark)            (IdeSourceView           *self);
      void (*select_inner)                (IdeSourceView           *self,
                                           const gchar             *inner_left,
                                           const gchar             *inner_right,
                                           gboolean                 exclusive,
                                           gboolean                 string_mode);
      void (*select_tag)                  (IdeSourceView           *self,
                                           gboolean                 exclusive);
      void (*selection_theatric)          (IdeSourceView           *self,
                                           IdeSourceViewTheatric    theatric);
      void (*set_mode)                    (IdeSourceView           *self,
                                           const gchar             *mode,
                                           IdeSourceViewModeType    type);
      void (*set_overwrite)               (IdeSourceView           *self,
                                           gboolean                 overwrite);
      void (*set_search_text)             (IdeSourceView           *self,
                                           const gchar             *search_text,
                                           gboolean                 from_selection);
      void (*sort)                        (IdeSourceView           *self,
                                           gboolean                 ignore_case,
                                           gboolean                 reverse);
      void (*swap_selection_bounds)       (IdeSourceView           *self);
      void (*increase_font_size)          (IdeSourceView           *self);
      void (*decrease_font_size)          (IdeSourceView           *self);
      void (*reset_font_size)             (IdeSourceView           *self);
      void (*begin_rename)                (IdeSourceView           *self);
      void (*add_cursor)                  (IdeSourceView           *self,
                                           guint                    type);
      void (*remove_cursors)              (IdeSourceView           *self);
      void (*copy_clipboard_extended)     (IdeSourceView           *self);
    };

### IdeSourceView

    typedef struct _IdeSourceView IdeSourceView;

## Property Details

### The `“completion-n-rows”` property

      “completion-n-rows”        guint

The number of completion rows to display to the user.

Flags: Read / Write

Allowed values: [1,32]

Default value: 5

### The `“count”` property

      “count”                    gint

The count for movements.

Flags: Read / Write

Allowed values: >= -1

Default value: 0

### The `“file-settings”` property

      “file-settings”            IdeFileSettings *

The file settings that have been loaded for the file.

Flags: Read

### The `“font-desc”` property

      “font-desc”                PangoFontDescription *

The Pango font description to use for rendering source.

Flags: Read / Write

### The `“font-name”` property

      “font-name”                gchar *

The Pango font name to use for rendering source.

Flags: Write / Construct

Default value: "Monospace"

### The `“indent-style”` property

      “indent-style”             IdeIndentStyle

Indent Style.

Flags: Write

Default value: IDE_INDENT_STYLE_TABS

### The `“indenter”` property

      “indenter”                 IdeIndenter *

Indenter.

Flags: Read

### The `“insert-matching-brace”` property

      “insert-matching-brace”    gboolean

Insert a matching brace/bracket/quotation/parenthesis.

Flags: Read / Write

Default value: FALSE

### The `“interactive-completion”` property

      “interactive-completion”   gboolean

If completion should be completed interactively.

Flags: Read / Write

Default value: TRUE

### The `“mode-display-name”` property

      “mode-display-name”        gchar *

The display name of the keybinding mode.

Flags: Read

Default value: NULL

### The `“overscroll”` property

      “overscroll”               gint

The number of lines to scroll beyond the end of the buffer. A negative number of lines will scroll until only that number of lines is visible.

Flags: Read / Write

Default value: 1

### The `“overwrite-braces”` property

      “overwrite-braces”         gboolean

Overwrite a matching brace/bracket/quotation/parenthesis.

Flags: Read / Write

Default value: FALSE

### The `“scroll-offset”` property

      “scroll-offset”            guint

The number of lines between the insertion cursor and screen boundary.

Flags: Read / Write

Default value: 0

### The `“show-grid-lines”` property

      “show-grid-lines”          gboolean

If the background grid should be shown.

Flags: Read / Write

Default value: FALSE

### The `“show-line-changes”` property

      “show-line-changes”        gboolean

If line changes should be shown in the left gutter.

Flags: Read / Write

Default value: FALSE

### The `“show-line-diagnostics”` property

      “show-line-diagnostics”    gboolean

If the diagnostics gutter should be visible.

This also requires that IdeBuffer:highlight-diagnostics is set to `TRUE` to generate diagnostics.

Flags: Read / Write

Default value: TRUE

## Signal Details

### The `“action”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gchar         *arg1,
                   gchar         *arg2,
                   gchar         *arg3,
                   gpointer       user_data)

Flags: Action

### The `“add-cursor”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   IdeCursorType  arg1,
                   gpointer       user_data)

Flags: Action

### The `“append-to-count”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gint           arg1,
                   gpointer       user_data)

Flags: Action

### The `“begin-macro”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

This signal will begin recording input to the IdeSourceView. This includes the current IdeSourceViewMode, “count” and “modifier” which will be used to replay the sequence starting from the correct state.

Pair this with an emission of “end-macro” to complete the sequence.

#### Parameters

user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“begin-rename”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

This signal is emitted when the source view should begin a rename operation using the IdeRenameProvider from the underlying buffer. The cursor position will be used as the location when sending the request to the provider.

#### Parameters

user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“begin-user-action”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“capture-modifier”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

This signal will block the main loop in a similar fashion to how `gtk_dialog_run()` performs until a key-press has occurred that can be captured for use in movements.

Pressing Escape or unfocusing the widget will break from this loop.

Use of this signal is not recommended except in very specific cases.

#### Parameters

user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“clear-count”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“clear-modifier”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“clear-search”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“clear-selection”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“clear-snippets”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“copy-clipboard-extended”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“cycle-completion”` signal

    void
    user_function (IdeSourceView   *idesourceview,
                   GtkDirectionType arg1,
                   gpointer         user_data)

Flags: Action

### The `“decrease-font-size”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“delete-selection”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“draw-bubbles”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   CairoContext  *arg1,
                   gpointer       user_data)

Flags: Run Last

### The `“duplicate-entire-line”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“end-macro”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

You should call “begin-macro” before emitting this signal.

Complete a macro recording sequence. This may be called more times than is necessary, since IdeSourceView will only keep the most recent macro recording. This can be helpful when implementing recording sequences such as in Vim.

#### Parameters

user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“end-user-action”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“find-references”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“focus-location”` signal

    void
    user_function (IdeSourceView     *idesourceview,
                   IdeSourceLocation *arg1,
                   gpointer           user_data)

Flags: Run Last

### The `“format-selection”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“goto-definition”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“hide-completion”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“increase-font-size”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“indent-selection”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gint           arg1,
                   gpointer       user_data)

Flags: Action

### The `“insert-modifier”` signal

    void
    user_function (IdeSourceView *self,
                   gboolean       use_count,
                   gpointer       user_data)

Inserts the current modifier character at the insert mark in the buffer. If `use_count` is `TRUE`, then the character will be inserted “count” times.

#### Parameters

self | An IdeSourceView |
use_count | If the count property should be used to repeat. |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“jump”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   GtkTextIter   *arg1,
                   GtkTextIter   *arg2,
                   gpointer       user_data)

Flags: Run Last

### The `“move-error”` signal

    void
    user_function (IdeSourceView   *self,
                   GtkDirectionType dir,
                   gpointer         user_data)

Moves to the next search result either forwards or backwards.

#### Parameters

self | An IdeSourceView. |
dir | The direction to move. |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“move-search”` signal

    void
    user_function (IdeSourceView   *idesourceview,
                   GtkDirectionType arg1,
                   gboolean         arg2,
                   gboolean         arg3,
                   gboolean         arg4,
                   gboolean         arg5,
                   gint             arg6,
                   gpointer         user_data)

Flags: Action

### The `“movement”` signal

    void
    user_function (IdeSourceView        *idesourceview,
                   IdeSourceViewMovement arg1,
                   gboolean              arg2,
                   gboolean              arg3,
                   gboolean              arg4,
                   gpointer              user_data)

Flags: Action

### The `“paste-clipboard-extended”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gboolean       arg1,
                   gboolean       arg2,
                   gboolean       arg3,
                   gpointer       user_data)

Flags: Action

### The `“pop-selection”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Reselects a previousl selected range of text that was saved using IdeSourceView::push-selection.

#### Parameters

user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“pop-snippet”` signal

    void
    user_function (IdeSourceView *self,
                   gpointer       user_data)

Pops the current snippet from the sourceview if there is one.

#### Parameters

self | An IdeSourceView |
snippet | An IdeSnippet. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“push-selection”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Saves the current selection away to be restored by a call to IdeSourceView::pop-selection. You must pop the selection to keep the selection stack in consistent order.

#### Parameters

user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“push-snippet”` signal

    void
    user_function (IdeSourceView *self,
                   IdeSnippet    *snippet,
                   GtkTextIter   *iter,
                   gpointer       user_data)

Pushes `snippet` onto the snippet stack at either `iter` or the insertion mark if `iter` is not provided.

#### Parameters

self | An IdeSourceView |
snippet | An IdeSnippet. |
iter | The location for the snippet, or `NULL`. | [allow-none]
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“rebuild-highlight”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“reindent”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“remove-cursors”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“replay-macro”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gboolean       arg1,
                   gpointer       user_data)

Flags: Action

### The `“request-documentation”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“reset”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

This is a helper signal that will try to reset keyboard input and various stateful settings of the sourceview. This is a good signal to map to the "Escape" key.

#### Parameters

user_data | user data set when the signal handler was connected. |

Flags: Action

Since: 3.26

### The `“reset-font-size”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“restore-insert-mark”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“save-command”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“save-insert-mark”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“save-search-char”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action

### The `“select-inner”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gchar         *arg1,
                   gchar         *arg2,
                   gboolean       arg3,
                   gboolean       arg4,
                   gpointer       user_data)

Flags: Action

### The `“select-tag”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gboolean       arg1,
                   gpointer       user_data)

Flags: Action

### The `“selection-theatric”` signal

    void
    user_function (IdeSourceView        *idesourceview,
                   IdeSourceViewTheatric arg1,
                   gpointer              user_data)

Flags: Action

### The `“set-mode”` signal

    void
    user_function (IdeSourceView        *idesourceview,
                   gchar                *arg1,
                   IdeSourceViewModeType arg2,
                   gpointer              user_data)

Flags: Action

### The `“set-overwrite”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gboolean       arg1,
                   gpointer       user_data)

Flags: Action

### The `“set-search-text”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gchar         *arg1,
                   gboolean       arg2,
                   gpointer       user_data)

Flags: Action

### The `“sort”` signal

    void
    user_function (IdeSourceView *self,
                   gboolean       ignore_case,
                   gboolean       reverse,
                   gpointer       user_data)

This signal is meant to be activated from keybindings to sort the currently selected lines. The lines are sorted using `qsort()` and either `strcmp()` or `strcasecmp()`.

#### Parameters

self | an IdeSourceView. |
ignore_case | If character case should be ignored. |
reverse | If the lines should be sorted in reverse order |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“swap-selection-bounds”` signal

    void
    user_function (IdeSourceView *idesourceview,
                   gpointer       user_data)

Flags: Action