23#define GEANY_EDITOR_H 1
40#define GEANY_WORDCHARS "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
41#define GEANY_MAX_WORD_LENGTH 192
145#define GEANY_TYPE_EDITOR (editor_get_type())
187 gint insert_pos, gint cursor_index,
188 gint newline_indent_size, gboolean replace_newlines);
205 GEANY_VIRTUAL_SPACE_DISABLED = 0,
206 GEANY_VIRTUAL_SPACE_SELECTION = 1,
207 GEANY_VIRTUAL_SPACE_ALWAYS = 3
213 GEANY_AC_PARENTHESIS = 1,
214 GEANY_AC_CBRACKET = 2,
215 GEANY_AC_SBRACKET = 4,
250 gboolean single_comment);
Interface to the edit control.
void editor_replace_spaces(GeanyEditor *editor, gboolean ignore_selection)
gchar * editor_get_default_selection(GeanyEditor *editor, gboolean use_current_word, const gchar *wordchars)
gboolean editor_complete_word_part(GeanyEditor *editor)
gboolean editor_line_in_view(GeanyEditor *editor, gint line)
gchar * editor_get_calltip_text(GeanyEditor *editor, const TMTag *tag)
gboolean editor_show_calltip(GeanyEditor *editor, gint pos)
void editor_snippets_init(void)
void editor_select_indent_block(GeanyEditor *editor)
GeanyEditor * editor_create(GeanyDocument *doc)
void editor_set_font(GeanyEditor *editor, const gchar *font)
void editor_indent(GeanyEditor *editor, gboolean increase)
void editor_unfold_all(GeanyEditor *editor)
gboolean editor_start_auto_complete(GeanyEditor *editor, gint pos, gboolean force)
void editor_select_word(GeanyEditor *editor)
void editor_find_current_word_sciwc(GeanyEditor *editor, gint pos, gchar *word, gsize wordlen)
void editor_insert_color(GeanyEditor *editor, const gchar *colour)
const GeanyEditorPrefs * editor_get_prefs(GeanyEditor *editor)
void editor_replace_tabs(GeanyEditor *editor, gboolean ignore_selection)
void editor_scroll_to_line(GeanyEditor *editor, gint line, gfloat percent_of_view)
gboolean editor_goto_line(GeanyEditor *editor, gint line_no, gint offset)
void editor_insert_multiline_comment(GeanyEditor *editor)
void editor_set_indent(GeanyEditor *editor, GeanyIndentType type, gint width)
void editor_select_paragraph(GeanyEditor *editor)
void editor_set_line_wrapping(GeanyEditor *editor, gboolean wrap)
void editor_sci_notify_cb(G_GNUC_UNUSED GtkWidget *widget, G_GNUC_UNUSED gint scn, gpointer scnt, gpointer data)
gint editor_do_comment(GeanyEditor *editor, gint line, gboolean allow_empty_lines, gboolean toggle, gboolean single_comment)
void editor_finalize(void)
void editor_toggle_fold(GeanyEditor *editor, gint line, gint modifiers)
void editor_select_lines(GeanyEditor *editor, gboolean extra_line)
void editor_indicator_clear_errors(GeanyEditor *editor)
void editor_strip_line_trailing_spaces(GeanyEditor *editor, gint line)
void editor_ensure_final_newline(GeanyEditor *editor)
gint editor_do_uncomment(GeanyEditor *editor, gint line, gboolean toggle)
void editor_snippets_free(void)
void editor_display_current_line(GeanyEditor *editor, gfloat percent_of_view)
void editor_strip_trailing_spaces(GeanyEditor *editor, gboolean ignore_selection)
gboolean editor_goto_next_snippet_cursor(GeanyEditor *editor)
void editor_find_current_word(GeanyEditor *editor, gint pos, gchar *word, gsize wordlen, const gchar *wc)
void editor_set_indentation_guides(GeanyEditor *editor)
void editor_do_comment_toggle(GeanyEditor *editor)
void editor_apply_update_prefs(GeanyEditor *editor)
void editor_indentation_by_one_space(GeanyEditor *editor, gint pos, gboolean decrease)
void editor_destroy(GeanyEditor *editor)
void editor_smart_line_indentation(GeanyEditor *editor)
gboolean editor_complete_snippet(GeanyEditor *editor, gint pos)
static gchar current_word[192]
GeanyEditorPrefs editor_prefs
void editor_fold_all(GeanyEditor *editor)
void editor_insert_alternative_whitespace(GeanyEditor *editor)
gint editor_get_eol_char_mode(GeanyEditor *editor)
Retrieves the end of line characters mode (LF, CR/LF, CR) in the given editor.
struct GeanyEditorPrefs GeanyEditorPrefs
Default prefs when creating a new editor window.
@ GEANY_AUTOINDENT_MATCHBRACES
@ GEANY_AUTOINDENT_CURRENTCHARS
void editor_indicator_clear(GeanyEditor *editor, gint indic)
Deletes all currently set indicators matching indic in the editor window.
void editor_insert_text_block(GeanyEditor *editor, const gchar *text, gint insert_pos, gint cursor_index, gint newline_indent_size, gboolean replace_newlines)
Inserts text, replacing \t tab chars (0x9) and \n newline chars (0xA) accordingly for the document.
const GeanyIndentPrefs * editor_get_indent_prefs(GeanyEditor *editor)
Gets the indentation prefs for the editor.
const gchar * editor_find_snippet(GeanyEditor *editor, const gchar *snippet_name)
Gets snippet by name.
ScintillaObject * editor_create_widget(GeanyEditor *editor)
Creates a new Scintilla GtkWidget based on the settings for editor.
struct GeanyIndentPrefs GeanyIndentPrefs
Indentation prefs that might be different according to project or filetype.
GeanyIndentType
Whether to use tabs, spaces or both to indent.
@ GEANY_INDENT_TYPE_BOTH
Both.
@ GEANY_INDENT_TYPE_TABS
Tabs.
@ GEANY_INDENT_TYPE_SPACES
Spaces.
gint editor_get_eol_char_len(GeanyEditor *editor)
Retrieves the length of the used end of line characters (LF, CR/LF, CR) in the given editor.
void editor_indicator_set_on_line(GeanyEditor *editor, gint indic, gint line)
Sets an indicator indic on line.
struct GeanyEditor GeanyEditor
Editor-owned fields for each document.
void editor_insert_snippet(GeanyEditor *editor, gint pos, const gchar *snippet)
Replaces all special sequences in snippet and inserts it at pos.
void editor_indicator_set_on_range(GeanyEditor *editor, gint indic, gint start, gint end)
Sets an indicator on the range specified by start and end.
GType editor_get_type(void)
GeanyIndicator
Geany indicator types, can be used with Editor indicator functions to highlight text in the document.
@ GEANY_INDICATOR_SEARCH
Indicator used to highlight search results in the document.
@ GEANY_INDICATOR_SNIPPET
@ GEANY_INDICATOR_ERROR
Indicator to highlight errors in the document text.
void editor_set_indent_type(GeanyEditor *editor, GeanyIndentType type)
Sets the indent type for editor.
void editor_set_indent_width(GeanyEditor *editor, gint width)
Sets the indent width for editor.
const gchar * editor_get_eol_char(GeanyEditor *editor)
Retrieves the used end of line characters (LF, CR/LF, CR) in the given editor.
const gchar * editor_get_eol_char_name(GeanyEditor *editor)
Retrieves the localized name (for displaying) of the used end of line characters (LF,...
gchar * editor_get_word_at_pos(GeanyEditor *editor, gint pos, const gchar *wordchars)
Finds the word at the position specified by pos.
gboolean editor_goto_pos(GeanyEditor *editor, gint pos, gboolean mark)
Moves to position pos, switching to the document if necessary, setting a marker if mark is set.
Structure for representing an open tab with all its properties.
GeanyEditor * editor
The editor associated with the document.
Default prefs when creating a new editor window.
gboolean unfold_all_children
gint symbolcompletion_min_chars
gboolean scroll_stop_at_last_line
gboolean brace_match_ltgt
gint autocompletion_update_freq
GeanyIndentPrefs * indentation
gboolean show_markers_margin
gboolean auto_continue_multiline
gboolean complete_snippets_whilst_editing
gboolean long_line_enabled
gboolean use_tab_to_indent
gboolean show_indent_guide
gboolean show_linenumber_margin
guint autocompletion_max_entries
gchar * comment_toggle_mark
gboolean autocomplete_doc_words
gboolean auto_close_xml_tags
gboolean auto_complete_symbols
gboolean complete_snippets
gint symbolcompletion_max_height
gboolean use_gtk_word_boundaries
gint scroll_lines_around_cursor
gboolean show_line_endings
gboolean completion_drops_rest_of_word
gboolean show_white_space
Editor-owned fields for each document.
GeanyIndentType indent_type
gboolean line_breaking
Whether to split long lines as you type.
gboolean auto_indent
TRUE if auto-indentation is enabled.
ScintillaObject * sci
The Scintilla editor GtkWidget.
struct GeanyDocument * document
The document associated with the editor.
gboolean line_wrapping
TRUE if line wrapping is enabled.
gfloat scroll_percent
Percentage to scroll view by on paint, if positive.
Indentation prefs that might be different according to project or filetype.
GeanyIndentType type
Whether to use tabs, spaces or both to indent.
gint hard_tab_width
Width of a tab, but only when using GEANY_INDENT_TYPE_BOTH.
GeanyAutoIndent auto_indent_mode
The TMTag structure represents a single tag in the tag manager.