From 0a5378134a0f93569d86890762963e6b48bb758f Mon Sep 17 00:00:00 2001 From: Arthur Rosenstein Date: Wed, 6 Nov 2013 12:36:07 +0000 Subject: [PATCH 001/737] Add document_undo_clear_stack() This function clears a single undo/redo stack. --- src/document.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/document.c b/src/document.c index 1e05c88c83..cb0f1b0905 100644 --- a/src/document.c +++ b/src/document.c @@ -102,6 +102,7 @@ typedef struct } undo_action; +static void document_undo_clear_stack(GTrashStack **stack); static void document_undo_clear(GeanyDocument *doc); static void document_redo_add(GeanyDocument *doc, guint type, gpointer data); static gboolean remove_page(guint page_num); @@ -2482,14 +2483,14 @@ void document_set_encoding(GeanyDocument *doc, const gchar *new_encoding) * to the encoding or the Unicode BOM (which are Scintilla independet). * All Scintilla events are stored in the undo / redo buffer and are passed through. */ -/* Clears the Undo and Redo buffer (to be called when reloading or closing the document) */ -void document_undo_clear(GeanyDocument *doc) +/* Clears an Undo or Redo buffer. */ +void document_undo_clear_stack(GTrashStack **stack) { undo_action *a; - while (g_trash_stack_height(&doc->priv->undo_actions) > 0) + while (g_trash_stack_height(stack) > 0) { - a = g_trash_stack_pop(&doc->priv->undo_actions); + a = g_trash_stack_pop(stack); if (G_LIKELY(a != NULL)) { switch (a->type) @@ -2500,22 +2501,14 @@ void document_undo_clear(GeanyDocument *doc) g_free(a); } } - doc->priv->undo_actions = NULL; + *stack = NULL; +} - while (g_trash_stack_height(&doc->priv->redo_actions) > 0) - { - a = g_trash_stack_pop(&doc->priv->redo_actions); - if (G_LIKELY(a != NULL)) - { - switch (a->type) - { - case UNDO_ENCODING: g_free(a->data); break; - default: break; - } - g_free(a); - } - } - doc->priv->redo_actions = NULL; +/* Clears the Undo and Redo buffer (to be called when reloading or closing the document) */ +void document_undo_clear(GeanyDocument *doc) +{ + document_undo_clear_stack(&doc->priv->undo_actions); + document_undo_clear_stack(&doc->priv->redo_actions); if (! main_status.quitting && doc->editor != NULL) document_set_text_changed(doc, FALSE); From 1b1a1da4edfbf7168dd9afa8593cab77aca7f3a3 Mon Sep 17 00:00:00 2001 From: Arthur Rosenstein Date: Wed, 6 Nov 2013 12:44:14 +0000 Subject: [PATCH 002/737] Clear redo stack when adding undo action This fixes a bug in Geany where modifying the document does not clear the redo actions stack. --- src/document.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/document.c b/src/document.c index cb0f1b0905..47230fe010 100644 --- a/src/document.c +++ b/src/document.c @@ -104,6 +104,7 @@ typedef struct static void document_undo_clear_stack(GTrashStack **stack); static void document_undo_clear(GeanyDocument *doc); +static void document_undo_add_internal(GeanyDocument *doc, guint type, gpointer data); static void document_redo_add(GeanyDocument *doc, guint type, gpointer data); static gboolean remove_page(guint page_num); @@ -2515,8 +2516,11 @@ void document_undo_clear(GeanyDocument *doc) } -/* note: this is called on SCN_MODIFIED notifications */ -void document_undo_add(GeanyDocument *doc, guint type, gpointer data) +/* Adds an undo action without clearing the redo stack. This function should + * not be called directly, generally (use document_undo_add() instead), but is + * used by document_redo() in order not to erase the redo stack while moving + * an action from the redo stack to the undo stack. */ +void document_undo_add_internal(GeanyDocument *doc, guint type, gpointer data) { undo_action *action; @@ -2535,6 +2539,15 @@ void document_undo_add(GeanyDocument *doc, guint type, gpointer data) ui_update_popup_reundo_items(doc); } +/* note: this is called on SCN_MODIFIED notifications */ +void document_undo_add(GeanyDocument *doc, guint type, gpointer data) +{ + /* Clear the redo actions stack before adding the undo action. */ + document_undo_clear_stack(&doc->priv->redo_actions); + + document_undo_add_internal(doc, type, data); +} + gboolean document_can_undo(GeanyDocument *doc) { @@ -2646,14 +2659,14 @@ void document_redo(GeanyDocument *doc) { case UNDO_SCINTILLA: { - document_undo_add(doc, UNDO_SCINTILLA, NULL); + document_undo_add_internal(doc, UNDO_SCINTILLA, NULL); sci_redo(doc->editor->sci); break; } case UNDO_BOM: { - document_undo_add(doc, UNDO_BOM, GINT_TO_POINTER(doc->has_bom)); + document_undo_add_internal(doc, UNDO_BOM, GINT_TO_POINTER(doc->has_bom)); doc->has_bom = GPOINTER_TO_INT(action->data); ui_update_statusbar(doc, -1); @@ -2662,7 +2675,7 @@ void document_redo(GeanyDocument *doc) } case UNDO_ENCODING: { - document_undo_add(doc, UNDO_ENCODING, g_strdup(doc->encoding)); + document_undo_add_internal(doc, UNDO_ENCODING, g_strdup(doc->encoding)); document_set_encoding(doc, (const gchar*)action->data); From 9a03d32449b5d8c831d2b53a264db56ab57e8699 Mon Sep 17 00:00:00 2001 From: Arthur Rosenstein Date: Wed, 6 Nov 2013 14:16:11 +0000 Subject: [PATCH 003/737] Add keep_edit_history_on_reload option When this option is set, the undo stack is maintained when reloading a document. --- src/document.h | 1 + src/keyfile.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/document.h b/src/document.h index 0cc7d83c06..4a04f1e5f2 100644 --- a/src/document.h +++ b/src/document.h @@ -66,6 +66,7 @@ typedef struct GeanyFilePrefs gboolean use_gio_unsafe_file_saving; /* whether to use GIO as the unsafe backend */ gchar *extract_filetype_regex; /* regex to extract filetype on opening */ gboolean tab_close_switch_to_mru; + gboolean keep_edit_history_on_reload; /* Keep undo stack upon, and allow undoing of, document reloading. */ } GeanyFilePrefs; diff --git a/src/keyfile.c b/src/keyfile.c index 8953401f2a..5304223728 100644 --- a/src/keyfile.c +++ b/src/keyfile.c @@ -220,6 +220,8 @@ static void init_pref_groups(void) "gio_unsafe_save_backup", FALSE); stash_group_add_boolean(group, &file_prefs.use_gio_unsafe_file_saving, "use_gio_unsafe_file_saving", TRUE); + stash_group_add_boolean(group, &file_prefs.keep_edit_history_on_reload, + "keep_edit_history_on_reload", TRUE); /* for backwards-compatibility */ stash_group_add_integer(group, &editor_prefs.indentation->hard_tab_width, "indent_hard_tab_width", 8); From 6f6dfda8a8e6af4a84897db543885a9261481ba4 Mon Sep 17 00:00:00 2001 From: Arthur Rosenstein Date: Wed, 6 Nov 2013 14:28:43 +0000 Subject: [PATCH 004/737] Add documentation for keep_edit_history_on_reload option --- doc/geany.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/geany.txt b/doc/geany.txt index c5a8d5dbc9..7ab18f07e1 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -2604,6 +2604,9 @@ use_gio_unsafe_file_saving Whether to use GIO as the unsafe file t correctly on some complex setups. gio_unsafe_save_backup Make a backup when using GIO unsafe file false immediately saving. Backup is named `filename~`. +keep_edit_history_on_reload Whether to maintain the edit history when true immediately + reloading a file, and allow the operation + to be reverted. **Filetype related** extract_filetype_regex Regex to extract filetype name from file See below. immediately via capture group one. @@ -3306,8 +3309,7 @@ Close all Ctrl-Shift-W Closes all open files. Close Ctrl-W (C) Closes the current file. -Reload file Ctrl-R (C) Reloads the current file. All unsaved changes - will be lost. +Reload file Ctrl-R (C) Reloads the current file. Print Ctrl-P (C) Prints the current file. From 1b338d9d7dd23c1dc0828408e6687a9b47e94fc1 Mon Sep 17 00:00:00 2001 From: Arthur Rosenstein Date: Wed, 6 Nov 2013 14:52:54 +0000 Subject: [PATCH 005/737] Add UNDO_RELOAD action --- src/document.c | 50 ++++++++++++++++++++++++++++++++++++++++++- src/documentprivate.h | 8 +++++++ 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/src/document.c b/src/document.c index 47230fe010..f865c20d04 100644 --- a/src/document.c +++ b/src/document.c @@ -2496,7 +2496,9 @@ void document_undo_clear_stack(GTrashStack **stack) { switch (a->type) { - case UNDO_ENCODING: g_free(a->data); break; + case UNDO_ENCODING: + case UNDO_RELOAD: + g_free(a->data); break; default: break; } g_free(a); @@ -2618,6 +2620,29 @@ void document_undo(GeanyDocument *doc) g_free(action->data); break; } + case UNDO_RELOAD: + { + UndoReloadData *data = (UndoReloadData*)action->data; + gint eol_mode = data->eol_mode; + guint i; + + /* We reuse 'data' for the redo action, so read the current EOL mode + * into it before proceeding. */ + data->eol_mode = editor_get_eol_char_mode(doc->editor); + + /* Undo the rest of the actions which are part of the reloading process. */ + for (i = data->actions_count; i; --i) + document_undo(doc); + + /* Restore the previous EOL mode. */ + sci_set_eol_mode(doc->editor->sci, eol_mode); + /* This might affect the status bar and document meny, so update them. */ + ui_update_statusbar(doc, -1); + ui_document_show_hide(doc); + + document_redo_add(doc, UNDO_RELOAD, data); + break; + } default: break; } } @@ -2686,6 +2711,29 @@ void document_redo(GeanyDocument *doc) g_free(action->data); break; } + case UNDO_RELOAD: + { + UndoReloadData *data = (UndoReloadData*)action->data; + gint eol_mode = data->eol_mode; + guint i; + + /* We reuse 'data' for the undo action, so read the current EOL mode + * into it before proceeding. */ + data->eol_mode = editor_get_eol_char_mode(doc->editor); + + /* Redo the rest of the actions which are part of the reloading process. */ + for (i = data->actions_count; i; --i) + document_redo(doc); + + /* Restore the previous EOL mode. */ + sci_set_eol_mode(doc->editor->sci, eol_mode); + /* This might affect the status bar and document meny, so update them. */ + ui_update_statusbar(doc, -1); + ui_document_show_hide(doc); + + document_undo_add_internal(doc, UNDO_RELOAD, data); + break; + } default: break; } } diff --git a/src/documentprivate.h b/src/documentprivate.h index 8e3ecdd290..53c6df0ab7 100644 --- a/src/documentprivate.h +++ b/src/documentprivate.h @@ -31,9 +31,17 @@ enum UNDO_SCINTILLA = 0, UNDO_ENCODING, UNDO_BOM, + UNDO_RELOAD, UNDO_ACTIONS_MAX }; +typedef struct UndoReloadData +{ + guint actions_count; /* How many following undo/redo actions need to be applied. */ + gint eol_mode; /* End-Of-Line mode before/after reloading. */ +} +UndoReloadData; + typedef enum { FILE_OK, From 322fa65ff555be84dee05761665fe87d0daa9432 Mon Sep 17 00:00:00 2001 From: Arthur Rosenstein Date: Wed, 6 Nov 2013 16:17:26 +0000 Subject: [PATCH 006/737] Maintain undo stack when reloading a document --- src/document.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 3 deletions(-) diff --git a/src/document.c b/src/document.c index f865c20d04..9a2abe75e6 100644 --- a/src/document.c +++ b/src/document.c @@ -1100,6 +1100,8 @@ GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename gchar *locale_filename = NULL; GeanyFiletype *use_ft; FileData filedata; + UndoReloadData *undo_reload_data; + gboolean add_undo_reload_action; if (reload) { @@ -1157,8 +1159,31 @@ GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename monitor_file_setup(doc); } - sci_set_undo_collection(doc->editor->sci, FALSE); /* avoid creation of an undo action */ - sci_empty_undo_buffer(doc->editor->sci); + if (! reload || ! file_prefs.keep_edit_history_on_reload) + { + sci_set_undo_collection(doc->editor->sci, FALSE); /* avoid creation of an undo action */ + sci_empty_undo_buffer(doc->editor->sci); + undo_reload_data = NULL; + } + else + { + undo_reload_data = (UndoReloadData*) g_malloc(sizeof(UndoReloadData)); + + /* We will be adding a UNDO_RELOAD action to the undo stack that undoes + * this reload. To do that, we keep collecting undo actions during + * reloading, and at the end add an UNDO_RELOAD action that performs + * all these actions in bulk. To keep track of how many undo actions + * were added during this time, we compare the current undo-stack height + * with its height at the end of the process. Note that g_trash_stack_height() + * is O(N), which is a little ugly, but this seems like the most maintainable + * option. */ + undo_reload_data->actions_count = g_trash_stack_height(&doc->priv->undo_actions); + + /* We use add_undo_reload_action to track any changes to the document that + * require adding an undo action to revert the reload, but that do not + * generate an undo action themselves. */ + add_undo_reload_action = FALSE; + } /* add the text to the ScintillaObject */ sci_set_readonly(doc->editor->sci, FALSE); /* to allow replacing text */ @@ -1167,11 +1192,28 @@ GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename /* detect & set line endings */ editor_mode = utils_get_line_endings(filedata.data, filedata.len); + if (undo_reload_data) + { + undo_reload_data->eol_mode = editor_get_eol_char_mode(doc->editor); + /* Force adding an undo-reload action if the EOL mode changed. */ + if (editor_mode != undo_reload_data->eol_mode) + add_undo_reload_action = TRUE; + } sci_set_eol_mode(doc->editor->sci, editor_mode); g_free(filedata.data); sci_set_undo_collection(doc->editor->sci, TRUE); + /* If reloading and the current and new encodings or BOM states differ, + * add appropriate undo actions. */ + if (undo_reload_data) + { + if (! utils_str_equal(doc->encoding, filedata.enc)) + document_undo_add(doc, UNDO_ENCODING, g_strdup(doc->encoding)); + if (doc->has_bom != filedata.bom) + document_undo_add(doc, UNDO_BOM, GINT_TO_POINTER(doc->has_bom)); + } + doc->priv->mtime = filedata.mtime; /* get the modification time from file and keep it */ g_free(doc->encoding); /* if reloading, free old encoding */ doc->encoding = filedata.enc; @@ -1196,7 +1238,34 @@ GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename } else { /* reloading */ - document_undo_clear(doc); + if (undo_reload_data) + { + /* Calculate the number of undo actions that are part of the reloading + * process, and add the UNDO_RELOAD action. */ + undo_reload_data->actions_count = + g_trash_stack_height(&doc->priv->undo_actions) - undo_reload_data->actions_count; + + /* We only add an undo-reload action if the document has actually changed. + * At the time of writing, this condition is moot because sci_set_text + * generates an undo action even when the text hasn't really changed, so + * actions_count is always greater than zero. In the future this might change. + * It's arguable whether we should add an undo-reload action unconditionally, + * especially since it's possible (if unlikely) that there had only + * been "invisible" changes to the document, such as changes in encoding and + * EOL mode, but for the time being that's how we roll. */ + if (undo_reload_data->actions_count > 0 || add_undo_reload_action) + document_undo_add(doc, UNDO_RELOAD, undo_reload_data); + else + g_free(undo_reload_data); + + /* We didn't save the document per-se, but its contents are now + * synchronized with the file on disk, hence set a save point here. + * We need to do this in this case only, because we don't clear + * Scintilla's undo stack. */ + sci_set_savepoint(doc->editor->sci); + } + else + document_undo_clear(doc); use_ft = ft; } From 660c441b4af272fe4e40eb6a6cda2badb8f17eac Mon Sep 17 00:00:00 2001 From: Arthur Rosenstein Date: Wed, 6 Nov 2013 16:28:09 +0000 Subject: [PATCH 007/737] Don't prompt for reload confirmation if keeping edit history No work is lost in that case (except for the redo stack, which is normal), so the extra confirmation step seems bothersome. --- src/callbacks.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/callbacks.c b/src/callbacks.c index b09f822cb4..57d05f3f07 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -428,8 +428,9 @@ G_MODULE_EXPORT void on_reload_as_activate(GtkMenuItem *menuitem, gpointer user_ charset = doc->encoding; base_name = g_path_get_basename(doc->file_name); - /* don't prompt if file hasn't been edited at all */ - if ((!doc->changed && !document_can_undo(doc) && !document_can_redo(doc)) || + /* don't prompt if edit history is maintained, or if file hasn't been edited at all. */ + if (file_prefs.keep_edit_history_on_reload || + (!doc->changed && !document_can_undo(doc) && !document_can_redo(doc)) || dialogs_show_question_full(NULL, _("_Reload"), GTK_STOCK_CANCEL, _("Any unsaved changes will be lost."), _("Are you sure you want to reload '%s'?"), base_name)) From b63eb87599a6f9f8a44d7b94e94e31a26bbf2910 Mon Sep 17 00:00:00 2001 From: Roland Pallai Date: Thu, 14 Nov 2013 00:53:40 +0100 Subject: [PATCH 008/737] "Enter in replace entry does Replace & Find instead of Replace" setting in General/Misc/Search. --- data/geany.glade | 17 +++++++++++++++++ doc/geany.txt | 3 +++ src/search.c | 7 ++++++- src/search.h | 1 + 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/data/geany.glade b/data/geany.glade index 153dbee9da..f7e79a2264 100644 --- a/data/geany.glade +++ b/data/geany.glade @@ -1405,6 +1405,23 @@ 3 + + + Enter in replace entry does Replace & Find + False + True + True + False + Enter in replace entry does Replace & Find instead of Replace + True + True + + + False + False + 4 + + diff --git a/doc/geany.txt b/doc/geany.txt index c5a8d5dbc9..76c94a89a3 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -1891,6 +1891,9 @@ Use the current file's directory for Find in Files active file. When this option is disabled, the directory of the last use of the Find in Files dialog is used. See `Find in Files`_ for details. +Enter in replace entry does Replace & Find instead of Replace + Select Replace & Find as default action when pressing enter in Replace dialog. + Projects ```````` diff --git a/src/search.c b/src/search.c index 2c04e171ab..fdd4244868 100644 --- a/src/search.c +++ b/src/search.c @@ -192,6 +192,9 @@ static void init_prefs(void) "pref_search_always_wrap", FALSE, "check_hide_find_dialog"); stash_group_add_toggle_button(group, &search_prefs.use_current_file_dir, "pref_search_current_file_dir", TRUE, "check_fif_current_dir"); + stash_group_add_toggle_button(group, &search_prefs.replace_entry_activates_replace_and_find, + "pref_search_replace_entry_activates_replace_and_find", FALSE, + "check_replace_entry_activates_replace_and_find"); stash_group_add_boolean(group, &find_dlg.all_expanded, "find_all_expanded", FALSE); stash_group_add_boolean(group, &replace_dlg.all_expanded, "replace_all_expanded", FALSE); /* dialog positions */ @@ -1372,7 +1375,9 @@ on_find_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) static void on_replace_entry_activate(GtkEntry *entry, gpointer user_data) { - on_replace_dialog_response(NULL, GEANY_RESPONSE_REPLACE, NULL); + on_replace_dialog_response(NULL, + search_prefs.replace_entry_activates_replace_and_find ? GEANY_RESPONSE_REPLACE_AND_FIND : GEANY_RESPONSE_REPLACE, + NULL); } diff --git a/src/search.h b/src/search.h index 4fa70575a3..e7c5c13cd8 100644 --- a/src/search.h +++ b/src/search.h @@ -61,6 +61,7 @@ typedef struct GeanySearchPrefs gboolean use_current_word; /**< Use current word for default search text */ gboolean use_current_file_dir; /* find in files directory to use on showing dialog */ gboolean hide_find_dialog; /* hide the find dialog on next or previous */ + gboolean replace_entry_activates_replace_and_find; /* enter in replace entry does Replace & Find */ enum GeanyFindSelOptions find_selection_type; } GeanySearchPrefs; From c078a13019dc7a0a2789bf672feceaa9cb91f1c3 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 19 Feb 2014 01:05:37 +0100 Subject: [PATCH 009/737] TM: simplify match test for current tag --- tagmanager/src/tm_workspace.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tagmanager/src/tm_workspace.c b/tagmanager/src/tm_workspace.c index 05e7c1cf1f..2c0082eb3a 100644 --- a/tagmanager/src/tm_workspace.c +++ b/tagmanager/src/tm_workspace.c @@ -751,13 +751,11 @@ tm_get_current_tag (GPtrArray * file_tags, const gulong line, const guint tag_ty { guint i; gulong matching_line = 0; - glong delta; for (i = 0; (i < local->len); ++i) { TMTag *tag = TM_TAG (local->pdata[i]); - delta = line - tag->atts.entry.line; - if (delta >= 0 && (gulong)delta < line - matching_line) + if (tag->atts.entry.line <= line && tag->atts.entry.line > matching_line) { matching_tag = tag; matching_line = tag->atts.entry.line; From f1ce9afadd743dee5a6184b12eb5125305570d4d Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 19 Feb 2014 01:10:07 +0100 Subject: [PATCH 010/737] TM: don't needlessly duplicate array when searching for current tag --- tagmanager/src/tm_workspace.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tagmanager/src/tm_workspace.c b/tagmanager/src/tm_workspace.c index 2c0082eb3a..1c013ac217 100644 --- a/tagmanager/src/tm_workspace.c +++ b/tagmanager/src/tm_workspace.c @@ -745,25 +745,23 @@ tm_workspace_find_scoped (const char *name, const char *scope, gint type, const TMTag * tm_get_current_tag (GPtrArray * file_tags, const gulong line, const guint tag_types) { - GPtrArray *const local = tm_tags_extract (file_tags, tag_types); TMTag *matching_tag = NULL; - if (local && local->len) + if (file_tags && file_tags->len) { guint i; gulong matching_line = 0; - for (i = 0; (i < local->len); ++i) + for (i = 0; (i < file_tags->len); ++i) { - TMTag *tag = TM_TAG (local->pdata[i]); - if (tag->atts.entry.line <= line && tag->atts.entry.line > matching_line) + TMTag *tag = TM_TAG (file_tags->pdata[i]); + if (tag && tag->type & tag_types && + tag->atts.entry.line <= line && tag->atts.entry.line > matching_line) { matching_tag = tag; matching_line = tag->atts.entry.line; } } } - if (local) - g_ptr_array_free (local, TRUE); return matching_tag; } From 7aa647b9d3ba412d3afb0ba2b907b0240386b25a Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 15 May 2014 16:35:23 +0200 Subject: [PATCH 011/737] Enable PHPSCRIPT lexer --- scintilla/scintilla_changes.patch | 2 +- scintilla/src/Catalogue.cxx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scintilla/scintilla_changes.patch b/scintilla/scintilla_changes.patch index da3161d8d9..91607083bd 100644 --- a/scintilla/scintilla_changes.patch +++ b/scintilla/scintilla_changes.patch @@ -109,7 +109,7 @@ index 41d5d54..70ce3bc 100644 LINK_LEXER(lmPascal); - LINK_LEXER(lmPB); LINK_LEXER(lmPerl); -- LINK_LEXER(lmPHPSCRIPT); + LINK_LEXER(lmPHPSCRIPT); - LINK_LEXER(lmPLM); LINK_LEXER(lmPO); - LINK_LEXER(lmPOV); diff --git a/scintilla/src/Catalogue.cxx b/scintilla/src/Catalogue.cxx index 70ce3bc701..7d0a5ab542 100644 --- a/scintilla/src/Catalogue.cxx +++ b/scintilla/src/Catalogue.cxx @@ -106,6 +106,7 @@ int Scintilla_LinkLexers() { LINK_LEXER(lmOctave); LINK_LEXER(lmPascal); LINK_LEXER(lmPerl); + LINK_LEXER(lmPHPSCRIPT); LINK_LEXER(lmPO); LINK_LEXER(lmPowerShell); LINK_LEXER(lmProps); From c1aba3862d6c0b240c67b028779af04e8d7c84be Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 15 May 2014 16:37:22 +0200 Subject: [PATCH 012/737] Handle PHPSCRIPT like HTML but for markup cases --- src/editor.c | 4 ++++ src/highlighting.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/editor.c b/src/editor.c index fabc83d7ce..6f1a05b036 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1252,6 +1252,7 @@ static gboolean lexer_has_braces(ScintillaObject *sci) case SCLEX_CPP: case SCLEX_D: case SCLEX_HTML: /* for PHP & JS */ + case SCLEX_PHPSCRIPT: case SCLEX_PASCAL: /* for multiline comments? */ case SCLEX_BASH: case SCLEX_PERL: @@ -2878,6 +2879,7 @@ static gint get_multiline_comment_style(GeanyEditor *editor, gint line_start) { case SCLEX_XML: case SCLEX_HTML: + case SCLEX_PHPSCRIPT: { if (is_style_php(sci_get_style_at(editor->sci, line_start))) style_comment = SCE_HPHP_COMMENT; @@ -3415,6 +3417,7 @@ static gboolean in_block_comment(gint lexer, gint style) style == SCE_D_COMMENTNESTED); case SCLEX_HTML: + case SCLEX_PHPSCRIPT: return (style == SCE_HPHP_COMMENT); case SCLEX_CSS: @@ -4952,6 +4955,7 @@ void editor_set_indentation_guides(GeanyEditor *editor) /* C-like (structured) languages benefit from the "look both" method */ case SCLEX_CPP: case SCLEX_HTML: + case SCLEX_PHPSCRIPT: case SCLEX_XML: case SCLEX_PERL: case SCLEX_LATEX: diff --git a/src/highlighting.c b/src/highlighting.c index dab8820eb6..a2791395d0 100644 --- a/src/highlighting.c +++ b/src/highlighting.c @@ -1497,6 +1497,7 @@ gboolean highlighting_is_string_style(gint lexer, gint style) case SCLEX_XML: case SCLEX_HTML: + case SCLEX_PHPSCRIPT: return ( style == SCE_HBA_STRING || style == SCE_HBA_STRINGEOL || @@ -1669,6 +1670,7 @@ gboolean highlighting_is_comment_style(gint lexer, gint style) case SCLEX_XML: case SCLEX_HTML: + case SCLEX_PHPSCRIPT: return ( style == SCE_HBA_COMMENTLINE || style == SCE_HB_COMMENTLINE || From f6068d0e86331e65422bd6542b010f2d2ca08203 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 15 May 2014 16:58:04 +0200 Subject: [PATCH 013/737] Add a Zephir tag parser This Zephir parser uses the PHP parser with minor tweaking not to require the initial PHP open tag and skip function return type hints. --- tagmanager/ctags/parsers.h | 3 +- tagmanager/ctags/php.c | 57 ++++++++++++++++++++++++++++++++------ tagmanager/src/tm_parser.h | 1 + 3 files changed, 52 insertions(+), 9 deletions(-) diff --git a/tagmanager/ctags/parsers.h b/tagmanager/ctags/parsers.h index 8597ac0b92..7aa83339c1 100644 --- a/tagmanager/ctags/parsers.h +++ b/tagmanager/ctags/parsers.h @@ -61,7 +61,8 @@ ObjcParser, \ AsciidocParser, \ AbaqusParser, \ - RustParser + RustParser, \ + ZephirParser #endif /* _PARSERS_H */ diff --git a/tagmanager/ctags/php.c b/tagmanager/ctags/php.c index b70356347a..c381cdcb43 100644 --- a/tagmanager/ctags/php.c +++ b/tagmanager/ctags/php.c @@ -227,6 +227,7 @@ typedef struct { } tokenInfo; static langType Lang_php; +static langType Lang_zephir; static boolean InPhp = FALSE; /* whether we are between */ @@ -240,14 +241,14 @@ static struct { static vString *CurrentNamesapce; -static void buildPhpKeywordHash (void) +static void buildPhpKeywordHash (const langType language) { const size_t count = sizeof (PhpKeywordTable) / sizeof (PhpKeywordTable[0]); size_t i; for (i = 0; i < count ; i++) { const keywordDesc* const p = &PhpKeywordTable[i]; - addKeyword (p->name, Lang_php, (int) p->id); + addKeyword (p->name, language, (int) p->id); } } @@ -974,7 +975,7 @@ static void readToken (tokenInfo *const token) else { parseIdentifier (token->string, c); - token->keyword = analyzeToken (token->string, Lang_php); + token->keyword = analyzeToken (token->string, getSourceLanguage ()); if (token->keyword == KEYWORD_NONE) token->type = TOKEN_IDENTIFIER; else @@ -1180,6 +1181,17 @@ static boolean parseFunction (tokenInfo *const token, const tokenInfo *name) readToken (token); /* normally it's an open brace or "use" keyword */ } + /* if parsing Zephir, skip function return type hint */ + if (getSourceLanguage () == Lang_zephir && token->type == TOKEN_OPERATOR) + { + do + readToken (token); + while (token->type != TOKEN_EOF && + token->type != TOKEN_OPEN_CURLY && + token->type != TOKEN_CLOSE_CURLY && + token->type != TOKEN_SEMICOLON); + } + /* skip use(...) */ if (token->type == TOKEN_KEYWORD && token->keyword == KEYWORD_use) { @@ -1435,11 +1447,10 @@ static void enterScope (tokenInfo *const parentToken, deleteToken (token); } -static void findPhpTags (void) +static void findTags (void) { tokenInfo *const token = newToken (); - InPhp = FALSE; CurrentStatement.access = ACCESS_UNDEFINED; CurrentStatement.impl = IMPL_UNDEFINED; CurrentNamesapce = vStringNew (); @@ -1454,10 +1465,28 @@ static void findPhpTags (void) deleteToken (token); } -static void initialize (const langType language) +static void findPhpTags (void) +{ + InPhp = FALSE; + findTags (); +} + +static void findZephirTags (void) +{ + InPhp = TRUE; + findTags (); +} + +static void initializePhpParser (const langType language) { Lang_php = language; - buildPhpKeywordHash (); + buildPhpKeywordHash (language); +} + +static void initializeZephirParser (const langType language) +{ + Lang_zephir = language; + buildPhpKeywordHash (language); } extern parserDefinition* PhpParser (void) @@ -1468,7 +1497,19 @@ extern parserDefinition* PhpParser (void) def->kindCount = KIND_COUNT (PhpKinds); def->extensions = extensions; def->parser = findPhpTags; - def->initialize = initialize; + def->initialize = initializePhpParser; + return def; +} + +extern parserDefinition* ZephirParser (void) +{ + static const char *const extensions [] = { "zep", NULL }; + parserDefinition* def = parserNew ("Zephir"); + def->kinds = PhpKinds; + def->kindCount = KIND_COUNT (PhpKinds); + def->extensions = extensions; + def->parser = findZephirTags; + def->initialize = initializeZephirParser; return def; } diff --git a/tagmanager/src/tm_parser.h b/tagmanager/src/tm_parser.h index 1b90e66d34..16f9395b3c 100644 --- a/tagmanager/src/tm_parser.h +++ b/tagmanager/src/tm_parser.h @@ -68,6 +68,7 @@ typedef enum TM_PARSER_ASCIIDOC, TM_PARSER_ABAQUS, TM_PARSER_RUST, + TM_PARSER_ZEPHIR, TM_PARSER_COUNT } TMParserType; From b1f93c29770a9de30c2172ce7ee6ad5ca981c9a4 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 15 May 2014 17:03:56 +0200 Subject: [PATCH 014/737] Add Zephir filetype --- data/Makefile.am | 3 ++- data/filetype_extensions.conf | 1 + data/filetypes.zephir | 24 ++++++++++++++++++++++++ src/filetypes.c | 1 + src/filetypes.h | 1 + src/highlighting.c | 2 ++ src/highlightingmappings.h | 7 +++++++ src/symbols.c | 2 ++ 8 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 data/filetypes.zephir diff --git a/data/Makefile.am b/data/Makefile.am index 30c0c1e022..44525918da 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -67,7 +67,8 @@ filetypes = \ filetypes.verilog \ filetypes.vhdl \ filetypes.xml \ - filetypes.yaml + filetypes.yaml \ + filetypes.zephir tagfiles = \ c99.tags \ diff --git a/data/filetype_extensions.conf b/data/filetype_extensions.conf index 75e7129146..c32d564b0c 100644 --- a/data/filetype_extensions.conf +++ b/data/filetype_extensions.conf @@ -65,6 +65,7 @@ Verilog=*.v; VHDL=*.vhd;*.vhdl; XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd;*.xhtml;*.xul;*.dtd; YAML=*.yaml;*.yml; +Zephir=*.zep; None=*; # Note: restarting is required after editing groups diff --git a/data/filetypes.zephir b/data/filetypes.zephir new file mode 100644 index 0000000000..3d94e27eb5 --- /dev/null +++ b/data/filetypes.zephir @@ -0,0 +1,24 @@ +# For complete documentation of this file, please see Geany's main documentation +[styling=HTML] + +[keywords=HTML] +# all items must be in one line +# these are Zephir instructions, overriding PHP list +php=abstract bool break case catch class const continue default empty else false fetch finally fixed float for foreach function if int integer interface isset let long namespace new null private protected public return static string switch this throw true try typeof uint ulong unlikely var void while + +[lexer_properties=PHP] + +[settings=PHP] +# default extension used when saving files +extension=zep + +[indentation] +#width=4 +# 0 is spaces, 1 is tabs, 2 is tab & spaces +#type=1 + +[build_settings] +# %f will be replaced by the complete filename +# %e will be replaced by the filename without extension +# (use only one of it at one time) +compiler=zephir build diff --git a/src/filetypes.c b/src/filetypes.c index 7796aa71a6..a0ea65a981 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -189,6 +189,7 @@ static void init_builtin_filetypes(void) FT_INIT( BATCH, NONE, "Batch", NULL, SCRIPT, SCRIPT ); FT_INIT( POWERSHELL, NONE, "PowerShell", NULL, SOURCE_FILE, SCRIPT ); FT_INIT( RUST, RUST, "Rust", NULL, SOURCE_FILE, COMPILED ); + FT_INIT( ZEPHIR, ZEPHIR, "Zephir", NULL, SOURCE_FILE, COMPILED ); } diff --git a/src/filetypes.h b/src/filetypes.h index 09faba222d..5059882dbf 100644 --- a/src/filetypes.h +++ b/src/filetypes.h @@ -95,6 +95,7 @@ typedef enum GEANY_FILETYPES_BATCH, GEANY_FILETYPES_POWERSHELL, GEANY_FILETYPES_RUST, + GEANY_FILETYPES_ZEPHIR, /* ^ append items here */ GEANY_MAX_BUILT_IN_FILETYPES /* Don't use this, use filetypes_array->len instead */ } diff --git a/src/highlighting.c b/src/highlighting.c index a2791395d0..056444f0db 100644 --- a/src/highlighting.c +++ b/src/highlighting.c @@ -1058,6 +1058,7 @@ void highlighting_init_styles(guint filetype_idx, GKeyFile *config, GKeyFile *co init_styleset_case(VERILOG); init_styleset_case(XML); init_styleset_case(YAML); + init_styleset_case(ZEPHIR); default: if (ft->lexer_filetype) geany_debug("Filetype %s has a recursive lexer_filetype %s set!", @@ -1141,6 +1142,7 @@ void highlighting_set_styles(ScintillaObject *sci, GeanyFiletype *ft) styleset_case(VERILOG); styleset_case(XML); styleset_case(YAML); + styleset_case(ZEPHIR); case GEANY_FILETYPES_NONE: default: styleset_default(sci, ft->id); diff --git a/src/highlightingmappings.h b/src/highlightingmappings.h index ecab17bd9d..e3fd32eb60 100644 --- a/src/highlightingmappings.h +++ b/src/highlightingmappings.h @@ -1559,4 +1559,11 @@ static const HLKeyword highlighting_keywords_YAML[] = #define highlighting_properties_YAML EMPTY_PROPERTIES +/* Zephir */ +#define highlighting_lexer_ZEPHIR SCLEX_PHPSCRIPT +#define highlighting_styles_ZEPHIR highlighting_styles_PHP +#define highlighting_keywords_ZEPHIR highlighting_keywords_PHP +#define highlighting_properties_ZEPHIR highlighting_properties_PHP + + #endif /* guard */ diff --git a/src/symbols.c b/src/symbols.c index 3d05f896d8..d82fc32ab8 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -301,6 +301,7 @@ const gchar *symbols_get_context_separator(gint ft_id) /*case GEANY_FILETYPES_RUBY:*/ /* not sure what to use atm*/ case GEANY_FILETYPES_PHP: case GEANY_FILETYPES_RUST: + case GEANY_FILETYPES_ZEPHIR: return "::"; /* avoid confusion with other possible separators in group/section name */ @@ -767,6 +768,7 @@ static void add_top_level_items(GeanyDocument *doc) break; } case GEANY_FILETYPES_PHP: + case GEANY_FILETYPES_ZEPHIR: { tag_list_add_groups(tag_store, &(tv_iters.tag_namespace), _("Namespaces"), "classviewer-namespace", From 4e0193d8f14ece47fa30ce7239e4e49c482f457b Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 15 May 2014 18:08:25 +0200 Subject: [PATCH 015/737] Zephir: add some tag parser tests --- tests/ctags/Makefile.am | 2 ++ tests/ctags/return-hint.zep | 14 ++++++++++++++ tests/ctags/return-hint.zep.tags | 5 +++++ tests/ctags/simple.zep | 19 +++++++++++++++++++ tests/ctags/simple.zep.tags | 5 +++++ 5 files changed, 45 insertions(+) create mode 100644 tests/ctags/return-hint.zep create mode 100644 tests/ctags/return-hint.zep.tags create mode 100644 tests/ctags/simple.zep create mode 100644 tests/ctags/simple.zep.tags diff --git a/tests/ctags/Makefile.am b/tests/ctags/Makefile.am index c42a22a2ff..bd2fced66a 100644 --- a/tests/ctags/Makefile.am +++ b/tests/ctags/Makefile.am @@ -212,6 +212,7 @@ test_sources = \ recursive.f95 \ refcurs.sql \ regexp.js \ + return-hint.zep \ secondary_fcn_name.js \ semicolon.f90 \ shebang.js \ @@ -229,6 +230,7 @@ test_sources = \ simple.rb \ simple.sh \ simple.tcl \ + simple.zep \ spurious_label_tags.c \ sql_single_quote.sql \ square_parens.f90 \ diff --git a/tests/ctags/return-hint.zep b/tests/ctags/return-hint.zep new file mode 100644 index 0000000000..35f335fe48 --- /dev/null +++ b/tests/ctags/return-hint.zep @@ -0,0 +1,14 @@ +class Test +{ + public function first(string str) -> string + { + function nested() { + + } + } + + public function second(int i) -> int + { + + } +} diff --git a/tests/ctags/return-hint.zep.tags b/tests/ctags/return-hint.zep.tags new file mode 100644 index 0000000000..44b33b2668 --- /dev/null +++ b/tests/ctags/return-hint.zep.tags @@ -0,0 +1,5 @@ +# format=tagmanager +Test󉅞 +first16(string str)蜹est0 +nested16()蜹est::first0 +second16(int i)蜹est0 diff --git a/tests/ctags/simple.zep b/tests/ctags/simple.zep new file mode 100644 index 0000000000..2ebe2d2f15 --- /dev/null +++ b/tests/ctags/simple.zep @@ -0,0 +1,19 @@ +/* from http://zephir-lang.com/language.html */ +namespace Test; + +class MyClass +{ + + public function someMethod1() + { + int a = 1, b = 2; + return a + b; + } + + public function someMethod2() + { + int a = 3, b = 4; + return a + b; + } + +} diff --git a/tests/ctags/simple.zep.tags b/tests/ctags/simple.zep.tags new file mode 100644 index 0000000000..cc26edf80f --- /dev/null +++ b/tests/ctags/simple.zep.tags @@ -0,0 +1,5 @@ +# format=tagmanager +MyClass1蜹est0 +Test2560 +someMethod116()蜹est::MyClass0 +someMethod216()蜹est::MyClass0 From 7d38f0512190d8f5b8e3cec6715f7ce6e50bd7e7 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 24 Dec 2012 03:18:52 +0100 Subject: [PATCH 016/737] Initial support for single-line regular expressions matching --- src/search.c | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/src/search.c b/src/search.c index ae939969dc..a33197daf8 100644 --- a/src/search.c +++ b/src/search.c @@ -1952,14 +1952,45 @@ static gint find_regex(ScintillaObject *sci, guint pos, GRegex *regex, GeanyMatc const gchar *text; GMatchInfo *minfo; gint ret = -1; + gint offset = 0; g_return_val_if_fail(pos <= (guint)sci_get_length(sci), -1); - /* Warning: any SCI calls will invalidate 'text' after calling SCI_GETCHARACTERPOINTER */ - text = (void*)scintilla_send_message(sci, SCI_GETCHARACTERPOINTER, 0, 0); + if (g_regex_get_compile_flags(regex) & G_REGEX_MULTILINE) + { + /* Warning: any SCI calls will invalidate 'text' after calling SCI_GETCHARACTERPOINTER */ + text = (void*)scintilla_send_message(sci, SCI_GETCHARACTERPOINTER, 0, 0); + g_regex_match_full(regex, text, -1, pos, 0, &minfo, NULL); + } + else /* single-line mode, manually match against each line */ + { + gint line = sci_get_line_from_position(sci, pos); + + for (;;) + { + gint start = sci_get_position_from_line(sci, line); + gint end = sci_get_line_end_position(sci, line); + + text = (void*)scintilla_send_message(sci, SCI_GETRANGEPOINTER, start, end - start); + if (g_regex_match_full(regex, text, end - start, pos - start, 0, &minfo, NULL)) + { + offset = start; + break; + } + else /* not found, try next line */ + { + line ++; + if (line >= sci_get_line_count(sci)) + break; + pos = sci_get_position_from_line(sci, line); + /* don't free last info, it's freed below */ + g_match_info_free(minfo); + } + } + } /* Warning: minfo will become invalid when 'text' does! */ - if (g_regex_match_full(regex, text, -1, pos, 0, &minfo, NULL)) + if (g_match_info_matches(minfo)) { guint i; @@ -1971,8 +2002,8 @@ static gint find_regex(ScintillaObject *sci, guint pos, GRegex *regex, GeanyMatc gint start = -1, end = -1; g_match_info_fetch_pos(minfo, (gint)i, &start, &end); - match->matches[i].start = start; - match->matches[i].end = end; + match->matches[i].start = offset + start; + match->matches[i].end = offset + end; } match->start = match->matches[0].start; match->end = match->matches[0].end; From fd5ac727cbb687cc66c2de596f1dde8d957af051 Mon Sep 17 00:00:00 2001 From: Martin Spacek Date: Wed, 11 Jun 2014 22:17:48 -0700 Subject: [PATCH 017/737] Add %l current line number substitution to build commands --- doc/geany.txt | 1 + src/build.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/geany.txt b/doc/geany.txt index 8a5078fec5..acc1df7a36 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -3127,6 +3127,7 @@ before the command is run. * %e - substituted by the name of the current file without the extension or path. * %f - substituted by the name of the current file without the path. * %p - if a project is open, substituted by the base path from the project. +* %l - substituted by the line number at the current cursor position. .. note:: If the basepath set in the project preferences is not an absolute path , then it is diff --git a/src/build.c b/src/build.c index 706dbdcddf..6a172d98e7 100644 --- a/src/build.c +++ b/src/build.c @@ -43,6 +43,7 @@ #include "msgwindow.h" #include "prefs.h" #include "projectprivate.h" +#include "sciwrappers.h" #include "support.h" #include "toolbar.h" #include "ui_utils.h" @@ -712,8 +713,8 @@ static void parse_build_output(const gchar **output, gint status) #endif -/* Replaces occurences of %e and %p with the appropriate filenames, - * %d and %p replacements should be in UTF8 */ +/* Replaces occurences of %e and %p with the appropriate filenames and + * %l with current line number. %d and %p replacements should be in UTF8 */ static gchar *build_replace_placeholder(const GeanyDocument *doc, const gchar *src) { GString *stack; @@ -721,6 +722,7 @@ static gchar *build_replace_placeholder(const GeanyDocument *doc, const gchar *s gchar *replacement; gchar *executable = NULL; gchar *ret_str; /* to be freed when not in use anymore */ + gint line_num; g_return_val_if_fail(doc == NULL || doc->is_valid, NULL); @@ -744,6 +746,12 @@ static gchar *build_replace_placeholder(const GeanyDocument *doc, const gchar *s replacement = g_path_get_basename(executable); utils_string_replace_all(stack, "%e", replacement); g_free(replacement); + + /* replace %l with the current 1-based line number */ + line_num = sci_get_current_line(doc->editor->sci) + 1; + replacement = g_strdup_printf("%i", line_num); + utils_string_replace_all(stack, "%l", replacement); + g_free(replacement); } /* replace %p with the current project's (absolute) base directory */ @@ -2187,7 +2195,7 @@ GtkWidget *build_commands_table(GeanyDocument *doc, GeanyBuildSource dst, BuildT ++row; label = gtk_label_new(NULL); ui_label_set_markup(GTK_LABEL(label), "%s", - _("%d, %e, %f, %p are substituted in command and directory fields, see manual for details.")); + _("%d, %e, %f, %p, %l are substituted in command and directory fields, see manual for details.")); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(table, label, 0, DC_N_COL, row, row + 1, GTK_FILL, GTK_FILL | GTK_EXPAND, entry_x_padding, entry_y_padding); From 0682a255853bada9bb5a07a575100925997e1de9 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 26 Jul 2014 13:36:19 +0200 Subject: [PATCH 018/737] Fix crash when quitting with an infobar visible When the infobar gets closed/destroyed it tries to focus the possibly destroyed document, leading to a crash. --- src/document.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/document.c b/src/document.c index 799f266229..1358f8a758 100644 --- a/src/document.c +++ b/src/document.c @@ -3214,7 +3214,8 @@ static gboolean on_sci_key(GtkWidget *widget, GdkEventKey *event, gpointer data) static void enable_key_intercept(GeanyDocument *doc, GtkWidget *bar) { /* automatically focus editor again on bar close */ - g_signal_connect_swapped(bar, "unrealize", G_CALLBACK(document_grab_focus), doc); + g_signal_connect_object(bar, "unrealize", G_CALLBACK(gtk_widget_grab_focus), doc->editor->sci, + G_CONNECT_SWAPPED); g_signal_connect_object(doc->editor->sci, "key-press-event", G_CALLBACK(on_sci_key), bar, 0); } From b65f49902f726d76178c7b72c244e901ccfa419d Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 26 Jul 2014 14:55:58 +0200 Subject: [PATCH 019/737] Fix closing the documents when quitting When quitting we avoid doing some unnecessary actions, and used to simply destroy the Scintilla widget (and thus the notebook page) instead of the elaborate UI updates. Unfortunately, when the infobars landed they changed what is packed as a notebook page, and now destroying the Scintilla widget alone is not enough to close the page. Fix this by properly removing the whole page no matter what it contains. This issue was visible when quitting Geany with a project open. --- src/document.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/document.c b/src/document.c index 1358f8a758..18f28f3d0e 100644 --- a/src/document.c +++ b/src/document.c @@ -653,7 +653,7 @@ static gboolean remove_page(guint page_num) /* we need to destroy the ScintillaWidget so our handlers on it are * disconnected before we free any data they may use (like the editor). * when not quitting, this is handled by removing the notebook page. */ - gtk_widget_destroy(GTK_WIDGET(doc->editor->sci)); + gtk_notebook_remove_page(GTK_NOTEBOOK(main_widgets.notebook), page_num); } else { From d96a314a68a6ca779f3e447dd25724df4881a93a Mon Sep 17 00:00:00 2001 From: SiegeLord Date: Tue, 29 Jul 2014 09:23:42 -0400 Subject: [PATCH 020/737] Rust: Change/simplify how the string tokens are handled. Previously, only the string contents were stored in lexerState::token_str (i.e. not including the delimeters). Now, the delimeters are stored as well, thus preserving them. This also simplifies the code a bit. A new function is added to handle the character storage, which is also now applied for normal identifiers. To that end, the MAX_STRING_LENGTH was boosted to 256 so that all reasonably sized identifiers may fit. --- tagmanager/ctags/rust.c | 49 +++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/tagmanager/ctags/rust.c b/tagmanager/ctags/rust.c index 4cde2aea19..9dba38f025 100644 --- a/tagmanager/ctags/rust.c +++ b/tagmanager/ctags/rust.c @@ -24,7 +24,7 @@ /* * MACROS */ -#define MAX_STRING_LENGTH 64 +#define MAX_STRING_LENGTH 256 /* * DATA DECLARATIONS @@ -117,9 +117,7 @@ static void writeCurTokenToStr (lexerState *lexer, vString *out_str) vStringCat(out_str, lexer->token_str); break; case TOKEN_STRING: - vStringPut(out_str, '"'); vStringCat(out_str, lexer->token_str); - vStringPut(out_str, '"'); break; case TOKEN_WHITESPACE: vStringPut(out_str, ' '); @@ -152,6 +150,14 @@ static void advanceNChar (lexerState *lexer, int n) advanceChar(lexer); } +/* Store the current character in lexerState::token_str if there is space + * (set by MAX_STRING_LENGTH), and then read the next character from the file */ +static void advanceAndStoreChar (lexerState *lexer) +{ + if (vStringLength(lexer->token_str) < MAX_STRING_LENGTH) + vStringPut(lexer->token_str, (char) lexer->cur_c); + advanceChar(lexer); +} static boolean isWhitespace (int c) { @@ -224,8 +230,7 @@ static void scanIdentifier (lexerState *lexer) vStringClear(lexer->token_str); do { - vStringPut(lexer->token_str, (char) lexer->cur_c); - advanceChar(lexer); + advanceAndStoreChar(lexer); } while(lexer->cur_c != EOF && isIdentifierContinue(lexer->cur_c)); } @@ -237,16 +242,14 @@ static void scanIdentifier (lexerState *lexer) static void scanString (lexerState *lexer) { vStringClear(lexer->token_str); - advanceChar(lexer); + advanceAndStoreChar(lexer); while (lexer->cur_c != EOF && lexer->cur_c != '"') { if (lexer->cur_c == '\\' && lexer->next_c == '"') - advanceChar(lexer); - if (vStringLength(lexer->token_str) < MAX_STRING_LENGTH) - vStringPut(lexer->token_str, (char) lexer->cur_c); - advanceChar(lexer); + advanceAndStoreChar(lexer); + advanceAndStoreChar(lexer); } - advanceChar(lexer); + advanceAndStoreChar(lexer); } /* Raw strings look like this: r"" or r##""## where the number of @@ -255,48 +258,36 @@ static void scanRawString (lexerState *lexer) { size_t num_initial_hashes = 0; vStringClear(lexer->token_str); - advanceChar(lexer); + advanceAndStoreChar(lexer); /* Count how many leading hashes there are */ while (lexer->cur_c == '#') { num_initial_hashes++; - advanceChar(lexer); + advanceAndStoreChar(lexer); } if (lexer->cur_c != '"') return; - advanceChar(lexer); + advanceAndStoreChar(lexer); while (lexer->cur_c != EOF) { - if (vStringLength(lexer->token_str) < MAX_STRING_LENGTH) - vStringPut(lexer->token_str, (char) lexer->cur_c); /* Count how many trailing hashes there are. If the number is equal or more * than the number of leading hashes, break. */ if (lexer->cur_c == '"') { size_t num_trailing_hashes = 0; - advanceChar(lexer); + advanceAndStoreChar(lexer); while (lexer->cur_c == '#' && num_trailing_hashes < num_initial_hashes) { num_trailing_hashes++; - if (vStringLength(lexer->token_str) < MAX_STRING_LENGTH) - vStringPut(lexer->token_str, (char) lexer->cur_c); - advanceChar(lexer); + advanceAndStoreChar(lexer); } if (num_trailing_hashes == num_initial_hashes) - { - /* Strip the trailing hashes and quotes */ - if (vStringLength(lexer->token_str) < MAX_STRING_LENGTH && vStringLength(lexer->token_str) > num_trailing_hashes + 1) - { - lexer->token_str->length = vStringLength(lexer->token_str) - num_trailing_hashes - 1; - lexer->token_str->buffer[lexer->token_str->length] = '\0'; - } break; - } } else { - advanceChar(lexer); + advanceAndStoreChar(lexer); } } } From fba9d19ec775161f722adab322ec384483d4b05c Mon Sep 17 00:00:00 2001 From: SiegeLord Date: Tue, 29 Jul 2014 09:34:04 -0400 Subject: [PATCH 021/737] Rust: Add a test for the new string lexer. --- tests/ctags/test_input.rs | 2 ++ tests/ctags/test_input.rs.tags | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/ctags/test_input.rs b/tests/ctags/test_input.rs index 5f21b5128d..3d3eb29fad 100644 --- a/tests/ctags/test_input.rs +++ b/tests/ctags/test_input.rs @@ -6,6 +6,8 @@ use std::io::stdio::println; use test_input2::*; mod test_input2; +fn preserve_string_delims(_bar: extern r#"C"# fn()) {} + pub struct A { foo: fn() -> int, diff --git a/tests/ctags/test_input.rs.tags b/tests/ctags/test_input.rs.tags index 198ee3908b..8a2046c2b7 100644 --- a/tests/ctags/test_input.rs.tags +++ b/tests/ctags/test_input.rs.tags @@ -31,6 +31,7 @@ main my_method128(&self,_:int)蜦oo0 nested16()蝝ain0 only_field8蜸10 +preserve_string_delims16(_bar: extern r#"C"# fn())0 size163840 some216(a:Animal)0 test128(&self)蜦oo0 From 756344d901afba9e5a51ae099aa7c1fe9ecef019 Mon Sep 17 00:00:00 2001 From: SiegeLord Date: Tue, 29 Jul 2014 10:51:36 -0400 Subject: [PATCH 022/737] Rust: Parse character literals. These were omitted by mistake. Caused bugs like '"' being interpreted as a start/end of a string, '}' as the end of a block etc. --- tagmanager/ctags/rust.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/tagmanager/ctags/rust.c b/tagmanager/ctags/rust.c index 9dba38f025..53ed4fdbc4 100644 --- a/tagmanager/ctags/rust.c +++ b/tagmanager/ctags/rust.c @@ -292,6 +292,41 @@ static void scanRawString (lexerState *lexer) } } +/* This deals with character literals: 'n', '\n', '\uFFFF'; and lifetimes: + * 'lifetime. We'll use this approximate regexp for the literals: + * \' \\ [^']+ \' or \' [^'] \' or \' \\ \' \'. Either way, we'll treat this + * token as a string, so it gets preserved as is for function signatures with + * lifetimes. */ +static void scanCharacterOrLifetime (lexerState *lexer) +{ + vStringClear(lexer->token_str); + advanceAndStoreChar(lexer); + + if (lexer->cur_c == '\\') + { + advanceAndStoreChar(lexer); + /* The \' \\ \' \' (literally '\'') case */ + if (lexer->cur_c == '\'' && lexer->next_c == '\'') + { + advanceAndStoreChar(lexer); + advanceAndStoreChar(lexer); + } + /* The \' \\ [^']+ \' case */ + else + { + while (lexer->cur_c != EOF && lexer->cur_c != '\'') + advanceAndStoreChar(lexer); + } + } + /* The \' [^'] \' case */ + else if (lexer->cur_c != '\'' && lexer->next_c == '\'') + { + advanceAndStoreChar(lexer); + advanceAndStoreChar(lexer); + } + /* Otherwise it is malformed, or a lifetime */ +} + /* Advances the parser one token, optionally skipping whitespace * (otherwise it is concatenated and returned as a single whitespace token). * Whitespace is needed to properly render function signatures. Unrecognized @@ -334,6 +369,11 @@ static int advanceToken (lexerState *lexer, boolean skip_whitspace) scanRawString(lexer); return lexer->cur_token = TOKEN_STRING; } + else if (lexer->cur_c == '\'') + { + scanCharacterOrLifetime(lexer); + return lexer->cur_token = TOKEN_STRING; + } else if (isIdentifierStart(lexer->cur_c)) { scanIdentifier(lexer); From cf9385c6d49eaee4788847b4bda5b9b7b727d087 Mon Sep 17 00:00:00 2001 From: SiegeLord Date: Tue, 29 Jul 2014 10:55:15 -0400 Subject: [PATCH 023/737] Rust: Add test for character literals. --- tests/ctags/test_input.rs | 9 +++++++++ tests/ctags/test_input.rs.tags | 2 ++ 2 files changed, 11 insertions(+) diff --git a/tests/ctags/test_input.rs b/tests/ctags/test_input.rs index 3d3eb29fad..68f857abf3 100644 --- a/tests/ctags/test_input.rs +++ b/tests/ctags/test_input.rs @@ -6,6 +6,15 @@ use std::io::stdio::println; use test_input2::*; mod test_input2; +fn lifetime_and_char<'lifetime>(_: &'lifetime int) +{ + let s = '"'; + let s = '}'; + let s = '\''; + let s = '\uffff'; + fn not_hidden_by_char() {} +} + fn preserve_string_delims(_bar: extern r#"C"# fn()) {} pub struct A diff --git a/tests/ctags/test_input.rs.tags b/tests/ctags/test_input.rs.tags index 8a2046c2b7..e0f9c69ae8 100644 --- a/tests/ctags/test_input.rs.tags +++ b/tests/ctags/test_input.rs.tags @@ -27,9 +27,11 @@ foo foo_field_18蜦oo0 gfunc16(x:&X)0 ignore655360 +lifetime_and_char16<'lifetime>(_: &'lifetime int)0 main16()0 my_method128(&self,_:int)蜦oo0 nested16()蝝ain0 +not_hidden_by_char16()蝜ifetime_and_char0 only_field8蜸10 preserve_string_delims16(_bar: extern r#"C"# fn())0 size163840 From 5e469dc5aeb1982a046703b95893dfd52e5a1174 Mon Sep 17 00:00:00 2001 From: SiegeLord Date: Tue, 29 Jul 2014 11:10:14 -0400 Subject: [PATCH 024/737] Rust: Update comment parsing. Rust now allows CRLF line endings in source files, which doesn't actually change any lexing here but the comment was wrong. Also, the hashbang initial comment has a special case where #![ doesn't count as a comment (but instead an inner attribute that just happens to be on the first line). --- tagmanager/ctags/rust.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tagmanager/ctags/rust.c b/tagmanager/ctags/rust.c index 53ed4fdbc4..14c4806603 100644 --- a/tagmanager/ctags/rust.c +++ b/tagmanager/ctags/rust.c @@ -188,19 +188,30 @@ static void scanWhitespace (lexerState *lexer) } /* Normal line comments start with two /'s and continue until the next \n - * (NOT any other newline character!). Additionally, a shebang in the beginning - * of the file also counts as a line comment. + * (potentially after a \r). Additionally, a shebang in the beginning of the + * file also counts as a line comment as long as it is not this sequence: #![ . * Block comments start with / followed by a * and end with a * followed by a /. * Unlike in C/C++ they nest. */ static void scanComments (lexerState *lexer) { - /* // or #! */ - if (lexer->next_c == '/' || lexer->next_c == '!') + /* // */ + if (lexer->next_c == '/') { advanceNChar(lexer, 2); while (lexer->cur_c != EOF && lexer->cur_c != '\n') advanceChar(lexer); } + /* #! */ + else if (lexer->next_c == '!') + { + advanceNChar(lexer, 2); + /* If it is exactly #![ then it is not a comment, but an attribute */ + if (lexer->cur_c == '[') + return; + while (lexer->cur_c != EOF && lexer->cur_c != '\n') + advanceChar(lexer); + } + /* block comment */ else if (lexer->next_c == '*') { int level = 1; From d9e569398a0dbdac961cf4aa9e624d51fbdfa1f0 Mon Sep 17 00:00:00 2001 From: SiegeLord Date: Tue, 29 Jul 2014 11:14:34 -0400 Subject: [PATCH 025/737] Rust: Add new comment handling test. --- tests/ctags/test_input2.rs | 1 + tests/ctags/test_input2.rs.tags | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/ctags/test_input2.rs b/tests/ctags/test_input2.rs index 921c902f7e..eff7fbab0d 100644 --- a/tests/ctags/test_input2.rs +++ b/tests/ctags/test_input2.rs @@ -1,3 +1,4 @@ +#![cfg(not(test))] fn not_hashbang() {} use std::io::stdio::println; pub fn foo_bar_test_func(apples:fruit::SomeStruct,(oranges,lemon):(int,int))->int{ diff --git a/tests/ctags/test_input2.rs.tags b/tests/ctags/test_input2.rs.tags index cbcddf0ebd..82628f25b7 100644 --- a/tests/ctags/test_input2.rs.tags +++ b/tests/ctags/test_input2.rs.tags @@ -14,6 +14,7 @@ granite green_value8蝔ruit::SomeStruct0 limestone16()蝝ineral0 mineral2560 +not_hashbang16()0 red_value8蝔ruit::SomeStruct0 v8蜸omeLongStructName0 veg2560 From 58f0a20bcc640a7973b22b3f7647750eaa1838c2 Mon Sep 17 00:00:00 2001 From: SiegeLord Date: Tue, 29 Jul 2014 11:20:56 -0400 Subject: [PATCH 026/737] Rust: Update test sources to be valid Rust code. --- tests/ctags/test_input.rs | 20 ++++++++++---------- tests/ctags/test_input.rs.tags | 2 +- tests/ctags/test_input2.rs | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/ctags/test_input.rs b/tests/ctags/test_input.rs index 68f857abf3..49744e8da6 100644 --- a/tests/ctags/test_input.rs +++ b/tests/ctags/test_input.rs @@ -1,6 +1,6 @@ #! fn ignored_in_comment() {} -#[feature(globs)]; -#[feature(macro_rules)]; +#![feature(globs)] +#![feature(macro_rules)] use std::*; use std::io::stdio::println; use test_input2::*; @@ -55,18 +55,18 @@ macro_rules! test_macro macro_rules! ignore (($($x:tt)*) => (())) -fn yada(a:int,c:Foo,b:test_input2::fruit::SomeStruct) -> ~str { - a.to_str() +fn yada(a:int,c:Foo,b:test_input2::fruit::SomeStruct) -> String { + a.to_string() } fn main() { use test_input2::fruit::*; - io::println(foo_bar_test_func(SomeStruct{red_value:1,green_value:2,blue_value:3},(4,5)).to_str()); + io::println(foo_bar_test_func(SomeStruct{red_value:1,green_value:2,blue_value:3},(4,5)).to_string().as_slice()); let a=Foo{foo_field_1:2}; a.my_method(1); let c=a_cat(3); let d=Foo{foo_field_1:a.foo_field_1+2}; a.test(); - println(a.foo_field_1.to_str()); + println(a.foo_field_1.to_string().as_slice()); ignore! ( fn ignored_inside_macro() {} @@ -122,21 +122,21 @@ trait DoZ { impl Testable for Foo { fn test(&self) { - println(self.foo_field_1.to_str()); + println(self.foo_field_1.to_string().as_slice()); } fn test1(&self) { - println(self.foo_field_1.to_str()); + println(self.foo_field_1.to_string().as_slice()); } fn test2(&self) { - println(self.foo_field_1.to_str()); + println(self.foo_field_1.to_string().as_slice()); } } impl DoZ for Foo { fn do_z(&self) { - println(self.foo_field_1.to_str()); + println(self.foo_field_1.to_string().as_slice()); } } diff --git a/tests/ctags/test_input.rs.tags b/tests/ctags/test_input.rs.tags index e0f9c69ae8..f257d90a6a 100644 --- a/tests/ctags/test_input.rs.tags +++ b/tests/ctags/test_input.rs.tags @@ -49,4 +49,4 @@ test_macro x8蜦oo20 x8蜹raitedStructTest0 y8蜦oo20 -yada16(a:int,c:Foo,b:test_input2::fruit::SomeStruct) -> ~str0 +yada16(a:int,c:Foo,b:test_input2::fruit::SomeStruct) -> String0 diff --git a/tests/ctags/test_input2.rs b/tests/ctags/test_input2.rs index eff7fbab0d..163cc8aab8 100644 --- a/tests/ctags/test_input2.rs +++ b/tests/ctags/test_input2.rs @@ -1,7 +1,7 @@ #![cfg(not(test))] fn not_hashbang() {} -use std::io::stdio::println; pub fn foo_bar_test_func(apples:fruit::SomeStruct,(oranges,lemon):(int,int))->int{ + use std::io::stdio::println; let some_var_name=2*oranges; let a=SomeLongStructName{v:0}; println("a");println("b"); println("c"); From db977a999d52f34713b11430a3d02fd6386a880a Mon Sep 17 00:00:00 2001 From: SiegeLord Date: Tue, 29 Jul 2014 11:27:25 -0400 Subject: [PATCH 027/737] Rust: Add keyword --- data/filetypes.rust | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/filetypes.rust b/data/filetypes.rust index 4997bacd3e..7f8d2bd64b 100644 --- a/data/filetypes.rust +++ b/data/filetypes.rust @@ -22,7 +22,7 @@ lexerror=error [keywords] # all items must be in one line -primary=alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self sizeof static struct super trait true type typeof unsafe unsized use while yield +primary=alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self sizeof static struct super trait true type typeof unsafe unsized use virtual while yield secondary=bool char f32 f64 i16 i32 i64 i8 int str u16 u32 u64 u8 uint tertiary=Self From c250195b81827b159c32a2c8d4c0d6f4bda7d35d Mon Sep 17 00:00:00 2001 From: elextr Date: Wed, 30 Jul 2014 16:07:50 +1000 Subject: [PATCH 028/737] Add HTML and XML template extensions Add *.tpl and *.xtpl. --- data/filetype_extensions.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/filetype_extensions.conf b/data/filetype_extensions.conf index 75e7129146..8de1a9b5ae 100644 --- a/data/filetype_extensions.conf +++ b/data/filetype_extensions.conf @@ -34,7 +34,7 @@ Go=*.go; Graphviz=*.gv;*.dot; Haskell=*.hs;*.lhs;*.hs-boot;*.lhs-boot; Haxe=*.hx; -HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm; +HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;*.tpl; Java=*.java;*.jsp; Javascript=*.js; LaTeX=*.tex;*.sty;*.idx;*.ltx;*.latex;*.aux;*.bib; @@ -63,7 +63,7 @@ Txt2tags=*.t2t; Vala=*.vala;*.vapi; Verilog=*.v; VHDL=*.vhd;*.vhdl; -XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd;*.xhtml;*.xul;*.dtd; +XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd;*.xhtml;*.xul;*.dtd;*.xtpl; YAML=*.yaml;*.yml; None=*; From 01b3103eafd787b9a94d14026c3872691d6e1f90 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Fri, 1 Aug 2014 11:54:05 +0100 Subject: [PATCH 029/737] Remove unread variable --- src/document.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/document.c b/src/document.c index 18f28f3d0e..54913f9d26 100644 --- a/src/document.c +++ b/src/document.c @@ -3250,12 +3250,10 @@ static void on_monitor_resave_missing_file_response(GtkWidget *bar, gint response_id, GeanyDocument *doc) { - gboolean file_saved = FALSE; - unprotect_document(doc); if (response_id == GTK_RESPONSE_ACCEPT) - file_saved = dialogs_show_save_as(); + dialogs_show_save_as(); doc->priv->info_bars[MSG_TYPE_RESAVE] = NULL; } From e1988964c17b57fdaf7741105d384235fec1bff1 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Fri, 1 Aug 2014 12:00:20 +0100 Subject: [PATCH 030/737] Fix Windows build --- src/build.c | 1 + src/dialogs.c | 1 + src/document.c | 1 + src/main.c | 1 + src/plugins.c | 1 + src/project.c | 1 + src/socket.c | 1 + src/tools.c | 1 + src/ui_utils.c | 1 + src/utils.c | 1 + 10 files changed, 10 insertions(+) diff --git a/src/build.c b/src/build.c index 706dbdcddf..b4f71be88c 100644 --- a/src/build.c +++ b/src/build.c @@ -48,6 +48,7 @@ #include "ui_utils.h" #include "utils.h" #include "vte.h" +#include "win32.h" #include "gtkcompat.h" diff --git a/src/dialogs.c b/src/dialogs.c index 645f374bfc..8e3e8b6aa6 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -38,6 +38,7 @@ #include "support.h" #include "utils.h" #include "ui_utils.h" +#include "win32.h" #include "gtkcompat.h" diff --git a/src/document.c b/src/document.c index 54913f9d26..33532f8936 100644 --- a/src/document.c +++ b/src/document.c @@ -52,6 +52,7 @@ #include "ui_utils.h" #include "utils.h" #include "vte.h" +#include "win32.h" #include "gtkcompat.h" diff --git a/src/main.c b/src/main.c index 1e3a0a6a9a..279ecdf871 100644 --- a/src/main.c +++ b/src/main.c @@ -61,6 +61,7 @@ #include "ui_utils.h" #include "utils.h" #include "vte.h" +#include "win32.h" #include "gtkcompat.h" diff --git a/src/plugins.c b/src/plugins.c index a926fcf4fe..ffa5357ea5 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -52,6 +52,7 @@ #include "toolbar.h" #include "ui_utils.h" #include "utils.h" +#include "win32.h" #include "gtkcompat.h" diff --git a/src/project.c b/src/project.c index 48fa90fa86..ecd6ba7bd4 100644 --- a/src/project.c +++ b/src/project.c @@ -44,6 +44,7 @@ #include "support.h" #include "ui_utils.h" #include "utils.h" +#include "win32.h" #include #include diff --git a/src/socket.c b/src/socket.c index b2ba841aa5..fd78ccd43c 100644 --- a/src/socket.c +++ b/src/socket.c @@ -66,6 +66,7 @@ #include "main.h" #include "support.h" #include "utils.h" +#include "win32.h" #include "gtkcompat.h" diff --git a/src/tools.c b/src/tools.c index 652553c3ad..8c0e3d50e2 100644 --- a/src/tools.c +++ b/src/tools.c @@ -36,6 +36,7 @@ #include "support.h" #include "ui_utils.h" #include "utils.h" +#include "win32.h" #include "gtkcompat.h" diff --git a/src/ui_utils.c b/src/ui_utils.c index cb60ed2ac0..8fb7dad414 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -49,6 +49,7 @@ #include "symbols.h" #include "toolbar.h" #include "utils.h" +#include "win32.h" #include "gtkcompat.h" diff --git a/src/utils.c b/src/utils.c index ac95041afb..e4c5448422 100644 --- a/src/utils.c +++ b/src/utils.c @@ -37,6 +37,7 @@ #include "support.h" #include "templates.h" #include "ui_utils.h" +#include "win32.h" #include #include From 257de6597cd7fb0f7cd75d20c67c0de1d85d491a Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 1 Aug 2014 16:05:09 +0200 Subject: [PATCH 031/737] fortran: Make sure not to index kinds out of bounds This also makes recent GCC shut up about indexing below the bounds as it detected the code checked for a negative index yet didn't guard the actual access. For now GCC doesn't understand the more comprehensive check, but it might come back if GCC becomes smart enough. Anyway, this makes the Assert() more correct, and addition of the explicit kinds array size makes sure any future kind addition won't miss its entry. --- tagmanager/ctags/fortran.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tagmanager/ctags/fortran.c b/tagmanager/ctags/fortran.c index a95168e460..9510ba91bc 100644 --- a/tagmanager/ctags/fortran.c +++ b/tagmanager/ctags/fortran.c @@ -214,7 +214,7 @@ static boolean NewLine = TRUE; static unsigned int contextual_fake_count = 0; /* indexed by tagType */ -static kindOption FortranKinds [] = { +static kindOption FortranKinds [TAG_COUNT] = { { TRUE, 'b', "block data", "block data"}, { TRUE, 'c', "macro", "common blocks"}, { TRUE, 'e', "entry", "entry points"}, @@ -490,7 +490,7 @@ static boolean isFileScope (const tagType type) static boolean includeTag (const tagType type) { boolean include; - Assert (type != TAG_UNDEFINED); + Assert (type > TAG_UNDEFINED && type < TAG_COUNT); include = FortranKinds [(int) type].enabled; if (include && isFileScope (type)) include = Option.include.fileScope; From d4acd1e061211cb5c113b50dbe9786d62e67786e Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Fri, 1 Aug 2014 12:10:17 +0100 Subject: [PATCH 032/737] *View->Change Font* should respect native dialog setting (Windows, #1059) --- src/dialogs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/dialogs.c b/src/dialogs.c index 8e3e8b6aa6..279ff9f13b 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -814,7 +814,6 @@ gboolean dialogs_show_unsaved_file(GeanyDocument *doc) } -#ifndef G_OS_WIN32 /* Use GtkFontChooserDialog on GTK3.2 for consistency, and because * GtkFontSelectionDialog is somewhat broken on 3.4 */ #if GTK_CHECK_VERSION(3, 2, 0) @@ -854,15 +853,18 @@ on_font_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) if (close) gtk_widget_hide(ui_widgets.open_fontsel); } -#endif /* This shows the font selection dialog to choose a font. */ void dialogs_show_open_font(void) { #ifdef G_OS_WIN32 - win32_show_font_dialog(); -#else + if (interface_prefs.use_native_windows_dialogs) + { + win32_show_font_dialog(); + return; + } +#endif if (ui_widgets.open_fontsel == NULL) { @@ -896,7 +898,6 @@ void dialogs_show_open_font(void) GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel), interface_prefs.editor_font); /* We make sure the dialog is visible. */ gtk_window_present(GTK_WINDOW(ui_widgets.open_fontsel)); -#endif } From c47c84820e6f48be9eb70261d4d790229b1b3294 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 2 Aug 2014 22:03:34 +0200 Subject: [PATCH 033/737] Fix typo in documentation --- doc/geany.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/geany.txt b/doc/geany.txt index 8a5078fec5..b72e4e867c 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -5139,7 +5139,7 @@ After you are happy with your changes, create a patch e.g. by using:: or even better, by creating a Git-formatted patch which will keep authoring and description data, by first committing your changes (doing so in a fresh -new branch is recommended for `matser` not to diverge from upstream) and then +new branch is recommended for `master` not to diverge from upstream) and then using git format-patch:: % git checkout -b my-documentation-changes # create a fresh branch From eb267d30cbe1fe603d315d7f165bdff7ed574b2c Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Sat, 2 Aug 2014 20:29:02 -0700 Subject: [PATCH 034/737] For native win32 dialogs, pump main window loop a bit Mostly gets rid of re-drawing issues, however is not great. --- src/win32.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 80 insertions(+), 7 deletions(-) diff --git a/src/win32.c b/src/win32.c index 9fa9bc1f60..80da1b5031 100644 --- a/src/win32.c +++ b/src/win32.c @@ -83,6 +83,71 @@ static gboolean CreateChildProcess(geany_win32_spawn *gw_spawn, TCHAR *szCmdline static VOID ReadFromPipe(HANDLE hRead, HANDLE hWrite, HANDLE hFile, GError **error); +static UINT_PTR dialog_timer = 0; + + +VOID CALLBACK +win32_dialog_update_main_window(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) +{ + gint i; + for (i = 0; i < 4 && gtk_events_pending(); i++) + gtk_main_iteration(); + dialog_timer = 0; +} + + +VOID CALLBACK win32_dialog_timer_expired(HWND hwnd, UINT msg, UINT_PTR idEvent, DWORD dwTime) +{ + while (gtk_events_pending()) + gtk_main_iteration(); +} + + +/* This function is called for OPENFILENAME lpfnHook function and it establishes + * a timer that is reset each time which will update the main window loop eventually */ +UINT_PTR CALLBACK win32_dialog_explorer_hook_proc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) + { + case WM_WINDOWPOSCHANGED: + case WM_MOVE: + case WM_SIZE: + case WM_THEMECHANGED: + { + if (dialog_timer != 0) + KillTimer(dlg, dialog_timer); + dialog_timer = SetTimer(dlg, 0, 33 /* around 30fps */, win32_dialog_update_main_window); + } + } + return 0; /* always let the default proc handle it */ +} + + +/* This function is called for old-school win32 dialogs that accept a proper + * lpfnHook function for all messages. It doesn't use a timer but instead checks + * GTK+ events pending and clamps to some arbitrary limit to prevent freeze-ups. */ +UINT_PTR CALLBACK win32_dialog_hook_proc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) + { + case WM_WINDOWPOSCHANGED: + case WM_MOVE: + case WM_SIZE: + case WM_THEMECHANGED: + { + /* Pump the main window loop a bit, but not enough to lock-up. + * The typical `while(gtk_events_pending()) gtk_main_iteration();` + * loop causes the entire operating system to lock-up. */ + guint i; + for (i = 0; i < 4 && gtk_events_pending(); i++) + gtk_main_iteration(); + break; + } + } + return 0; /* always let the default proc handle it */ +} + + static wchar_t *get_file_filters(void) { gchar *string; @@ -206,6 +271,7 @@ static wchar_t *get_dir_for_path(const gchar *utf8_filename) * folder when the dialog is initialised. Yeah, I like Windows. */ INT CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) { + win32_dialog_hook_proc(hwnd, uMsg, lp, pData); switch (uMsg) { case BFFM_INITIALIZED: @@ -309,7 +375,8 @@ gchar *win32_show_project_open_dialog(GtkWidget *parent, const gchar *title, of.lpstrFileTitle = NULL; of.lpstrTitle = w_title; of.lpstrDefExt = L""; - of.Flags = OFN_PATHMUSTEXIST | OFN_EXPLORER | OFN_HIDEREADONLY; + of.Flags = OFN_PATHMUSTEXIST | OFN_EXPLORER | OFN_HIDEREADONLY | OFN_ENABLEHOOK; + of.lpfnHook = win32_dialog_explorer_hook_proc; if (! allow_new_file) of.Flags |= OFN_FILEMUSTEXIST; @@ -371,7 +438,8 @@ gboolean win32_show_document_open_dialog(GtkWindow *parent, const gchar *title, of.lpstrFileTitle = NULL; of.lpstrTitle = w_title; of.lpstrDefExt = L""; - of.Flags = OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST | OFN_EXPLORER; + of.Flags = OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_ENABLEHOOK; + of.lpfnHook = win32_dialog_explorer_hook_proc; retval = GetOpenFileNameW(&of); @@ -464,7 +532,8 @@ gchar *win32_show_document_save_as_dialog(GtkWindow *parent, const gchar *title, of.lpstrFileTitle = NULL; of.lpstrTitle = w_title; of.lpstrDefExt = L""; - of.Flags = OFN_OVERWRITEPROMPT | OFN_EXPLORER; + of.Flags = OFN_OVERWRITEPROMPT | OFN_EXPLORER | OFN_ENABLEHOOK; + of.lpfnHook = win32_dialog_explorer_hook_proc; retval = GetSaveFileNameW(&of); if (! retval) @@ -516,7 +585,8 @@ gchar *win32_show_file_dialog(GtkWindow *parent, const gchar *title, const gchar of.lpstrFileTitle = NULL; of.lpstrTitle = w_title; of.lpstrDefExt = L""; - of.Flags = OFN_FILEMUSTEXIST | OFN_EXPLORER; + of.Flags = OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_ENABLEHOOK; + of.lpfnHook = win32_dialog_explorer_hook_proc; retval = GetOpenFileNameW(&of); if (! retval) @@ -551,7 +621,8 @@ void win32_show_font_dialog(void) cf.hwndOwner = GDK_WINDOW_HWND(gtk_widget_get_window(main_widgets.window)); cf.lpLogFont = &lf; /* support CF_APPLY? */ - cf.Flags = CF_NOSCRIPTSEL | CF_FORCEFONTEXIST | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS; + cf.Flags = CF_NOSCRIPTSEL | CF_FORCEFONTEXIST | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS | CF_ENABLEHOOK; + cf.lpfnHook = win32_dialog_hook_proc; retval = ChooseFont(&cf); @@ -578,7 +649,8 @@ void win32_show_color_dialog(const gchar *colour) cc.hwndOwner = GDK_WINDOW_HWND(gtk_widget_get_window(main_widgets.window)); cc.lpCustColors = (LPDWORD) acr_cust_clr; cc.rgbResult = (colour != NULL) ? utils_parse_color_to_bgr(colour) : 0; - cc.Flags = CC_FULLOPEN | CC_RGBINIT; + cc.Flags = CC_FULLOPEN | CC_RGBINIT | CC_ENABLEHOOK; + cc.lpfnHook = win32_dialog_hook_proc; if (ChooseColor(&cc)) { @@ -636,7 +708,8 @@ void win32_show_pref_file_dialog(GtkEntry *item) of.lpstrInitialDir = NULL; of.lpstrTitle = NULL; of.lpstrDefExt = L"exe"; - of.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_EXPLORER; + of.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_ENABLEHOOK; + of.lpfnHook = win32_dialog_explorer_hook_proc; retval = GetOpenFileNameW(&of); if (!retval) From 3c2d93eca42d550fe416a9200e6a67a82bcd7afe Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Sun, 3 Aug 2014 04:23:19 -0700 Subject: [PATCH 035/737] Refactor win32 native dialog-mainloop update code Just cleaning up last commit. --- src/win32.c | 74 +++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/src/win32.c b/src/win32.c index 80da1b5031..eaf5afb0ca 100644 --- a/src/win32.c +++ b/src/win32.c @@ -83,68 +83,74 @@ static gboolean CreateChildProcess(geany_win32_spawn *gw_spawn, TCHAR *szCmdline static VOID ReadFromPipe(HANDLE hRead, HANDLE hWrite, HANDLE hFile, GError **error); +/* The timer handle used to refresh windows below modal native dialogs. If + * ever more than one dialog can be shown at a time, this needs to be changed + * to be for specific dialogs. */ static UINT_PTR dialog_timer = 0; +G_INLINE_FUNC void win32_dialog_reset_timer(HWND hwnd) +{ + if (G_UNLIKELY(dialog_timer != 0)) + { + KillTimer(hwnd, dialog_timer); + dialog_timer = 0; + } +} + + VOID CALLBACK win32_dialog_update_main_window(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { gint i; + + /* Pump the main window loop a bit, but not enough to lock-up. + * The typical `while(gtk_events_pending()) gtk_main_iteration();` + * loop causes the entire operating system to lock-up. */ for (i = 0; i < 4 && gtk_events_pending(); i++) gtk_main_iteration(); - dialog_timer = 0; -} - -VOID CALLBACK win32_dialog_timer_expired(HWND hwnd, UINT msg, UINT_PTR idEvent, DWORD dwTime) -{ - while (gtk_events_pending()) - gtk_main_iteration(); + /* Cancel any pending timers since we just did an update */ + win32_dialog_reset_timer(hwnd); } -/* This function is called for OPENFILENAME lpfnHook function and it establishes - * a timer that is reset each time which will update the main window loop eventually */ -UINT_PTR CALLBACK win32_dialog_explorer_hook_proc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) +G_INLINE_FUNC UINT_PTR win32_dialog_queue_main_window_redraw(HWND dlg, UINT msg, + WPARAM wParam, LPARAM lParam, gboolean postpone) { switch (msg) { + /* Messages that likely mean the window below a dialog needs to be re-drawn. */ case WM_WINDOWPOSCHANGED: case WM_MOVE: case WM_SIZE: case WM_THEMECHANGED: - { - if (dialog_timer != 0) - KillTimer(dlg, dialog_timer); - dialog_timer = SetTimer(dlg, 0, 33 /* around 30fps */, win32_dialog_update_main_window); - } + if (postpone) + { + win32_dialog_reset_timer(dlg); + dialog_timer = SetTimer(dlg, 0, 33 /* around 30fps */, win32_dialog_update_main_window); + } + else + win32_dialog_update_main_window(dlg, msg, wParam, lParam); + break; } return 0; /* always let the default proc handle it */ } +/* This function is called for OPENFILENAME lpfnHook function and it establishes + * a timer that is reset each time which will update the main window loop eventually. */ +UINT_PTR CALLBACK win32_dialog_explorer_hook_proc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + return win32_dialog_queue_main_window_redraw(dlg, msg, wParam, lParam, TRUE); +} + + /* This function is called for old-school win32 dialogs that accept a proper - * lpfnHook function for all messages. It doesn't use a timer but instead checks - * GTK+ events pending and clamps to some arbitrary limit to prevent freeze-ups. */ + * lpfnHook function for all messages, it doesn't use a timer. */ UINT_PTR CALLBACK win32_dialog_hook_proc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) { - switch (msg) - { - case WM_WINDOWPOSCHANGED: - case WM_MOVE: - case WM_SIZE: - case WM_THEMECHANGED: - { - /* Pump the main window loop a bit, but not enough to lock-up. - * The typical `while(gtk_events_pending()) gtk_main_iteration();` - * loop causes the entire operating system to lock-up. */ - guint i; - for (i = 0; i < 4 && gtk_events_pending(); i++) - gtk_main_iteration(); - break; - } - } - return 0; /* always let the default proc handle it */ + return win32_dialog_queue_main_window_redraw(dlg, msg, wParam, lParam, FALSE); } From bc9b2fa4445b6b870f2be942aa27d49994985ae9 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 3 Aug 2014 16:34:24 +0200 Subject: [PATCH 036/737] JavaScript: don't choke on array lists --- tagmanager/ctags/js.c | 4 ++++ tests/ctags/Makefile.am | 1 + tests/ctags/arraylist.js | 20 ++++++++++++++++++++ tests/ctags/arraylist.js.tags | 9 +++++++++ 4 files changed, 34 insertions(+) create mode 100644 tests/ctags/arraylist.js create mode 100644 tests/ctags/arraylist.js.tags diff --git a/tagmanager/ctags/js.c b/tagmanager/ctags/js.c index 1b0dd9fd8a..70b7157726 100644 --- a/tagmanager/ctags/js.c +++ b/tagmanager/ctags/js.c @@ -660,6 +660,10 @@ static void findCmdTerm (tokenInfo *const token) { skipArgumentList(token); } + else if ( isType (token, TOKEN_OPEN_SQUARE) ) + { + skipArrayList(token); + } else { readToken (token); diff --git a/tests/ctags/Makefile.am b/tests/ctags/Makefile.am index c42a22a2ff..a125b14b2c 100644 --- a/tests/ctags/Makefile.am +++ b/tests/ctags/Makefile.am @@ -14,6 +14,7 @@ test_sources = \ 68hc11.asm \ angle_bracket.cpp \ anonymous_functions.php \ + arraylist.js \ array_ref_and_out.cs \ array_spec.f90 \ array-spec.f90 \ diff --git a/tests/ctags/arraylist.js b/tests/ctags/arraylist.js new file mode 100644 index 0000000000..9c730f4c2a --- /dev/null +++ b/tests/ctags/arraylist.js @@ -0,0 +1,20 @@ + +var a = []; +var b = [1, 2, 3]; +var c = [ + { a: "hello", b: 42 }, + { a: "hi", b: 41 } +]; + +var class = function() { + this.test1 = { + foo: [ 1, 2, 3], + bar: [ 4, 5, 9] + }; + // FIXME: no tag is generated for test2 + this.test2 = [ + { a: {}, b: {} }, + { a: {}, b: {} } + ]; + this.test3 = function() {} +} diff --git a/tests/ctags/arraylist.js.tags b/tests/ctags/arraylist.js.tags new file mode 100644 index 0000000000..44b6e77d58 --- /dev/null +++ b/tests/ctags/arraylist.js.tags @@ -0,0 +1,9 @@ +# format=tagmanager +a163840 +b163840 +bar64蝐lass.test10 +c163840 +class󉅞 +foo64蝐lass.test10 +test11蝐lass0 +test3128蝐lass0 From b596aa14e82967d02d711c48cd62e631c29bea65 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 3 Aug 2014 16:57:26 +0200 Subject: [PATCH 037/737] JavaScript: don't choke when returning object literals --- tagmanager/ctags/js.c | 4 ++ tests/ctags/Makefile.am | 1 + tests/ctags/complex-return.js | 61 ++++++++++++++++++++++++++++++ tests/ctags/complex-return.js.tags | 18 +++++++++ 4 files changed, 84 insertions(+) create mode 100644 tests/ctags/complex-return.js create mode 100644 tests/ctags/complex-return.js.tags diff --git a/tagmanager/ctags/js.c b/tagmanager/ctags/js.c index 70b7157726..64d84df041 100644 --- a/tagmanager/ctags/js.c +++ b/tagmanager/ctags/js.c @@ -1663,6 +1663,10 @@ static boolean parseLine (tokenInfo *const token, boolean is_inside_class) case KEYWORD_switch: parseSwitch (token); break; + case KEYWORD_return: + findCmdTerm (token); + is_terminated = isType (token, TOKEN_SEMICOLON); + break; default: is_terminated = parseStatement (token, is_inside_class); break; diff --git a/tests/ctags/Makefile.am b/tests/ctags/Makefile.am index a125b14b2c..b3694baed1 100644 --- a/tests/ctags/Makefile.am +++ b/tests/ctags/Makefile.am @@ -112,6 +112,7 @@ test_sources = \ char-selector.f90 \ classes.php \ common.f \ + complex-return.js \ continuation.f90 \ countall.sql \ cpp_destructor.cpp \ diff --git a/tests/ctags/complex-return.js b/tests/ctags/complex-return.js new file mode 100644 index 0000000000..e84190e567 --- /dev/null +++ b/tests/ctags/complex-return.js @@ -0,0 +1,61 @@ + +function func1() { + return { a: 1, b:2 }; +} + +function func2() { + return 42; +} + +var class1 = function() { + this.method1 = function() { + return 42; + }; + this.method2 = function() { + return { a:1, b:2 }; + }; + this.method3 = function() { + return [1, 2, 3]; + }; + this.method4 = function() { + return "hello"; + }; +}; + +var class2 = function() { + this.c2m1 = function() { + c2m3(function() { + return { 'test': {} }; + }); + }; + this.c2m2 = function(f) { + return { 'ret': f() }; + }; + this.c2m3 = function(f) { + return f(); + }; +}; + +var class3 = function() { + this.c3m1 = function() { + return function(n) { + if (n == 42) { + return 0; + } else { + return (n + 1) % 42; + } + }; + }; + this.c3m2 = function() { + return 0; + }; +} + +var class4 = function() { + this.method1 = function() { + return [{a:1, b:2}, {a:3, b:4}, {a:5, b:6}]; + }; + this.method2 = function() { + return 0; + }; +}; diff --git a/tests/ctags/complex-return.js.tags b/tests/ctags/complex-return.js.tags new file mode 100644 index 0000000000..c086d5534c --- /dev/null +++ b/tests/ctags/complex-return.js.tags @@ -0,0 +1,18 @@ +# format=tagmanager +c2m1128蝐lass20 +c2m2128蝐lass20 +c2m3128蝐lass20 +c3m1128蝐lass30 +c3m2128蝐lass30 +class1󉅞 +class2󉅞 +class3󉅞 +class4󉅞 +func1160 +func2160 +method1128蝐lass10 +method1128蝐lass40 +method2128蝐lass10 +method2128蝐lass40 +method3128蝐lass10 +method4128蝐lass10 From 3ff01aeeb30462fe8b9c82740cae4a2e419c9587 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 3 Aug 2014 19:07:59 +0200 Subject: [PATCH 038/737] JavaScript: recognize assignation to a parenthesized expression --- tagmanager/ctags/js.c | 4 ++++ tests/ctags/bug2777310.js | 2 ++ tests/ctags/bug2777310.js.tags | 2 ++ 3 files changed, 8 insertions(+) diff --git a/tagmanager/ctags/js.c b/tagmanager/ctags/js.c index 64d84df041..1024b6ced6 100644 --- a/tagmanager/ctags/js.c +++ b/tagmanager/ctags/js.c @@ -1433,6 +1433,8 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class) /* * Handle nameless functions * this.method_name = () {} + * Also assignments starting with parentheses + * var foo = (1 + 2) * 3; */ skipArgumentList(token); @@ -1446,6 +1448,8 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class) } else if (isType (token, TOKEN_CLOSE_CURLY)) is_terminated = FALSE; + else if (token->nestLevel == 0 && is_global) + makeJsTag (name, JSTAG_VARIABLE); } else if (isType (token, TOKEN_OPEN_CURLY)) { diff --git a/tests/ctags/bug2777310.js b/tests/ctags/bug2777310.js index 53070e7b8f..26c3fc9c80 100644 --- a/tests/ctags/bug2777310.js +++ b/tests/ctags/bug2777310.js @@ -1,4 +1,6 @@ var x = 1; var z = {}; var y = []; +var a = (42 + 1) * 2; +var b = 2 * (42 + 1); diff --git a/tests/ctags/bug2777310.js.tags b/tests/ctags/bug2777310.js.tags index 8ae01b77d7..42f6ee8767 100644 --- a/tests/ctags/bug2777310.js.tags +++ b/tests/ctags/bug2777310.js.tags @@ -1,4 +1,6 @@ # format=tagmanager +a163840 +b163840 x163840 y163840 z163840 From 35e8fbbe2886b2c5c82686f7e0435e5aa6aad32f Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 3 Aug 2014 23:24:33 +0200 Subject: [PATCH 039/737] JavaScript: fix handling of various missing semicolons in loops --- tagmanager/ctags/js.c | 16 +++++++---- tests/ctags/1880687.js | 53 ++++++++++++++++++++++++++++++++++++- tests/ctags/1880687.js.tags | 12 +++++++++ 3 files changed, 75 insertions(+), 6 deletions(-) diff --git a/tagmanager/ctags/js.c b/tagmanager/ctags/js.c index 1024b6ced6..65ab61af97 100644 --- a/tagmanager/ctags/js.c +++ b/tagmanager/ctags/js.c @@ -709,7 +709,7 @@ static void parseSwitch (tokenInfo *const token) } -static void parseLoop (tokenInfo *const token) +static boolean parseLoop (tokenInfo *const token) { /* * Handles these statements @@ -732,6 +732,7 @@ static void parseLoop (tokenInfo *const token) * } * while (number<5); */ + boolean is_terminated = TRUE; if (isKeyword (token, KEYWORD_for) || isKeyword (token, KEYWORD_while)) { @@ -758,7 +759,7 @@ static void parseLoop (tokenInfo *const token) } else { - parseLine(token, FALSE); + is_terminated = parseLine(token, FALSE); } } else if (isKeyword (token, KEYWORD_do)) @@ -777,10 +778,11 @@ static void parseLoop (tokenInfo *const token) } else { - parseLine(token, FALSE); + is_terminated = parseLine(token, FALSE); } - readToken(token); + if (is_terminated) + readToken(token); if (isKeyword (token, KEYWORD_while)) { @@ -794,8 +796,12 @@ static void parseLoop (tokenInfo *const token) */ skipArgumentList(token); } + if (! isType (token, TOKEN_SEMICOLON)) + is_terminated = FALSE; } } + + return is_terminated; } static boolean parseIf (tokenInfo *const token) @@ -1654,7 +1660,7 @@ static boolean parseLine (tokenInfo *const token, boolean is_inside_class) case KEYWORD_for: case KEYWORD_while: case KEYWORD_do: - parseLoop (token); + is_terminated = parseLoop (token); break; case KEYWORD_if: case KEYWORD_else: diff --git a/tests/ctags/1880687.js b/tests/ctags/1880687.js index 2bd5e41162..fbf390ec10 100644 --- a/tests/ctags/1880687.js +++ b/tests/ctags/1880687.js @@ -1,5 +1,5 @@ -// All these examples contain various forms of IF statements +// All these examples contain various forms of statements // with missing semicolons. Each of these are valid and must // be accommodated. // @@ -7,6 +7,9 @@ // The following tags should be generated: // functions // a +// aa +// aa_sub1 [aa] +// aa_sub2 [aa] // b // baz [f] // c @@ -32,6 +35,15 @@ // w // w_sub1 [w] // w_sub2 [w] +// x +// x_sub1 [x] +// x_sub2 [x] +// y +// y_sub1 [y] +// y_sub2 [y] +// z +// z_sub1 [z] +// z_sub2 [z] // classes // MyClass // methods @@ -189,3 +201,42 @@ MyClass = { var dummy5 = 42; } }; + +function x(){ + function x_sub1(){ + while (1) + x_sub2() + } + function x_sub2(){ + } +} + +function y(){ + function y_sub1(){ + while (1) { + y_sub2() + } + } + function y_sub2(){ + } +} + +function z(){ + function z_sub1(){ + do { + z_sub2() + } while (0) + } + function z_sub2(){ + } +} + +function aa(){ + function aa_sub1(){ + do + aa_sub2() + while (0) + } + function aa_sub2(){ + } +} diff --git a/tests/ctags/1880687.js.tags b/tests/ctags/1880687.js.tags index 6e1c57b5be..645ca843eb 100644 --- a/tests/ctags/1880687.js.tags +++ b/tests/ctags/1880687.js.tags @@ -3,6 +3,9 @@ MyClass MyClass_sub1128蜯yClass0 MyClass_sub2128蜯yClass0 a160 +aa160 +aa_sub116蝍a0 +aa_sub216蝍a0 b160 baz16蝔0 c160 @@ -28,3 +31,12 @@ v w160 w_sub116蝫0 w_sub216蝫0 +x160 +x_sub116蝬0 +x_sub216蝬0 +y160 +y_sub116蝭0 +y_sub216蝭0 +z160 +z_sub116蝯0 +z_sub216蝯0 From 8341228ffa5a69970e85cddc7adb6d1f49f247d9 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 3 Aug 2014 23:55:25 +0200 Subject: [PATCH 040/737] JavaScript: fix handling of parentheses around an rvalue Properly skip parentheses around an rvalue, and then properly recognize the surrounded value. This allows to properly recognize e.g. rvalue `({...})` as an object, or `(function(){})` as a function. As the implementation is tolerant regarding garbage after the statement, function expressions called straight away (`(function(){})()`) are implicitly supported. This however removes support for the following invalid JavaScript syntax that was previously supported as a function/method declaration: var func = () {} This syntax is not present in the ECMA standard nor is supported by popular JavaScript engines. See: * http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf section 13, "Function Definition" * http://ecma262-5.com/ELS5_HTML.htm#Section_13 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope#Defining_functions --- tagmanager/ctags/js.c | 61 +++++++++++--------------- tests/ctags/Makefile.am | 1 + tests/ctags/parenthesis-rvalue.js | 35 +++++++++++++++ tests/ctags/parenthesis-rvalue.js.tags | 23 ++++++++++ tests/ctags/simple.js | 2 +- 5 files changed, 85 insertions(+), 37 deletions(-) create mode 100644 tests/ctags/parenthesis-rvalue.js create mode 100644 tests/ctags/parenthesis-rvalue.js.tags diff --git a/tagmanager/ctags/js.c b/tagmanager/ctags/js.c index 65ab61af97..fbdd98b2bb 100644 --- a/tagmanager/ctags/js.c +++ b/tagmanager/ctags/js.c @@ -1368,8 +1368,17 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class) if ( isType (token, TOKEN_EQUAL_SIGN) ) { + int parenDepth = 0; + readToken (token); + /* rvalue might be surrounded with parentheses */ + while (isType (token, TOKEN_OPEN_PAREN)) + { + parenDepth++; + readToken (token); + } + if ( isKeyword (token, KEYWORD_function) ) { readToken (token); @@ -1426,37 +1435,9 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class) if ( vStringLength(secondary_name->string) > 0 ) makeFunctionTag (secondary_name); - - /* - * Find to the end of the statement - */ - goto cleanUp; } } } - else if (isType (token, TOKEN_OPEN_PAREN)) - { - /* - * Handle nameless functions - * this.method_name = () {} - * Also assignments starting with parentheses - * var foo = (1 + 2) * 3; - */ - skipArgumentList(token); - - if (isType (token, TOKEN_OPEN_CURLY)) - { - /* - * Nameless functions are only setup as methods. - */ - makeJsTag (name, JSTAG_METHOD); - parseBlock (token, name); - } - else if (isType (token, TOKEN_CLOSE_CURLY)) - is_terminated = FALSE; - else if (token->nestLevel == 0 && is_global) - makeJsTag (name, JSTAG_VARIABLE); - } else if (isType (token, TOKEN_OPEN_CURLY)) { /* @@ -1506,11 +1487,7 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class) if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) && ! stringListHas(ClassNames, vStringValue (fulltag)) ) { - readToken (token); - if ( ! isType (token, TOKEN_SEMICOLON)) - findCmdTerm (token); - if (isType (token, TOKEN_SEMICOLON)) - makeJsTag (name, JSTAG_VARIABLE); + makeJsTag (name, JSTAG_VARIABLE); } vStringDelete (fulltag); } @@ -1598,13 +1575,25 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class) if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) && ! stringListHas(ClassNames, vStringValue (fulltag)) ) { - findCmdTerm (token); - if (isType (token, TOKEN_SEMICOLON)) - makeJsTag (name, JSTAG_VARIABLE); + makeJsTag (name, JSTAG_VARIABLE); } vStringDelete (fulltag); } } + + if (parenDepth > 0) + { + while (parenDepth > 0) + { + if (isType (token, TOKEN_OPEN_PAREN)) + parenDepth++; + else if (isType (token, TOKEN_CLOSE_PAREN)) + parenDepth--; + readToken (token); + } + if (isType (token, TOKEN_CLOSE_CURLY)) + is_terminated = FALSE; + } } /* if we aren't already at the cmd end, advance to it and check whether diff --git a/tests/ctags/Makefile.am b/tests/ctags/Makefile.am index b3694baed1..009d671614 100644 --- a/tests/ctags/Makefile.am +++ b/tests/ctags/Makefile.am @@ -200,6 +200,7 @@ test_sources = \ objectivec_protocol.mm \ Package.pm \ php5_5_class_kw.php \ + parenthesis-rvalue.js \ preprocessor.f90 \ procedure_pointer_module.f90 \ procpoint.f90 \ diff --git a/tests/ctags/parenthesis-rvalue.js b/tests/ctags/parenthesis-rvalue.js new file mode 100644 index 0000000000..54a3e22301 --- /dev/null +++ b/tests/ctags/parenthesis-rvalue.js @@ -0,0 +1,35 @@ + +// plain values +var a1 = 42; +var a2 = (42); + +// functions +var b1 = function(){ + function b1sub(){} +}; +var b2 = (function(){ + function b2sub(){} +}); +var b3 = ((function(){ + function b3sub(){} +})); + +// objects +var c1 = {}; +var c2 = ({}); +var d1 = {a:'hello',b:'hi'}; +var d2 = ({a:'hello',b:'hi'}); + +// function expressions called straight away +var e1 = function(){ + function e1sub(){} + return 42; +}(); +var e2 = (function(){ + function e2sub(){} + return 42 +})(); +var e3 = ((function(){ + function e3sub(){} + return 42 +})()); diff --git a/tests/ctags/parenthesis-rvalue.js.tags b/tests/ctags/parenthesis-rvalue.js.tags new file mode 100644 index 0000000000..2496b841ca --- /dev/null +++ b/tests/ctags/parenthesis-rvalue.js.tags @@ -0,0 +1,23 @@ +# format=tagmanager +a64蝑10 +a64蝑20 +a1163840 +a2163840 +b64蝑10 +b64蝑20 +b1160 +b1sub16蝏10 +b2160 +b2sub16蝏20 +b3160 +b3sub16蝏30 +c1163840 +c2163840 +d1󉅞 +d2󉅞 +e1160 +e1sub16蝒10 +e2160 +e2sub16蝒20 +e3160 +e3sub16蝒30 diff --git a/tests/ctags/simple.js b/tests/ctags/simple.js index 2dbf281387..6f48c632c7 100644 --- a/tests/ctags/simple.js +++ b/tests/ctags/simple.js @@ -69,7 +69,7 @@ ValidClassTwo = function () this.validMethodThree = function() {} // unnamed method - this.validMethodFour = () {} + this.validMethodFour = function() {} } var my_global_var4 = document.getElementsByTagName("input"); From ed20a4373da28564be76028df6e137f0f2194d80 Mon Sep 17 00:00:00 2001 From: elextr Date: Wed, 6 Aug 2014 12:25:59 +1000 Subject: [PATCH 041/737] Make reflow paragraph leave cursor at end. The cursor was left at the beginning of the last line, leaving it at the end is more likely to be a useful position to continue typing. --- src/keybindings.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/keybindings.c b/src/keybindings.c index 63e95fca84..88370753b9 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -2270,6 +2270,7 @@ static void reflow_paragraph(GeanyEditor *editor) reflow_lines(editor, column); if (!sel) sci_set_anchor(sci, -1); + sci_goto_pos(sci, sci_get_line_end_position(sci, sci_get_current_line(sci)), TRUE); sci_end_undo_action(sci); } From a26bdd628f7a7d6a5937195083b7829be09b1a81 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 7 Aug 2014 15:14:22 +0200 Subject: [PATCH 042/737] Fix crash when closing a document with visible infobars Apparently the ::unrealize symbol is sent too late, after we destroyed the widget and freed the GeanyDocument, and some signals like ::focus-in-event can still be fired on the widget after that. So, properly use the ::destroy signal that is supposed to be fired when others should release references to that instance. --- src/document.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/document.c b/src/document.c index 33532f8936..aae11db758 100644 --- a/src/document.c +++ b/src/document.c @@ -3215,7 +3215,7 @@ static gboolean on_sci_key(GtkWidget *widget, GdkEventKey *event, gpointer data) static void enable_key_intercept(GeanyDocument *doc, GtkWidget *bar) { /* automatically focus editor again on bar close */ - g_signal_connect_object(bar, "unrealize", G_CALLBACK(gtk_widget_grab_focus), doc->editor->sci, + g_signal_connect_object(bar, "destroy", G_CALLBACK(gtk_widget_grab_focus), doc->editor->sci, G_CONNECT_SWAPPED); g_signal_connect_object(doc->editor->sci, "key-press-event", G_CALLBACK(on_sci_key), bar, 0); } From 604e05cb2d84a2f6d10f9dde3b2e53a6e9078969 Mon Sep 17 00:00:00 2001 From: Frank Lanitz Date: Thu, 7 Aug 2014 15:30:54 +0200 Subject: [PATCH 043/737] Adding message to client/log keywords to SQL type --- data/filetypes.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/filetypes.sql b/data/filetypes.sql index cd9d78ff82..59dfb49fb9 100644 --- a/data/filetypes.sql +++ b/data/filetypes.sql @@ -22,7 +22,7 @@ quotedidentifier=identifier_2 [keywords] # all items must be in one line -keywords=absolute action add admin after aggregate alias all allocate alter and any are array as asc assertion at authorization auto_increment before begin bfile bigint binary bit blob bool boolean both breadth by call cascade cascaded case cast catalog char charset character check class clob close cluster collate collation column comment commit completion connect connection constraint constraints constructor continue corresponding create cross cube current current_date current_path current_role current_time current_timestamp current_user cursor cycle data date day deallocate dec decimal declare default deferrable deferred delete depth deref desc describe descriptor destroy destructor deterministic diagnostics dictionary dimension disconnect diskgroup distinct domain double drop dynamic each else elsif end end-exec engine equals escape every except exception exec execute exists explain external false fetch first fixed flashback float for foreign found from free full function general get global go goto grant group grouping having host hour identity if ignore immediate in index indextype indicator initialize initially inner inout input insert int integer intersect interval into is isolation iterate join key language large last lateral leading left less level like limit local localtime localtimestamp locator long loop map match materialized mediumblob mediumint mediumtext merge middleint minus minute modifies modify module month names national natural nchar nclob new next no noaudit none not null numeric nvarchar2 object of off old on only open operation option or order ordinality out outer output owner package pad parameter parameters partial path postfix precision prefix preorder prepare preserve primary prior privileges procedure profile public purge raise read reads real recursive ref references referencing regexp regexp_like relative rename replace restrict result return returning returns revoke right role rollback rollup routine row rows savepoint schema scroll scope search second section select sequence session session_user serial set sets size smallint some space specific specifictype sql sqlexception sqlstate sqlwarning start state statement static structure synonym system_user table tablespace temporary terminate text than then time timestamp timezone_hour timezone_minute tinyint to trailing transaction translation treat trigger true truncate type under union unique uniqueidentifier unknown unnest unsigned update usage user using value values varchar varchar2 variable varying view when whenever where while with without work write year zone +keywords=absolute action add admin after aggregate alias all allocate alter and any are array as asc assertion at authorization auto_increment before begin bfile bigint binary bit blob bool boolean both breadth by call cascade cascaded case cast catalog char charset character check class client clob close cluster collate collation column comment commit completion connect connection constraint constraints constructor continue corresponding create cross cube current current_date current_path current_role current_time current_timestamp current_user cursor cycle data date day deallocate dec decimal declare default deferrable deferred delete depth deref desc describe descriptor destroy destructor deterministic diagnostics dictionary dimension disconnect diskgroup distinct domain double drop dynamic each else elsif end end-exec engine equals escape every except exception exec execute exists explain external false fetch first fixed flashback float for foreign found from free full function general get global go goto grant group grouping having host hour identity if ignore immediate in index indextype indicator initialize initially inner inout input insert int integer intersect interval into is isolation iterate join key language large last lateral leading left less level like limit local localtime localtimestamp locator log long loop map match materialized mediumblob mediumint mediumtext merge message middleint minus minute modifies modify module month names national natural nchar nclob new next no noaudit none not null numeric nvarchar2 object of off old on only open operation option or order ordinality out outer output owner package pad parameter parameters partial path postfix precision prefix preorder prepare preserve primary prior privileges procedure profile public purge raise read reads real recursive ref references referencing regexp regexp_like relative rename replace restrict result return returning returns revoke right role rollback rollup routine row rows savepoint schema scroll scope search second section select sequence session session_user serial set sets size smallint some space specific specifictype sql sqlexception sqlstate sqlwarning start state statement static structure synonym system_user table tablespace temporary terminate text than then time timestamp timezone_hour timezone_minute tinyint to trailing transaction translation treat trigger true truncate type under union unique uniqueidentifier unknown unnest unsigned update usage user using value values varchar varchar2 variable varying view when whenever where while with without work write year zone [settings] # default extension used when saving files From 482d2732af20c2501f299990c4214e00badf5e32 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 10 Aug 2014 01:46:16 +0200 Subject: [PATCH 044/737] Add support for single-line regular expressions --- src/callbacks.c | 6 ++--- src/document.c | 6 ++--- src/keybindings.c | 4 ++-- src/search.c | 59 ++++++++++++++++++++++++++++++++--------------- src/search.h | 9 ++++++++ 5 files changed, 57 insertions(+), 27 deletions(-) diff --git a/src/callbacks.c b/src/callbacks.c index b0909000ed..8599eeca53 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -902,14 +902,14 @@ static void find_usage(gboolean in_session) if (sci_has_selection(doc->editor->sci)) { /* take selected text if there is a selection */ search_text = sci_get_selection_contents(doc->editor->sci); - flags = SCFIND_MATCHCASE; + flags = GEANY_FIND_MATCHCASE; } else { editor_find_current_word_sciwc(doc->editor, -1, editor_info.current_word, GEANY_MAX_WORD_LENGTH); search_text = g_strdup(editor_info.current_word); - flags = SCFIND_MATCHCASE | SCFIND_WHOLEWORD; + flags = GEANY_FIND_MATCHCASE | GEANY_FIND_WHOLEWORD; } search_find_usage(search_text, search_text, flags, in_session); @@ -999,7 +999,7 @@ G_MODULE_EXPORT void on_find_next1_activate(GtkMenuItem *menuitem, gpointer user G_MODULE_EXPORT void on_find_previous1_activate(GtkMenuItem *menuitem, gpointer user_data) { - if (search_data.flags & SCFIND_REGEXP) + if (search_data.flags & GEANY_FIND_REGEXP) /* Can't reverse search order for a regex (find next ignores search backwards) */ utils_beep(); else diff --git a/src/document.c b/src/document.c index e962a57679..bb042b4d6e 100644 --- a/src/document.c +++ b/src/document.c @@ -1400,7 +1400,7 @@ static void replace_header_filename(GeanyDocument *doc) ttf.chrg.cpMax = sci_get_position_from_line(doc->editor->sci, 4); ttf.lpstrText = filebase; - if (search_find_text(doc->editor->sci, SCFIND_MATCHCASE | SCFIND_REGEXP, &ttf, NULL) != -1) + if (search_find_text(doc->editor->sci, GEANY_FIND_MATCHCASE | GEANY_FIND_REGEXP, &ttf, NULL) != -1) { sci_set_target_start(doc->editor->sci, ttf.chrgText.cpMin); sci_set_target_end(doc->editor->sci, ttf.chrgText.cpMax); @@ -1924,7 +1924,7 @@ gint document_find_text(GeanyDocument *doc, const gchar *text, const gchar *orig return -1; /* Sci doesn't support searching backwards with a regex */ - if (flags & SCFIND_REGEXP) + if (flags & GEANY_FIND_REGEXP) search_backwards = FALSE; if (!original_text) @@ -2005,7 +2005,7 @@ gint document_replace_text(GeanyDocument *doc, const gchar *find_text, const gch return -1; /* Sci doesn't support searching backwards with a regex */ - if (flags & SCFIND_REGEXP) + if (flags & GEANY_FIND_REGEXP) search_backwards = FALSE; if (!original_find_text) diff --git a/src/keybindings.c b/src/keybindings.c index f0d1a0cc38..cf4bb674bf 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -1465,9 +1465,9 @@ static gboolean cb_func_search_action(guint key_id) text = get_current_word_or_sel(doc, TRUE); if (sci_has_selection(sci)) - search_mark_all(doc, text, SCFIND_MATCHCASE); + search_mark_all(doc, text, GEANY_FIND_MATCHCASE); else - search_mark_all(doc, text, SCFIND_MATCHCASE | SCFIND_WHOLEWORD); + search_mark_all(doc, text, GEANY_FIND_MATCHCASE | GEANY_FIND_WHOLEWORD); g_free(text); break; diff --git a/src/search.c b/src/search.c index a33197daf8..186bf0f31e 100644 --- a/src/search.c +++ b/src/search.c @@ -95,12 +95,14 @@ static struct gint fif_files_mode; gchar *fif_files; gboolean find_regexp; + gboolean find_regexp_multiline; gboolean find_escape_sequences; gboolean find_case_sensitive; gboolean find_match_whole_word; gboolean find_match_word_start; gboolean find_close_dialog; gboolean replace_regexp; + gboolean replace_regexp_multiline; gboolean replace_escape_sequences; gboolean replace_case_sensitive; gboolean replace_match_whole_word; @@ -237,6 +239,8 @@ static void init_prefs(void) configuration_add_pref_group(group, FALSE); stash_group_add_toggle_button(group, &settings.find_regexp, "find_regexp", FALSE, "check_regexp"); + stash_group_add_boolean(group, &settings.find_regexp_multiline, + "find_regexp_multiline", FALSE); stash_group_add_toggle_button(group, &settings.find_case_sensitive, "find_case_sensitive", FALSE, "check_case"); stash_group_add_toggle_button(group, &settings.find_escape_sequences, @@ -253,6 +257,8 @@ static void init_prefs(void) configuration_add_pref_group(group, FALSE); stash_group_add_toggle_button(group, &settings.replace_regexp, "replace_regexp", FALSE, "check_regexp"); + stash_group_add_boolean(group, &settings.replace_regexp_multiline, + "replace_regexp_multiline", FALSE); stash_group_add_toggle_button(group, &settings.replace_case_sensitive, "replace_case_sensitive", FALSE, "check_case"); stash_group_add_toggle_button(group, &settings.replace_escape_sequences, @@ -1259,20 +1265,21 @@ static void on_find_entry_activate_backward(GtkEntry *entry, gpointer user_data) { /* can't search backwards with a regexp */ - if (search_data.flags & SCFIND_REGEXP) + if (search_data.flags & GEANY_FIND_REGEXP) utils_beep(); else on_find_dialog_response(NULL, GEANY_RESPONSE_FIND_PREVIOUS, user_data); } -static gboolean int_search_flags(gint match_case, gint whole_word, gint regexp, gint word_start) +static gboolean int_search_flags(gint match_case, gint whole_word, gint regexp, gint multiline, gint word_start) { - return (match_case ? SCFIND_MATCHCASE : 0) | - (regexp ? SCFIND_REGEXP | SCFIND_POSIX : 0) | - (whole_word ? SCFIND_WHOLEWORD : 0) | + return (match_case ? GEANY_FIND_MATCHCASE : 0) | + (regexp ? GEANY_FIND_REGEXP : 0) | + (whole_word ? GEANY_FIND_WHOLEWORD : 0) | + (multiline ? GEANY_FIND_MULTILINE : 0) | /* SCFIND_WORDSTART overrides SCFIND_WHOLEWORD, but we want the opposite */ - (word_start && !whole_word ? SCFIND_WORDSTART : 0); + (word_start && !whole_word ? GEANY_FIND_WORDSTART : 0); } @@ -1302,7 +1309,8 @@ on_find_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) search_data.text = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(user_data))))); search_data.original_text = g_strdup(search_data.text); search_data.flags = int_search_flags(settings.find_case_sensitive, - settings.find_match_whole_word, settings.find_regexp, settings.find_match_word_start); + settings.find_match_whole_word, settings.find_regexp, settings.find_regexp_multiline, + settings.find_match_word_start); if (EMPTY(search_data.text)) { @@ -1311,7 +1319,7 @@ on_find_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) gtk_widget_grab_focus(find_dlg.entry); return; } - if (search_data.flags & SCFIND_REGEXP) + if (search_data.flags & GEANY_FIND_REGEXP) { GRegex *regex = compile_regex(search_data.text, search_data.flags); if (!regex) @@ -1443,16 +1451,16 @@ on_replace_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) search_flags_re = int_search_flags(settings.replace_case_sensitive, settings.replace_match_whole_word, settings.replace_regexp, - settings.replace_match_word_start); + settings.replace_regexp_multiline, settings.replace_match_word_start); - if ((response != GEANY_RESPONSE_FIND) && (search_flags_re & SCFIND_MATCHCASE) + if ((response != GEANY_RESPONSE_FIND) && (search_flags_re & GEANY_FIND_MATCHCASE) && (strcmp(find, replace) == 0)) goto fail; original_find = g_strdup(find); original_replace = g_strdup(replace); - if (search_flags_re & SCFIND_REGEXP) + if (search_flags_re & GEANY_FIND_REGEXP) { GRegex *regex = compile_regex(find, search_flags_re); if (regex) @@ -1919,11 +1927,13 @@ static GRegex *compile_regex(const gchar *str, gint sflags) { GRegex *regex; GError *error = NULL; - gint rflags = G_REGEX_MULTILINE; + gint rflags = 0; - if (~sflags & SCFIND_MATCHCASE) + if (sflags & GEANY_FIND_MULTILINE) + rflags |= G_REGEX_MULTILINE; + if (~sflags & GEANY_FIND_MATCHCASE) rflags |= G_REGEX_CASELESS; - if (sflags & (SCFIND_WHOLEWORD | SCFIND_WORDSTART)) + if (sflags & (GEANY_FIND_WHOLEWORD | GEANY_FIND_WORDSTART)) { geany_debug("%s: Unsupported regex flags found!", G_STRFUNC); } @@ -2018,7 +2028,7 @@ gint search_find_prev(ScintillaObject *sci, const gchar *str, gint flags, GeanyM { gint ret; - g_return_val_if_fail(! (flags & SCFIND_REGEXP), -1); + g_return_val_if_fail(! (flags & GEANY_FIND_REGEXP), -1); ret = sci_search_prev(sci, flags, str); if (ret != -1 && match_) @@ -2027,6 +2037,17 @@ gint search_find_prev(ScintillaObject *sci, const gchar *str, gint flags, GeanyM } +static gint geany_find_flags_to_sci_flags(gint flags) +{ + g_warn_if_fail(! (flags & GEANY_FIND_MULTILINE)); + + return ((flags & GEANY_FIND_MATCHCASE) ? SCFIND_MATCHCASE : 0) | + ((flags & GEANY_FIND_WHOLEWORD) ? SCFIND_WHOLEWORD : 0) | + ((flags & GEANY_FIND_REGEXP) ? SCFIND_REGEXP | SCFIND_POSIX : 0) | + ((flags & GEANY_FIND_WORDSTART) ? SCFIND_WORDSTART : 0); +} + + gint search_find_next(ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_) { GeanyMatchInfo *match; @@ -2034,9 +2055,9 @@ gint search_find_next(ScintillaObject *sci, const gchar *str, gint flags, GeanyM gint ret = -1; gint pos; - if (~flags & SCFIND_REGEXP) + if (~flags & GEANY_FIND_REGEXP) { - ret = sci_search_next(sci, flags, str); + ret = sci_search_next(sci, geany_find_flags_to_sci_flags(flags), str); if (ret != -1 && match_) *match_ = match_info_new(flags, ret, ret + strlen(str)); return ret; @@ -2118,9 +2139,9 @@ gint search_find_text(ScintillaObject *sci, gint flags, struct Sci_TextToFind *t GRegex *regex; gint ret; - if (~flags & SCFIND_REGEXP) + if (~flags & GEANY_FIND_REGEXP) { - ret = sci_find_text(sci, flags, ttf); + ret = sci_find_text(sci, geany_find_flags_to_sci_flags(flags), ttf); if (ret != -1 && match_) *match_ = match_info_new(flags, ttf->chrgText.cpMin, ttf->chrgText.cpMax); return ret; diff --git a/src/search.h b/src/search.h index f51175e55b..e732697ce6 100644 --- a/src/search.h +++ b/src/search.h @@ -61,6 +61,15 @@ enum GeanyFindSelOptions GEANY_FIND_SEL_AGAIN }; +enum GeanyFindFlags +{ + GEANY_FIND_MATCHCASE = 1 << 0, + GEANY_FIND_WHOLEWORD = 1 << 1, + GEANY_FIND_WORDSTART = 1 << 2, + GEANY_FIND_REGEXP = 1 << 3, + GEANY_FIND_MULTILINE = 1 << 4 +}; + /** Search preferences */ typedef struct GeanySearchPrefs { From 673c3c36a3acb4218567eccbdee87d6eb5d4d402 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 10 Aug 2014 01:46:31 +0200 Subject: [PATCH 045/737] Add UI elements to control single-line regex settings --- src/search.c | 59 ++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/src/search.c b/src/search.c index 186bf0f31e..9debcf0d99 100644 --- a/src/search.c +++ b/src/search.c @@ -239,8 +239,8 @@ static void init_prefs(void) configuration_add_pref_group(group, FALSE); stash_group_add_toggle_button(group, &settings.find_regexp, "find_regexp", FALSE, "check_regexp"); - stash_group_add_boolean(group, &settings.find_regexp_multiline, - "find_regexp_multiline", FALSE); + stash_group_add_toggle_button(group, &settings.find_regexp_multiline, + "find_regexp_multiline", FALSE, "check_multiline"); stash_group_add_toggle_button(group, &settings.find_case_sensitive, "find_case_sensitive", FALSE, "check_case"); stash_group_add_toggle_button(group, &settings.find_escape_sequences, @@ -257,8 +257,8 @@ static void init_prefs(void) configuration_add_pref_group(group, FALSE); stash_group_add_toggle_button(group, &settings.replace_regexp, "replace_regexp", FALSE, "check_regexp"); - stash_group_add_boolean(group, &settings.replace_regexp_multiline, - "replace_regexp_multiline", FALSE); + stash_group_add_toggle_button(group, &settings.replace_regexp_multiline, + "replace_regexp_multiline", FALSE, "check_multiline"); stash_group_add_toggle_button(group, &settings.replace_case_sensitive, "replace_case_sensitive", FALSE, "check_case"); stash_group_add_toggle_button(group, &settings.replace_escape_sequences, @@ -306,7 +306,7 @@ static void on_widget_toggled_set_insensitive( static GtkWidget *add_find_checkboxes(GtkDialog *dialog) { GtkWidget *checkbox1, *checkbox2, *check_regexp, *check_back, *checkbox5, - *checkbox7, *hbox, *fbox, *mbox; + *checkbox7, *check_multiline, *hbox, *fbox, *mbox; check_regexp = gtk_check_button_new_with_mnemonic(_("_Use regular expressions")); ui_hookup_widget(dialog, check_regexp, "check_regexp"); @@ -316,33 +316,36 @@ static GtkWidget *add_find_checkboxes(GtkDialog *dialog) g_signal_connect(check_regexp, "toggled", G_CALLBACK(on_find_replace_checkbutton_toggled), dialog); - if (dialog != GTK_DIALOG(find_dlg.dialog)) - { - check_back = gtk_check_button_new_with_mnemonic(_("Search _backwards")); - ui_hookup_widget(dialog, check_back, "check_back"); - gtk_button_set_focus_on_click(GTK_BUTTON(check_back), FALSE); - } - else - { /* align the two checkboxes at the top of the hbox */ - GtkSizeGroup *label_size; - check_back = gtk_label_new(NULL); - label_size = gtk_size_group_new(GTK_SIZE_GROUP_VERTICAL); - gtk_size_group_add_widget(GTK_SIZE_GROUP(label_size), check_back); - gtk_size_group_add_widget(GTK_SIZE_GROUP(label_size), check_regexp); - g_object_unref(label_size); - } checkbox7 = gtk_check_button_new_with_mnemonic(_("Use _escape sequences")); ui_hookup_widget(dialog, checkbox7, "check_escape"); gtk_button_set_focus_on_click(GTK_BUTTON(checkbox7), FALSE); gtk_widget_set_tooltip_text(checkbox7, - _("Replace \\\\, \\t, \\n, \\r and \\uXXXX (Unicode chararacters) with the " + _("Replace \\\\, \\t, \\n, \\r and \\uXXXX (Unicode characters) with the " "corresponding control characters")); + check_multiline = gtk_check_button_new_with_mnemonic(_("Use multi-_line matching")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_multiline), FALSE); + gtk_widget_set_sensitive(check_multiline, FALSE); + ui_hookup_widget(dialog, check_multiline, "check_multiline"); + gtk_button_set_focus_on_click(GTK_BUTTON(check_multiline), FALSE); + gtk_widget_set_tooltip_text(check_multiline, _("Perform regular expression " + "matching on the whole buffer at once rather than line by line, allowing " + "matches to span multiple lines. In this mode, newline characters are part " + "of the input and can be captured as normal characters by the pattern.")); + /* Search features */ fbox = gtk_vbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(fbox), check_regexp); - gtk_container_add(GTK_CONTAINER(fbox), checkbox7); - gtk_container_add(GTK_CONTAINER(fbox), check_back); + gtk_box_pack_start(GTK_BOX(fbox), check_regexp, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(fbox), check_multiline, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(fbox), checkbox7, FALSE, FALSE, 0); + + if (dialog != GTK_DIALOG(find_dlg.dialog)) + { + check_back = gtk_check_button_new_with_mnemonic(_("Search _backwards")); + ui_hookup_widget(dialog, check_back, "check_back"); + gtk_button_set_focus_on_click(GTK_BUTTON(check_back), FALSE); + gtk_container_add(GTK_CONTAINER(fbox), check_back); + } checkbox1 = gtk_check_button_new_with_mnemonic(_("C_ase sensitive")); ui_hookup_widget(dialog, checkbox1, "check_case"); @@ -362,9 +365,9 @@ static GtkWidget *add_find_checkboxes(GtkDialog *dialog) /* Matching options */ mbox = gtk_vbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(mbox), checkbox1); - gtk_container_add(GTK_CONTAINER(mbox), checkbox2); - gtk_container_add(GTK_CONTAINER(mbox), checkbox5); + gtk_box_pack_start(GTK_BOX(mbox), checkbox1, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(mbox), checkbox2, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(mbox), checkbox5, FALSE, FALSE, 0); hbox = gtk_hbox_new(TRUE, 6); gtk_container_add(GTK_CONTAINER(hbox), fbox); @@ -1148,6 +1151,7 @@ on_find_replace_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user GtkWidget *check_word = ui_lookup_widget(dialog, "check_word"); GtkWidget *check_wordstart = ui_lookup_widget(dialog, "check_wordstart"); GtkWidget *check_escape = ui_lookup_widget(dialog, "check_escape"); + GtkWidget *check_multiline = ui_lookup_widget(dialog, "check_multiline"); gboolean replace = (dialog != find_dlg.dialog); const char *back_button[2] = { "btn_previous" , "check_back" }; @@ -1156,6 +1160,7 @@ on_find_replace_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user gtk_widget_set_sensitive(ui_lookup_widget(dialog, back_button[replace]), ! regex_set); gtk_widget_set_sensitive(check_word, ! regex_set); gtk_widget_set_sensitive(check_wordstart, ! regex_set); + gtk_widget_set_sensitive(check_multiline, regex_set); } } From 83deafeddaa9bf2a0eca6eb34056e61cc7a2021c Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 2 Aug 2014 16:04:42 +0200 Subject: [PATCH 046/737] Update the documentation for single-line regular expressions --- doc/geany.txt | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/doc/geany.txt b/doc/geany.txt index 8a5078fec5..a12f63041f 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -1231,6 +1231,10 @@ The syntax for the *Use regular expressions* option is shown in .. note:: *Use escape sequences* is implied for regular expressions. +The *Use multi-line matching* option enables multi-line regular +expressions instead of single-line ones. See `Regular expressions`_ for +more details on the differences between the two modes. + The *Use escape sequences* option will transform any escaped characters into their UTF-8 equivalent. For example, \\t will be transformed into a tab character. Other recognized symbols are: \\\\, \\n, \\r, \\uXXXX @@ -1451,10 +1455,17 @@ options`_). The syntax is Perl compatible. Basic syntax is described in the table below. For full details, see http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html. +By default regular expressions are matched on a line-by-line basis. +If you are interested in multi-line regular expressions, matched against +the whole buffer at once, see the section `Multi-line regular expressions`_ +below. + .. note:: 1. The *Use escape sequences* dialog option always applies for regular expressions. 2. Searching backwards with regular expressions is not supported. + 3. The *Use multi-line matching* dialog option to select single or + multi-line matching. **In a regular expression, the following characters are interpreted:** @@ -1531,6 +1542,30 @@ $ This matches the end of a line. distributed under the `License for Scintilla and SciTE`_. +Multi-line regular expressions +`````````````````````````````` + +.. note:: + The *Use multi-line matching* dialog option enables multi-line + regular expressions. + +Multi-line regular expressions work just like single-line ones but a +match can span several lines. + +While the syntax is the same, a few practical differences applies: + +======= ============================================================ +. Matches any character but newlines. This behavior can be changed + to also match newlines using the (?s) option, see + http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html#idp5671632 + +[^...] A negative range (see above) *will* match newlines if they are + not explicitly listed in that negative range. For example, range + [^a-z] will match newlines, while range [^a-z\\r\\n] won't. + While this is the expected behavior, it can lead to tricky + problems if one doesn't think about it when writing an expression. +======= ============================================================ + View menu --------- From d77fe4c6b78f1b3d6f7650370d2f46eaec0e6f8d Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 10 Aug 2014 02:17:32 +0200 Subject: [PATCH 047/737] Update Scintilla to 3.5.0 pre-release --- scintilla/Makefile.am | 6 + scintilla/gtk/PlatGTK.cxx | 12 +- scintilla/gtk/ScintillaGTK.cxx | 284 ++- scintilla/include/SciLexer.h | 18 + scintilla/include/Scintilla.h | 15 +- scintilla/include/Scintilla.iface | 48 +- scintilla/lexers/LexHTML.cxx | 12 +- scintilla/lexers/LexMatlab.cxx | 5 +- scintilla/lexers/LexRuby.cxx | 36 +- scintilla/lexers/LexRust.cxx | 105 +- scintilla/lexlib/LexerModule.h | 7 +- scintilla/makefile.win32 | 3 + scintilla/scintilla_changes.patch | 3 +- scintilla/src/CellBuffer.cxx | 40 +- scintilla/src/CellBuffer.h | 12 + scintilla/src/ContractionState.cxx | 18 +- scintilla/src/ContractionState.h | 4 +- scintilla/src/Document.cxx | 59 + scintilla/src/Document.h | 8 +- scintilla/src/EditModel.cxx | 74 + scintilla/src/EditModel.h | 67 + scintilla/src/EditView.cxx | 2072 +++++++++++++++++++++ scintilla/src/EditView.h | 163 ++ scintilla/src/Editor.cxx | 2795 ++++------------------------ scintilla/src/Editor.h | 130 +- scintilla/src/LineMarker.cxx | 96 +- scintilla/src/MarginView.cxx | 455 +++++ scintilla/src/MarginView.h | 41 + scintilla/src/PerLine.cxx | 70 + scintilla/src/PerLine.h | 17 + scintilla/src/PositionCache.cxx | 25 +- scintilla/src/PositionCache.h | 7 +- scintilla/src/RESearch.cxx | 17 +- scintilla/src/RESearch.h | 1 - scintilla/src/ScintillaBase.cxx | 5 +- scintilla/src/ScintillaBase.h | 4 +- scintilla/src/Selection.cxx | 11 +- scintilla/src/Selection.h | 1 + scintilla/src/ViewStyle.cxx | 14 + scintilla/src/ViewStyle.h | 4 + scintilla/version.txt | 2 +- 41 files changed, 4007 insertions(+), 2759 deletions(-) create mode 100644 scintilla/src/EditModel.cxx create mode 100644 scintilla/src/EditModel.h create mode 100644 scintilla/src/EditView.cxx create mode 100644 scintilla/src/EditView.h create mode 100644 scintilla/src/MarginView.cxx create mode 100644 scintilla/src/MarginView.h diff --git a/scintilla/Makefile.am b/scintilla/Makefile.am index aa156de216..3537504e4e 100644 --- a/scintilla/Makefile.am +++ b/scintilla/Makefile.am @@ -97,6 +97,10 @@ src/Document.cxx \ src/Document.h \ src/Editor.cxx \ src/Editor.h \ +src/EditModel.cxx \ +src/EditModel.h \ +src/EditView.cxx \ +src/EditView.h \ src/ExternalLexer.cxx \ src/ExternalLexer.h \ src/FontQuality.h \ @@ -106,6 +110,8 @@ src/KeyMap.cxx \ src/KeyMap.h \ src/LineMarker.cxx \ src/LineMarker.h \ +src/MarginView.cxx \ +src/MarginView.h \ src/Partitioning.h \ src/PerLine.cxx \ src/PerLine.h \ diff --git a/scintilla/gtk/PlatGTK.cxx b/scintilla/gtk/PlatGTK.cxx index cd57607bc9..2637e5d99b 100644 --- a/scintilla/gtk/PlatGTK.cxx +++ b/scintilla/gtk/PlatGTK.cxx @@ -527,6 +527,7 @@ void SurfaceImpl::Release() { } bool SurfaceImpl::Initialised() { +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 8, 0) if (inited && context) { if (cairo_status(context) == CAIRO_STATUS_SUCCESS) { // Even when status is success, the target surface may have been @@ -543,6 +544,7 @@ bool SurfaceImpl::Initialised() { } return cairo_status(context) == CAIRO_STATUS_SUCCESS; } +#endif return inited; } @@ -1086,6 +1088,10 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION } clusterStart = clusterEnd; } + while (i < lenPositions) { + // If something failed, fill in rest of the positions + positions[i++] = clusterStart; + } PLATFORM_ASSERT(i == lenPositions); } } @@ -1799,6 +1805,7 @@ void ListBoxX::Select(int n) { } int ListBoxX::GetSelection() { + int index = -1; GtkTreeIter iter; GtkTreeModel *model; GtkTreeSelection *selection; @@ -1808,9 +1815,10 @@ int ListBoxX::GetSelection() { int *indices = gtk_tree_path_get_indices(path); // Don't free indices. if (indices) - return indices[0]; + index = indices[0]; + gtk_tree_path_free(path); } - return -1; + return index; } int ListBoxX::Find(const char *prefix) { diff --git a/scintilla/gtk/ScintillaGTK.cxx b/scintilla/gtk/ScintillaGTK.cxx index f74971b1b7..9b0622a9b8 100644 --- a/scintilla/gtk/ScintillaGTK.cxx +++ b/scintilla/gtk/ScintillaGTK.cxx @@ -57,9 +57,13 @@ #include "UniConversion.h" #include "Selection.h" #include "PositionCache.h" +#include "EditModel.h" +#include "MarginView.h" +#include "EditView.h" #include "Editor.h" #include "AutoComplete.h" #include "ScintillaBase.h" +#include "UnicodeFromUTF8.h" #ifdef SCI_LEXER #include "ExternalLexer.h" @@ -186,13 +190,23 @@ class ScintillaGTK : public ScintillaBase { virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); private: virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); - virtual void SetTicking(bool on); + struct TimeThunk { + TickReason reason; + ScintillaGTK *scintilla; + guint timer; + TimeThunk() : reason(tickCaret), scintilla(NULL), timer(0) {} + }; + TimeThunk timers[tickDwell+1]; + virtual bool FineTickerAvailable(); + virtual bool FineTickerRunning(TickReason reason); + virtual void FineTickerStart(TickReason reason, int millis, int tolerance); + virtual void FineTickerCancel(TickReason reason); virtual bool SetIdle(bool on); virtual void SetMouseCapture(bool on); virtual bool HaveMouseCapture(); virtual bool PaintContains(PRectangle rc); void FullPaint(); - virtual PRectangle GetClientRectangle(); + virtual PRectangle GetClientRectangle() const; virtual void ScrollText(int linesToMove); virtual void SetVerticalScrollPos(); virtual void SetHorizontalScrollPos(); @@ -280,6 +294,9 @@ class ScintillaGTK : public ScintillaBase { static void Commit(GtkIMContext *context, char *str, ScintillaGTK *sciThis); void PreeditChangedThis(); static void PreeditChanged(GtkIMContext *context, ScintillaGTK *sciThis); + + bool KoreanIME(); + static void StyleSetText(GtkWidget *widget, GtkStyle *previous, void*); static void RealizeText(GtkWidget *widget, void*); static void Destroy(GObject *object); @@ -300,7 +317,7 @@ class ScintillaGTK : public ScintillaBase { gint x, gint y, GtkSelectionData *selection_data, guint info, guint time); static void DragDataGet(GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time); - static gboolean TimeOut(ScintillaGTK *sciThis); + static gboolean TimeOut(TimeThunk *tt); static gboolean IdleCallback(ScintillaGTK *sciThis); static gboolean StyleIdle(ScintillaGTK *sciThis); virtual void QueueIdleWork(WorkNeeded::workItems items, int upTo); @@ -624,22 +641,37 @@ void ScintillaGTK::MainForAll(GtkContainer *container, gboolean include_internal } } +namespace { + +class PreEditString { +public: + gchar *str; + gint cursor_pos; + PangoAttrList *attrs; + + PreEditString(GtkIMContext *im_context) { + gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos); + } + ~PreEditString() { + g_free(str); + pango_attr_list_unref(attrs); + } +}; + +} + gint ScintillaGTK::FocusInThis(GtkWidget *widget) { try { SetFocusState(true); if (im_context != NULL) { - gchar *str = NULL; - gint cursor_pos; - - gtk_im_context_get_preedit_string(im_context, &str, NULL, &cursor_pos); + PreEditString pes(im_context); if (PWidget(wPreedit) != NULL) { - if (strlen(str) > 0) { + if (strlen(pes.str) > 0) { gtk_widget_show(PWidget(wPreedit)); } else { gtk_widget_hide(PWidget(wPreedit)); } } - g_free(str); gtk_im_context_focus_in(im_context); } @@ -829,11 +861,16 @@ void ScintillaGTK::Initialise() { caret.period = 0; } - SetTicking(true); + for (TickReason tr = tickCaret; tr <= tickDwell; tr = static_cast(tr + 1)) { + timers[tr].reason = tr; + timers[tr].scintilla = this; + } } void ScintillaGTK::Finalise() { - SetTicking(false); + for (TickReason tr = tickCaret; tr <= tickDwell; tr = static_cast(tr + 1)) { + FineTickerCancel(tr); + } ScintillaBase::Finalise(); } @@ -1024,17 +1061,27 @@ sptr_t ScintillaGTK::DefWndProc(unsigned int, uptr_t, sptr_t) { return 0; } -void ScintillaGTK::SetTicking(bool on) { - if (timer.ticking != on) { - timer.ticking = on; - if (timer.ticking) { - timer.tickerID = reinterpret_cast(g_timeout_add(timer.tickSize, - reinterpret_cast(TimeOut), this)); - } else { - g_source_remove(GPOINTER_TO_UINT(timer.tickerID)); - } +/** +* Report that this Editor subclass has a working implementation of FineTickerStart. +*/ +bool ScintillaGTK::FineTickerAvailable() { + return true; +} + +bool ScintillaGTK::FineTickerRunning(TickReason reason) { + return timers[reason].timer != 0; +} + +void ScintillaGTK::FineTickerStart(TickReason reason, int millis, int /* tolerance */) { + FineTickerCancel(reason); + timers[reason].timer = g_timeout_add(millis, reinterpret_cast(TimeOut), &timers[reason]); +} + +void ScintillaGTK::FineTickerCancel(TickReason reason) { + if (timers[reason].timer) { + g_source_remove(timers[reason].timer); + timers[reason].timer = 0; } - timer.ticksToWait = caret.period; } bool ScintillaGTK::SetIdle(bool on) { @@ -1121,8 +1168,9 @@ void ScintillaGTK::FullPaint() { wText.InvalidateAll(); } -PRectangle ScintillaGTK::GetClientRectangle() { - PRectangle rc = wMain.GetClientPosition(); +PRectangle ScintillaGTK::GetClientRectangle() const { + Window &win = const_cast(wMain); + PRectangle rc = win.GetClientPosition(); if (verticalScrollBarVisible) rc.right -= verticalScrollBarWidth; if (horizontalScrollBarVisible && !Wrapping()) @@ -2220,19 +2268,13 @@ gboolean ScintillaGTK::KeyRelease(GtkWidget *widget, GdkEventKey *event) { gboolean ScintillaGTK::DrawPreeditThis(GtkWidget *widget, cairo_t *cr) { try { - gchar *str; - gint cursor_pos; - PangoAttrList *attrs; - - gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos); - PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), str); - pango_layout_set_attributes(layout, attrs); + PreEditString pes(im_context); + PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), pes.str); + pango_layout_set_attributes(layout, pes.attrs); cairo_move_to(cr, 0, 0); pango_cairo_show_layout(cr, layout); - g_free(str); - pango_attr_list_unref(attrs); g_object_unref(layout); } catch (...) { errorStatus = SC_STATUS_FAILURE; @@ -2248,20 +2290,14 @@ gboolean ScintillaGTK::DrawPreedit(GtkWidget *widget, cairo_t *cr, ScintillaGTK gboolean ScintillaGTK::ExposePreeditThis(GtkWidget *widget, GdkEventExpose *ose) { try { - gchar *str; - gint cursor_pos; - PangoAttrList *attrs; - - gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos); - PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), str); - pango_layout_set_attributes(layout, attrs); + PreEditString pes(im_context); + PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), pes.str); + pango_layout_set_attributes(layout, pes.attrs); cairo_t *context = gdk_cairo_create(reinterpret_cast(WindowFromWidget(widget))); cairo_move_to(context, 0, 0); pango_cairo_show_layout(context, layout); cairo_destroy(context); - g_free(str); - pango_attr_list_unref(attrs); g_object_unref(layout); } catch (...) { errorStatus = SC_STATUS_FAILURE; @@ -2275,9 +2311,43 @@ gboolean ScintillaGTK::ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, Sci #endif +bool ScintillaGTK::KoreanIME() { + // Warn : for KoreanIME use only. + if (pdoc->TentativeActive()) { + return true; + } + + bool koreanIME = false; + PreEditString utfval(im_context); + + // Only need to check if the first preedit char is Korean. + // The rest will be handled in TentativeActive() + // which can handle backspace and CJK commons and so forth. + + if (strlen(utfval.str) == 3) { // One hangul char has 3byte. + int unicode = UnicodeFromUTF8(reinterpret_cast(utfval.str)); + // Korean character ranges which are used for the first preedit chars. + // http://www.programminginkorean.com/programming/hangul-in-unicode/ + bool HangulJamo = (0x1100 <= unicode && unicode <= 0x11FF); + bool HangulCompatibleJamo = (0x3130 <= unicode && unicode <= 0x318F); + bool HangulJamoExtendedA = (0xA960 <= unicode && unicode <= 0xA97F); + bool HangulJamoExtendedB = (0xD7B0 <= unicode && unicode <= 0xD7FF); + bool HangulSyllable = (0xAC00 <= unicode && unicode <= 0xD7A3); + koreanIME = (HangulJamo | HangulCompatibleJamo | HangulSyllable + | HangulJamoExtendedA | HangulJamoExtendedB); + } + return koreanIME; +} + void ScintillaGTK::CommitThis(char *utfVal) { try { //~ fprintf(stderr, "Commit '%s'\n", utfVal); + if (pdoc->TentativeActive()) { + pdoc->TentativeUndo(); + } + + view.imeCaretBlockOverride = false; + if (IsUnicodeMode()) { AddCharUTF(utfVal, strlen(utfVal)); } else { @@ -2285,7 +2355,7 @@ void ScintillaGTK::CommitThis(char *utfVal) { if (*source) { Converter conv(source, "UTF-8", true); if (conv) { - char localeVal[4] = "\0\0\0"; + char localeVal[maxLenInputIME * 2]; char *pin = utfVal; size_t inLeft = strlen(utfVal); char *pout = localeVal; @@ -2293,15 +2363,14 @@ void ScintillaGTK::CommitThis(char *utfVal) { size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft); if (conversions != ((size_t)(-1))) { *pout = '\0'; - for (int i = 0; localeVal[i]; i++) { - AddChar(localeVal[i]); - } + AddCharUTF(localeVal, strlen(localeVal)); } else { fprintf(stderr, "Conversion failed '%s'\n", utfVal); } } } } + ShowCaretAtCurrentPosition(); } catch (...) { errorStatus = SC_STATUS_FAILURE; } @@ -2313,36 +2382,99 @@ void ScintillaGTK::Commit(GtkIMContext *, char *str, ScintillaGTK *sciThis) { void ScintillaGTK::PreeditChangedThis() { try { - gchar *str; - PangoAttrList *attrs; - gint cursor_pos; - gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos); - if (strlen(str) > 0) { - PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), str); - pango_layout_set_attributes(layout, attrs); - - gint w, h; - pango_layout_get_pixel_size(layout, &w, &h); - g_object_unref(layout); - - gint x, y; - gdk_window_get_origin(PWindow(wText), &x, &y); - - Point pt = PointMainCaret(); - if (pt.x < 0) - pt.x = 0; - if (pt.y < 0) - pt.y = 0; - - gtk_window_move(GTK_WINDOW(PWidget(wPreedit)), x + pt.x, y + pt.y); - gtk_window_resize(GTK_WINDOW(PWidget(wPreedit)), w, h); - gtk_widget_show(PWidget(wPreedit)); - gtk_widget_queue_draw_area(PWidget(wPreeditDraw), 0, 0, w, h); - } else { - gtk_widget_hide(PWidget(wPreedit)); + if (KoreanIME()) { + // Copy & paste by johnsonj. + // Great thanks to + // jiniya from http://www.jiniya.net/tt/494 for DBCS input with AddCharUTF(). + // BLUEnLIVE from http://zockr.tistory.com/1118 for UNDO and inOverstrike. + view.imeCaretBlockOverride = false; // If backspace. + + if (pdoc->TentativeActive()) { + pdoc->TentativeUndo(); + } else { + // No tentative undo means start of this composition so + // fill in any virtual spaces. + bool tmpOverstrike = inOverstrike; + inOverstrike = false; // Not allowed to be deleted twice. + AddCharUTF("", 0); + inOverstrike = tmpOverstrike; + } + + PreEditString utfval(im_context); + + if (strlen(utfval.str) > maxLenInputIME * 3) { + return; // Do not allow over 200 chars. + } + + char localeVal[maxLenInputIME * 2]; + char *hanval = (char *)""; + + if (IsUnicodeMode()) { + hanval = utfval.str; + } else { + const char *source = CharacterSetID(); + if (*source) { + Converter conv(source, "UTF-8", true); + if (conv) { + char *pin = utfval.str; + size_t inLeft = strlen(utfval.str); + char *pout = localeVal; + size_t outLeft = sizeof(localeVal); + size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft); + if (conversions != ((size_t)(-1))) { + *pout = '\0'; + hanval = localeVal; + } else { + fprintf(stderr, "Conversion failed '%s'\n", utfval.str); + } + } + } + } + + if (!pdoc->TentativeActive()) { + pdoc->TentativeStart(); + } + + bool tmpRecordingMacro = recordingMacro; + recordingMacro = false; + int hanlen = strlen(hanval); + AddCharUTF(hanval, hanlen); + recordingMacro = tmpRecordingMacro; + + // For block caret which means KoreanIME is in composition. + view.imeCaretBlockOverride = true; + for (size_t r = 0; r < sel.Count(); r++) { + int positionInsert = sel.Range(r).Start().Position(); + sel.Range(r).caret.SetPosition(positionInsert - hanlen); + sel.Range(r).anchor.SetPosition(positionInsert - hanlen); + } + } else { // Original code follows for other IMEs. + PreEditString pes(im_context); + if (strlen(pes.str) > 0) { + PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), pes.str); + pango_layout_set_attributes(layout, pes.attrs); + + gint w, h; + pango_layout_get_pixel_size(layout, &w, &h); + g_object_unref(layout); + + gint x, y; + gdk_window_get_origin(PWindow(wText), &x, &y); + + Point pt = PointMainCaret(); + if (pt.x < 0) + pt.x = 0; + if (pt.y < 0) + pt.y = 0; + + gtk_window_move(GTK_WINDOW(PWidget(wPreedit)), x + pt.x, y + pt.y); + gtk_window_resize(GTK_WINDOW(PWidget(wPreedit)), w, h); + gtk_widget_show(PWidget(wPreedit)); + gtk_widget_queue_draw_area(PWidget(wPreeditDraw), 0, 0, w, h); + } else { + gtk_widget_hide(PWidget(wPreedit)); + } } - g_free(str); - pango_attr_list_unref(attrs); } catch (...) { errorStatus = SC_STATUS_FAILURE; } @@ -2711,8 +2843,8 @@ void ScintillaGTK::DragDataGet(GtkWidget *widget, GdkDragContext *context, } } -int ScintillaGTK::TimeOut(ScintillaGTK *sciThis) { - sciThis->Tick(); +int ScintillaGTK::TimeOut(TimeThunk *tt) { + tt->scintilla->TickFor(tt->reason); return 1; } diff --git a/scintilla/include/SciLexer.h b/scintilla/include/SciLexer.h index 54cc8ba7ef..b45ed9474a 100644 --- a/scintilla/include/SciLexer.h +++ b/scintilla/include/SciLexer.h @@ -127,6 +127,7 @@ #define SCLEX_DMAP 112 #define SCLEX_AS 113 #define SCLEX_DMIS 114 +#define SCLEX_REGISTRY 115 #define SCLEX_AUTOMATIC 1000 #define SCE_P_DEFAULT 0 #define SCE_P_COMMENTLINE 1 @@ -906,6 +907,7 @@ #define SCE_KIX_KEYWORD 7 #define SCE_KIX_FUNCTIONS 8 #define SCE_KIX_OPERATOR 9 +#define SCE_KIX_COMMENTSTREAM 10 #define SCE_KIX_IDENTIFIER 31 #define SCE_GC_DEFAULT 0 #define SCE_GC_COMMENTLINE 1 @@ -1692,6 +1694,9 @@ #define SCE_RUST_LIFETIME 18 #define SCE_RUST_MACRO 19 #define SCE_RUST_LEXERROR 20 +#define SCE_RUST_BYTESTRING 21 +#define SCE_RUST_BYTESTRINGR 22 +#define SCE_RUST_BYTECHARACTER 23 #define SCE_DMAP_DEFAULT 0 #define SCE_DMAP_COMMENT 1 #define SCE_DMAP_NUMBER 2 @@ -1713,6 +1718,19 @@ #define SCE_DMIS_UNSUPPORTED_MAJOR 7 #define SCE_DMIS_UNSUPPORTED_MINOR 8 #define SCE_DMIS_LABEL 9 +#define SCE_REG_DEFAULT 0 +#define SCE_REG_COMMENT 1 +#define SCE_REG_VALUENAME 2 +#define SCE_REG_STRING 3 +#define SCE_REG_HEXDIGIT 4 +#define SCE_REG_VALUETYPE 5 +#define SCE_REG_ADDEDKEY 6 +#define SCE_REG_DELETEDKEY 7 +#define SCE_REG_ESCAPED 8 +#define SCE_REG_KEYPATH_GUID 9 +#define SCE_REG_STRING_GUID 10 +#define SCE_REG_PARAMETER 11 +#define SCE_REG_OPERATOR 12 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ #endif diff --git a/scintilla/include/Scintilla.h b/scintilla/include/Scintilla.h index 93992e28f2..949d422674 100644 --- a/scintilla/include/Scintilla.h +++ b/scintilla/include/Scintilla.h @@ -18,9 +18,9 @@ extern "C" { #if defined(_WIN32) /* Return false on failure: */ int Scintilla_RegisterClasses(void *hInstance); -int Scintilla_ReleaseResources(); +int Scintilla_ReleaseResources(void); #endif -int Scintilla_LinkLexers(); +int Scintilla_LinkLexers(void); #ifdef __cplusplus } @@ -92,6 +92,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETBUFFEREDDRAW 2035 #define SCI_SETTABWIDTH 2036 #define SCI_GETTABWIDTH 2121 +#define SCI_CLEARTABSTOPS 2675 +#define SCI_ADDTABSTOP 2676 +#define SCI_GETNEXTTABSTOP 2677 #define SC_CP_UTF8 65001 #define SCI_SETCODEPAGE 2037 #define MARKER_MAX 31 @@ -517,6 +520,11 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_APPENDTEXT 2282 #define SCI_GETTWOPHASEDRAW 2283 #define SCI_SETTWOPHASEDRAW 2284 +#define SC_PHASES_ONE 0 +#define SC_PHASES_TWO 1 +#define SC_PHASES_MULTIPLE 2 +#define SCI_GETPHASESDRAW 2673 +#define SCI_SETPHASESDRAW 2674 #define SC_EFF_QUALITY_MASK 0xF #define SC_EFF_QUALITY_DEFAULT 0 #define SC_EFF_QUALITY_NON_ANTIALIASED 1 @@ -952,7 +960,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SC_MOD_CONTAINER 0x40000 #define SC_MOD_LEXERSTATE 0x80000 #define SC_MOD_INSERTCHECK 0x100000 -#define SC_MODEVENTMASKALL 0x1FFFFF +#define SC_MOD_CHANGETABSTOPS 0x200000 +#define SC_MODEVENTMASKALL 0x3FFFFF #define SC_UPDATE_CONTENT 0x1 #define SC_UPDATE_SELECTION 0x2 #define SC_UPDATE_V_SCROLL 0x4 diff --git a/scintilla/include/Scintilla.iface b/scintilla/include/Scintilla.iface index 3e5f51b9cf..ec047f2d49 100644 --- a/scintilla/include/Scintilla.iface +++ b/scintilla/include/Scintilla.iface @@ -226,6 +226,15 @@ set void SetTabWidth=2036(int tabWidth,) # Retrieve the visible size of a tab. get int GetTabWidth=2121(,) +# Clear explicit tabstops on a line. +fun void ClearTabStops=2675(int line,) + +# Add an explicit tab stop for a line. +fun void AddTabStop=2676(int line, int x) + +# Find the next explicit tab stop position on a line after a position. +fun int GetNextTabStop=2677(int line, int x) + # The SC_CP_UTF8 value can be used to enter Unicode mode. # This is the same value as CP_UTF8 in Windows val SC_CP_UTF8=65001 @@ -1291,13 +1300,27 @@ get bool GetVScrollBar=2281(,) # Append a string to the end of the document without changing the selection. fun void AppendText=2282(int length, string text) -# Is drawing done in two phases with backgrounds drawn before faoregrounds? +# Is drawing done in two phases with backgrounds drawn before foregrounds? get bool GetTwoPhaseDraw=2283(,) # In twoPhaseDraw mode, drawing is performed in two phases, first the background # and then the foreground. This avoids chopping off characters that overlap the next run. set void SetTwoPhaseDraw=2284(bool twoPhase,) +enu FontQuality=SC_PHASES_ +val SC_PHASES_ONE=0 +val SC_PHASES_TWO=1 +val SC_PHASES_MULTIPLE=2 + +# How many phases is drawing done in? +get int GetPhasesDraw=2673(,) + +# In one phase draw, text is drawn in a series of rectangular blocks with no overlap. +# In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. +# In multiple phase draw, each element is drawn over the whole drawing area, allowing text +# to overlap from one line to the next. +set void SetPhasesDraw=2674(int phases,) + # Control font anti-aliasing. enu FontQuality=SC_EFF_ @@ -2509,7 +2532,8 @@ val SC_MOD_CHANGEANNOTATION=0x20000 val SC_MOD_CONTAINER=0x40000 val SC_MOD_LEXERSTATE=0x80000 val SC_MOD_INSERTCHECK=0x100000 -val SC_MODEVENTMASKALL=0x1FFFFF +val SC_MOD_CHANGETABSTOPS=0x200000 +val SC_MODEVENTMASKALL=0x3FFFFF enu Update=SC_UPDATE_ val SC_UPDATE_CONTENT=0x1 @@ -2675,6 +2699,7 @@ val SCLEX_RUST=111 val SCLEX_DMAP=112 val SCLEX_AS=113 val SCLEX_DMIS=114 +val SCLEX_REGISTRY=115 # When a lexer specifies its language as SCLEX_AUTOMATIC it receives a # value assigned in sequence from SCLEX_AUTOMATIC+1. @@ -3567,6 +3592,7 @@ val SCE_KIX_MACRO=6 val SCE_KIX_KEYWORD=7 val SCE_KIX_FUNCTIONS=8 val SCE_KIX_OPERATOR=9 +val SCE_KIX_COMMENTSTREAM=10 val SCE_KIX_IDENTIFIER=31 # Lexical states for SCLEX_GUI4CLI lex Gui4Cli=SCLEX_GUI4CLI SCE_GC_ @@ -4443,6 +4469,9 @@ val SCE_RUST_IDENTIFIER=17 val SCE_RUST_LIFETIME=18 val SCE_RUST_MACRO=19 val SCE_RUST_LEXERROR=20 +val SCE_RUST_BYTESTRING=21 +val SCE_RUST_BYTESTRINGR=22 +val SCE_RUST_BYTECHARACTER=23 # Lexical states for SCLEX_DMAP lex DMAP=SCLEX_DMAP SCE_DMAP_ val SCE_DMAP_DEFAULT=0 @@ -4468,6 +4497,21 @@ val SCE_DMIS_MINORWORD=6 val SCE_DMIS_UNSUPPORTED_MAJOR=7 val SCE_DMIS_UNSUPPORTED_MINOR=8 val SCE_DMIS_LABEL=9 +# Lexical states for SCLEX_REGISTRY +lex REG=SCLEX_REGISTRY SCE_REG_ +val SCE_REG_DEFAULT=0 +val SCE_REG_COMMENT=1 +val SCE_REG_VALUENAME=2 +val SCE_REG_STRING=3 +val SCE_REG_HEXDIGIT=4 +val SCE_REG_VALUETYPE=5 +val SCE_REG_ADDEDKEY=6 +val SCE_REG_DELETEDKEY=7 +val SCE_REG_ESCAPED=8 +val SCE_REG_KEYPATH_GUID=9 +val SCE_REG_STRING_GUID=10 +val SCE_REG_PARAMETER=11 +val SCE_REG_OPERATOR=12 # Events diff --git a/scintilla/lexers/LexHTML.cxx b/scintilla/lexers/LexHTML.cxx index d6b0b31bcb..02047930ce 100644 --- a/scintilla/lexers/LexHTML.cxx +++ b/scintilla/lexers/LexHTML.cxx @@ -822,19 +822,27 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty // handle start of Mako comment line if (isMako && ch == '#' && chNext == '#') { makoComment = 1; + state = SCE_HP_COMMENTLINE; } // handle end of Mako comment line else if (isMako && makoComment && (ch == '\r' || ch == '\n')) { makoComment = 0; - styler.ColourTo(i, SCE_HP_COMMENTLINE); - state = SCE_HP_DEFAULT; + styler.ColourTo(i, StateToPrint); + if (scriptLanguage == eScriptPython) { + state = SCE_HP_DEFAULT; + } else { + state = SCE_H_DEFAULT; + } } // Allow falling through to mako handling code if newline is going to end a block if (((ch == '\r' && chNext != '\n') || (ch == '\n')) && (!isMako || (0 != strcmp(makoBlockType, "%")))) { } + // Ignore everything in mako comment until the line ends + else if (isMako && makoComment) { + } // generic end of script processing else if ((inScriptType == eNonHtmlScript) && (ch == '<') && (chNext == '/')) { diff --git a/scintilla/lexers/LexMatlab.cxx b/scintilla/lexers/LexMatlab.cxx index a8ac03cc7f..4dfd512c83 100644 --- a/scintilla/lexers/LexMatlab.cxx +++ b/scintilla/lexers/LexMatlab.cxx @@ -12,6 +12,9 @@ ** - added ... displayed as a comment ** - removed unused IsAWord functions ** - added some comments + ** + ** Changes by John Donoghue 2014/08/01 + ** - fix allowed transpose ' after {} operator **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. @@ -218,7 +221,7 @@ static void ColouriseMatlabOctaveDoc( } else if (isalpha(sc.ch)) { sc.SetState(SCE_MATLAB_KEYWORD); } else if (isoperator(static_cast(sc.ch)) || sc.ch == '@' || sc.ch == '\\') { - if (sc.ch == ')' || sc.ch == ']') { + if (sc.ch == ')' || sc.ch == ']' || sc.ch == '}') { transpose = true; } else { transpose = false; diff --git a/scintilla/lexers/LexRuby.cxx b/scintilla/lexers/LexRuby.cxx index f818d3d473..d4c3fad25d 100644 --- a/scintilla/lexers/LexRuby.cxx +++ b/scintilla/lexers/LexRuby.cxx @@ -882,6 +882,31 @@ static void ColouriseRbDoc(unsigned int startPos, int length, int initStyle, preferRE = false; } else if (isSafeWordcharOrHigh(chNext)) { state = SCE_RB_SYMBOL; + } else if ((chNext == '@' || chNext == '$') && + isSafeWordcharOrHigh(chNext2)) { + // instance and global variable followed by an identifier + advance_char(i, ch, chNext, chNext2); + state = SCE_RB_SYMBOL; + } else if (((chNext == '@' && chNext2 == '@') || + (chNext == '$' && chNext2 == '-')) && + isSafeWordcharOrHigh(styler.SafeGetCharAt(i+3))) { + // class variables and special global variable "$-IDENTCHAR" + state = SCE_RB_SYMBOL; + // $-IDENTCHAR doesn't continue past the IDENTCHAR + if (chNext == '$') { + styler.ColourTo(i+3, SCE_RB_SYMBOL); + state = SCE_RB_DEFAULT; + } + i += 3; + ch = styler.SafeGetCharAt(i); + chNext = styler.SafeGetCharAt(i+1); + } else if (chNext == '$' && strchr("_~*$?!@/\\;,.=:<>\"&`'+", chNext2)) { + // single-character special global variables + i += 2; + ch = chNext2; + chNext = styler.SafeGetCharAt(i+1); + styler.ColourTo(i, SCE_RB_SYMBOL); + state = SCE_RB_DEFAULT; } else if (strchr("[*!~+-*/%=<>&^|", chNext)) { // Do the operator analysis in-line, looking ahead // Based on the table in pickaxe 2nd ed., page 339 @@ -1260,7 +1285,16 @@ static void ColouriseRbDoc(unsigned int startPos, int length, int initStyle, } else if (state == SCE_RB_CLASS_VAR || state == SCE_RB_INSTANCE_VAR || state == SCE_RB_SYMBOL) { - if (!isSafeWordcharOrHigh(ch)) { + if (state == SCE_RB_SYMBOL && + // FIDs suffices '?' and '!' + (((ch == '!' || ch == '?') && chNext != '=') || + // identifier suffix '=' + (ch == '=' && (chNext != '~' && chNext != '>' && + (chNext != '=' || chNext2 == '>'))))) { + styler.ColourTo(i, state); + state = SCE_RB_DEFAULT; + preferRE = false; + } else if (!isSafeWordcharOrHigh(ch)) { styler.ColourTo(i - 1, state); redo_char(i, ch, chNext, chNext2, state); // pass by ref preferRE = false; diff --git a/scintilla/lexers/LexRust.cxx b/scintilla/lexers/LexRust.cxx index 8a30205327..3b1201c7f3 100644 --- a/scintilla/lexers/LexRust.cxx +++ b/scintilla/lexers/LexRust.cxx @@ -230,7 +230,9 @@ static void ScanIdentifier(Accessor& styler, int& pos, WordList *keywords) { } } -static void ScanDigits(Accessor& styler, int& pos, int base) { +/* Scans a sequence of digits, returning true if it found any. */ +static bool ScanDigits(Accessor& styler, int& pos, int base) { + int old_pos = pos; for (;;) { int c = styler.SafeGetCharAt(pos, '\0'); if (IsADigit(c, base) || c == '_') @@ -238,13 +240,17 @@ static void ScanDigits(Accessor& styler, int& pos, int base) { else break; } + return old_pos != pos; } +/* Scans an integer and floating point literals. */ static void ScanNumber(Accessor& styler, int& pos) { int base = 10; int c = styler.SafeGetCharAt(pos, '\0'); int n = styler.SafeGetCharAt(pos + 1, '\0'); bool error = false; + /* Scan the prefix, thus determining the base. + * 10 is default if there's no prefix. */ if (c == '0' && n == 'x') { pos += 2; base = 16; @@ -255,8 +261,11 @@ static void ScanNumber(Accessor& styler, int& pos) { pos += 2; base = 8; } - int old_pos = pos; - ScanDigits(styler, pos, base); + + /* Scan initial digits. The literal is malformed if there are none. */ + error |= !ScanDigits(styler, pos, base); + /* See if there's an integer suffix. We mimic the Rust's lexer + * and munch it even if there was an error above. */ c = styler.SafeGetCharAt(pos, '\0'); if (c == 'u' || c == 'i') { pos++; @@ -271,14 +280,22 @@ static void ScanNumber(Accessor& styler, int& pos) { } else if (c == '6' && n == '4') { pos += 2; } - } else { + /* See if it's a floating point literal. These literals have to be base 10. + */ + } else if (!error) { + /* If there's a period, it's a floating point literal unless it's + * followed by an identifier (meaning this is a method call, e.g. + * `1.foo()`) or another period, in which case it's a range (e.g. 1..2) + */ n = styler.SafeGetCharAt(pos + 1, '\0'); if (c == '.' && !(IsIdentifierStart(n) || n == '.')) { error |= base != 10; pos++; + /* It's ok to have no digits after the period. */ ScanDigits(styler, pos, 10); } + /* Look for the exponentiation. */ c = styler.SafeGetCharAt(pos, '\0'); if (c == 'e' || c == 'E') { error |= base != 10; @@ -286,13 +303,11 @@ static void ScanNumber(Accessor& styler, int& pos) { c = styler.SafeGetCharAt(pos, '\0'); if (c == '-' || c == '+') pos++; - int old_pos = pos; - ScanDigits(styler, pos, 10); - if (old_pos == pos) { - error = true; - } + /* It is invalid to have no digits in the exponent. */ + error |= !ScanDigits(styler, pos, 10); } + /* Scan the floating point suffix. */ c = styler.SafeGetCharAt(pos, '\0'); if (c == 'f') { error |= base != 10; @@ -308,9 +323,7 @@ static void ScanNumber(Accessor& styler, int& pos) { } } } - if (old_pos == pos) { - error = true; - } + if (error) styler.ColourTo(pos - 1, SCE_RUST_LEXERROR); else @@ -351,7 +364,7 @@ static bool IsValidCharacterEscape(int c) { } static bool IsValidStringEscape(int c) { - return IsValidCharacterEscape(c) || c == '\n'; + return IsValidCharacterEscape(c) || c == '\n' || c == '\r'; } static bool ScanNumericEscape(Accessor &styler, int& pos, int num_digits, bool stop_asap) { @@ -373,12 +386,12 @@ static bool ScanNumericEscape(Accessor &styler, int& pos, int num_digits, bool s /* This is overly permissive for character literals in order to accept UTF-8 encoded * character literals. */ -static void ScanCharacterLiteralOrLifetime(Accessor &styler, int& pos) { +static void ScanCharacterLiteralOrLifetime(Accessor &styler, int& pos, bool ascii_only) { pos++; int c = styler.SafeGetCharAt(pos, '\0'); int n = styler.SafeGetCharAt(pos + 1, '\0'); bool done = false; - bool valid_lifetime = IsIdentifierStart(c); + bool valid_lifetime = !ascii_only && IsIdentifierStart(c); bool valid_char = true; bool first = true; while (!done) { @@ -390,10 +403,10 @@ static void ScanCharacterLiteralOrLifetime(Accessor &styler, int& pos) { } else if (n == 'x') { pos += 2; valid_char = ScanNumericEscape(styler, pos, 2, false); - } else if (n == 'u') { + } else if (n == 'u' && !ascii_only) { pos += 2; valid_char = ScanNumericEscape(styler, pos, 4, false); - } else if (n == 'U') { + } else if (n == 'U' && !ascii_only) { pos += 2; valid_char = ScanNumericEscape(styler, pos, 8, false); } else { @@ -412,7 +425,10 @@ static void ScanCharacterLiteralOrLifetime(Accessor &styler, int& pos) { done = true; break; default: - if (!IsIdentifierContinue(c) && !first) { + if (ascii_only && !IsASCII((char)c)) { + done = true; + valid_char = false; + } else if (!IsIdentifierContinue(c) && !first) { done = true; } else { pos++; @@ -433,7 +449,7 @@ static void ScanCharacterLiteralOrLifetime(Accessor &styler, int& pos) { styler.ColourTo(pos - 1, SCE_RUST_LIFETIME); } else if (valid_char) { pos++; - styler.ColourTo(pos - 1, SCE_RUST_CHARACTER); + styler.ColourTo(pos - 1, ascii_only ? SCE_RUST_BYTECHARACTER : SCE_RUST_CHARACTER); } else { styler.ColourTo(pos - 1, SCE_RUST_LEXERROR); } @@ -542,7 +558,7 @@ static void ScanComments(Accessor &styler, int& pos, int max) { ResumeBlockComment(styler, pos, max, UnknownComment, 1); } -static void ResumeString(Accessor &styler, int& pos, int max) { +static void ResumeString(Accessor &styler, int& pos, int max, bool ascii_only) { int c = styler.SafeGetCharAt(pos, '\0'); bool error = false; while (c != '"' && !error) { @@ -559,10 +575,10 @@ static void ResumeString(Accessor &styler, int& pos, int max) { } else if (n == 'x') { pos += 2; error = !ScanNumericEscape(styler, pos, 2, true); - } else if (n == 'u') { + } else if (n == 'u' && !ascii_only) { pos += 2; error = !ScanNumericEscape(styler, pos, 4, true); - } else if (n == 'U') { + } else if (n == 'U' && !ascii_only) { pos += 2; error = !ScanNumericEscape(styler, pos, 8, true); } else { @@ -570,16 +586,19 @@ static void ResumeString(Accessor &styler, int& pos, int max) { error = true; } } else { - pos++; + if (ascii_only && !IsASCII((char)c)) + error = true; + else + pos++; } c = styler.SafeGetCharAt(pos, '\0'); } if (!error) pos++; - styler.ColourTo(pos - 1, SCE_RUST_STRING); + styler.ColourTo(pos - 1, ascii_only ? SCE_RUST_BYTESTRING : SCE_RUST_STRING); } -static void ResumeRawString(Accessor &styler, int& pos, int max, int num_hashes) { +static void ResumeRawString(Accessor &styler, int& pos, int max, int num_hashes, bool ascii_only) { for (;;) { if (pos == styler.LineEnd(styler.GetLine(pos))) styler.SetLineState(styler.GetLine(pos), num_hashes); @@ -594,19 +613,20 @@ static void ResumeRawString(Accessor &styler, int& pos, int max, int num_hashes) } if (trailing_num_hashes == num_hashes) { styler.SetLineState(styler.GetLine(pos), 0); - styler.ColourTo(pos - 1, SCE_RUST_STRINGR); break; } } else if (pos >= max) { - styler.ColourTo(pos - 1, SCE_RUST_STRINGR); break; - } else { + } else { + if (ascii_only && !IsASCII((char)c)) + break; pos++; } } + styler.ColourTo(pos - 1, ascii_only ? SCE_RUST_BYTESTRINGR : SCE_RUST_STRINGR); } -static void ScanRawString(Accessor &styler, int& pos, int max) { +static void ScanRawString(Accessor &styler, int& pos, int max, bool ascii_only) { pos++; int num_hashes = 0; while (styler.SafeGetCharAt(pos, '\0') == '#') { @@ -617,7 +637,7 @@ static void ScanRawString(Accessor &styler, int& pos, int max) { styler.ColourTo(pos - 1, SCE_RUST_LEXERROR); } else { pos++; - ResumeRawString(styler, pos, max, num_hashes); + ResumeRawString(styler, pos, max, num_hashes, ascii_only); } } @@ -635,9 +655,13 @@ void SCI_METHOD LexerRust::Lex(unsigned int startPos, int length, int initStyle, } else if (initStyle == SCE_RUST_COMMENTLINE || initStyle == SCE_RUST_COMMENTLINEDOC) { ResumeLineComment(styler, pos, max, initStyle == SCE_RUST_COMMENTLINEDOC ? DocComment : NotDocComment); } else if (initStyle == SCE_RUST_STRING) { - ResumeString(styler, pos, max); + ResumeString(styler, pos, max, false); + } else if (initStyle == SCE_RUST_BYTESTRING) { + ResumeString(styler, pos, max, true); } else if (initStyle == SCE_RUST_STRINGR) { - ResumeRawString(styler, pos, max, styler.GetLineState(styler.GetLine(pos) - 1)); + ResumeRawString(styler, pos, max, styler.GetLineState(styler.GetLine(pos) - 1), false); + } else if (initStyle == SCE_RUST_BYTESTRINGR) { + ResumeRawString(styler, pos, max, styler.GetLineState(styler.GetLine(pos) - 1), true); } while (pos < max) { @@ -645,7 +669,7 @@ void SCI_METHOD LexerRust::Lex(unsigned int startPos, int length, int initStyle, int n = styler.SafeGetCharAt(pos + 1, '\0'); int n2 = styler.SafeGetCharAt(pos + 2, '\0'); - if (pos == 0 && c == '#' && n == '!') { + if (pos == 0 && c == '#' && n == '!' && n2 != '[') { pos += 2; ResumeLineComment(styler, pos, max, NotDocComment); } else if (IsWhitespace(c)) { @@ -653,7 +677,16 @@ void SCI_METHOD LexerRust::Lex(unsigned int startPos, int length, int initStyle, } else if (c == '/' && (n == '/' || n == '*')) { ScanComments(styler, pos, max); } else if (c == 'r' && (n == '#' || n == '"')) { - ScanRawString(styler, pos, max); + ScanRawString(styler, pos, max, false); + } else if (c == 'b' && n == 'r' && (n2 == '#' || n2 == '"')) { + pos++; + ScanRawString(styler, pos, max, true); + } else if (c == 'b' && n == '"') { + pos += 2; + ResumeString(styler, pos, max, true); + } else if (c == 'b' && n == '\'') { + pos++; + ScanCharacterLiteralOrLifetime(styler, pos, true); } else if (IsIdentifierStart(c)) { ScanIdentifier(styler, pos, keywords); } else if (IsADigit(c)) { @@ -668,10 +701,10 @@ void SCI_METHOD LexerRust::Lex(unsigned int startPos, int length, int initStyle, pos++; styler.ColourTo(pos - 1, SCE_RUST_OPERATOR); } else if (c == '\'') { - ScanCharacterLiteralOrLifetime(styler, pos); + ScanCharacterLiteralOrLifetime(styler, pos, false); } else if (c == '"') { pos++; - ResumeString(styler, pos, max); + ResumeString(styler, pos, max, false); } else { pos++; styler.ColourTo(pos - 1, SCE_RUST_LEXERROR); diff --git a/scintilla/lexlib/LexerModule.h b/scintilla/lexlib/LexerModule.h index ee092e68fd..5993c0fe97 100644 --- a/scintilla/lexlib/LexerModule.h +++ b/scintilla/lexlib/LexerModule.h @@ -67,7 +67,12 @@ inline int Maximum(int a, int b) { // Shut up annoying Visual C++ warnings: #ifdef _MSC_VER -#pragma warning(disable: 4244 4309) +#pragma warning(disable: 4244 4309 4456 4457) +#endif + +// Turn off shadow warnings for lexers as may be maintained by others +#if defined(__GNUC__) +#pragma GCC diagnostic ignored "-Wshadow" #endif #ifdef SCI_NAMESPACE diff --git a/scintilla/makefile.win32 b/scintilla/makefile.win32 index 6daac9b63e..3d2bde993e 100644 --- a/scintilla/makefile.win32 +++ b/scintilla/makefile.win32 @@ -130,10 +130,13 @@ SRCOBJS=\ Decoration.o \ Document.o \ Editor.o \ + EditModel.o \ + EditView.o \ ExternalLexer.o \ Indicator.o \ KeyMap.o \ LineMarker.o \ + MarginView.o \ PerLine.o \ PositionCache.o \ RESearch.o \ diff --git a/scintilla/scintilla_changes.patch b/scintilla/scintilla_changes.patch index e57ea095c6..d68729810b 100644 --- a/scintilla/scintilla_changes.patch +++ b/scintilla/scintilla_changes.patch @@ -31,7 +31,7 @@ diff --git b/scintilla/src/Catalogue.cxx a/scintilla/src/Catalogue.cxx index 41d5d54..70ce3bc 100644 --- scintilla/src/Catalogue.cxx +++ scintilla/src/Catalogue.cxx -@@ -76,115 +76,48 @@ int Scintilla_LinkLexers() { +@@ -76,116 +76,48 @@ int Scintilla_LinkLexers() { //++Autogenerated -- run scripts/LexGen.py to regenerate //**\(\tLINK_LEXER(\*);\n\) @@ -123,6 +123,7 @@ index 41d5d54..70ce3bc 100644 LINK_LEXER(lmPython); LINK_LEXER(lmR); - LINK_LEXER(lmREBOL); +- LINK_LEXER(lmRegistry); LINK_LEXER(lmRuby); LINK_LEXER(lmRust); - LINK_LEXER(lmScriptol); diff --git a/scintilla/src/CellBuffer.cxx b/scintilla/src/CellBuffer.cxx index 0c56c9e927..710e32403a 100644 --- a/scintilla/src/CellBuffer.cxx +++ b/scintilla/src/CellBuffer.cxx @@ -144,6 +144,7 @@ UndoHistory::UndoHistory() { currentAction = 0; undoSequenceDepth = 0; savePoint = 0; + tentativePoint = -1; actions[currentAction].Create(startAction); } @@ -194,7 +195,7 @@ const char *UndoHistory::AppendAction(actionType at, int position, const char *d // Visual Studio 2013 Code Analysis wrongly believes actions can be NULL at its next reference __analysis_assume(actions); #endif - if (currentAction == savePoint) { + if ((currentAction == savePoint) || (currentAction == tentativePoint)) { currentAction++; } else if (!actions[currentAction].mayCoalesce) { // Not allowed to coalesce if this set @@ -282,6 +283,7 @@ void UndoHistory::DeleteUndoHistory() { currentAction = 0; actions[currentAction].Create(startAction); savePoint = 0; + tentativePoint = -1; } void UndoHistory::SetSavePoint() { @@ -292,6 +294,26 @@ bool UndoHistory::IsSavePoint() const { return savePoint == currentAction; } +void UndoHistory::TentativeStart() { + tentativePoint = currentAction; +} + +void UndoHistory::TentativeCommit() { + tentativePoint = -1; + // Truncate undo history + maxAction = currentAction; +} + +int UndoHistory::TentativeSteps() { + // Drop any trailing startAction + if (actions[currentAction].at == startAction && currentAction > 0) + currentAction--; + if (tentativePoint >= 0) + return currentAction - tentativePoint; + else + return -1; +} + bool UndoHistory::CanUndo() const { return (currentAction > 0) && (maxAction > 0); } @@ -505,6 +527,22 @@ bool CellBuffer::IsSavePoint() const { return uh.IsSavePoint(); } +void CellBuffer::TentativeStart() { + uh.TentativeStart(); +} + +void CellBuffer::TentativeCommit() { + uh.TentativeCommit(); +} + +int CellBuffer::TentativeSteps() { + return uh.TentativeSteps(); +} + +bool CellBuffer::TentativeActive() const { + return uh.TentativeActive(); +} + // Without undo void CellBuffer::InsertLine(int line, int position, bool lineStart) { diff --git a/scintilla/src/CellBuffer.h b/scintilla/src/CellBuffer.h index f07b459832..5e4fc7c8ca 100644 --- a/scintilla/src/CellBuffer.h +++ b/scintilla/src/CellBuffer.h @@ -95,6 +95,7 @@ class UndoHistory { int currentAction; int undoSequenceDepth; int savePoint; + int tentativePoint; void EnsureUndoRoom(); @@ -117,6 +118,12 @@ class UndoHistory { void SetSavePoint(); bool IsSavePoint() const; + // Tentative actions are used for input composition so that it can be undone cleanly + void TentativeStart(); + void TentativeCommit(); + bool TentativeActive() const { return tentativePoint >= 0; } + int TentativeSteps(); + /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. bool CanUndo() const; @@ -193,6 +200,11 @@ class CellBuffer { void SetSavePoint(); bool IsSavePoint() const; + void TentativeStart(); + void TentativeCommit(); + bool TentativeActive() const; + int TentativeSteps(); + bool SetUndoCollection(bool collectUndo); bool IsCollectingUndo() const; void BeginUndoAction(); diff --git a/scintilla/src/ContractionState.cxx b/scintilla/src/ContractionState.cxx index a5ecfe1130..7b76554209 100644 --- a/scintilla/src/ContractionState.cxx +++ b/scintilla/src/ContractionState.cxx @@ -150,8 +150,8 @@ bool ContractionState::GetVisible(int lineDoc) const { } } -bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible_) { - if (OneToOne() && visible_) { +bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool isVisible) { + if (OneToOne() && isVisible) { return false; } else { EnsureData(); @@ -159,9 +159,9 @@ bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible Check(); if ((lineDocStart <= lineDocEnd) && (lineDocStart >= 0) && (lineDocEnd < LinesInDoc())) { for (int line = lineDocStart; line <= lineDocEnd; line++) { - if (GetVisible(line) != visible_) { - int difference = visible_ ? heights->ValueAt(line) : -heights->ValueAt(line); - visible->SetValueAt(line, visible_ ? 1 : 0); + if (GetVisible(line) != isVisible) { + int difference = isVisible ? heights->ValueAt(line) : -heights->ValueAt(line); + visible->SetValueAt(line, isVisible ? 1 : 0); displayLines->InsertText(line, difference); delta += difference; } @@ -191,13 +191,13 @@ bool ContractionState::GetExpanded(int lineDoc) const { } } -bool ContractionState::SetExpanded(int lineDoc, bool expanded_) { - if (OneToOne() && expanded_) { +bool ContractionState::SetExpanded(int lineDoc, bool isExpanded) { + if (OneToOne() && isExpanded) { return false; } else { EnsureData(); - if (expanded_ != (expanded->ValueAt(lineDoc) == 1)) { - expanded->SetValueAt(lineDoc, expanded_ ? 1 : 0); + if (isExpanded != (expanded->ValueAt(lineDoc) == 1)) { + expanded->SetValueAt(lineDoc, isExpanded ? 1 : 0); Check(); return true; } else { diff --git a/scintilla/src/ContractionState.h b/scintilla/src/ContractionState.h index 1c9109c69e..96cbf07638 100644 --- a/scintilla/src/ContractionState.h +++ b/scintilla/src/ContractionState.h @@ -48,11 +48,11 @@ class ContractionState { void DeleteLines(int lineDoc, int lineCount); bool GetVisible(int lineDoc) const; - bool SetVisible(int lineDocStart, int lineDocEnd, bool visible); + bool SetVisible(int lineDocStart, int lineDocEnd, bool isVisible); bool HiddenLines() const; bool GetExpanded(int lineDoc) const; - bool SetExpanded(int lineDoc, bool expanded); + bool SetExpanded(int lineDoc, bool isExpanded); int ContractedNext(int lineDocStart) const; int GetHeight(int lineDoc) const; diff --git a/scintilla/src/Document.cxx b/scintilla/src/Document.cxx index 32d5f18960..4c1901679d 100644 --- a/scintilla/src/Document.cxx +++ b/scintilla/src/Document.cxx @@ -209,6 +209,65 @@ void Document::SetSavePoint() { NotifySavePoint(true); } +void Document::TentativeUndo() { + CheckReadOnly(); + if (enteredModification == 0) { + enteredModification++; + if (!cb.IsReadOnly()) { + bool startSavePoint = cb.IsSavePoint(); + bool multiLine = false; + int steps = cb.TentativeSteps(); + //Platform::DebugPrintf("Steps=%d\n", steps); + for (int step = 0; step < steps; step++) { + const int prevLinesTotal = LinesTotal(); + const Action &action = cb.GetUndoStep(); + if (action.at == removeAction) { + NotifyModified(DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action)); + } else if (action.at == containerAction) { + DocModification dm(SC_MOD_CONTAINER | SC_PERFORMED_UNDO); + dm.token = action.position; + NotifyModified(dm); + } else { + NotifyModified(DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action)); + } + cb.PerformUndoStep(); + if (action.at != containerAction) { + ModifiedAt(action.position); + } + + int modFlags = SC_PERFORMED_UNDO; + // With undo, an insertion action becomes a deletion notification + if (action.at == removeAction) { + modFlags |= SC_MOD_INSERTTEXT; + } else if (action.at == insertAction) { + modFlags |= SC_MOD_DELETETEXT; + } + if (steps > 1) + modFlags |= SC_MULTISTEPUNDOREDO; + const int linesAdded = LinesTotal() - prevLinesTotal; + if (linesAdded != 0) + multiLine = true; + if (step == steps - 1) { + modFlags |= SC_LASTSTEPINUNDOREDO; + if (multiLine) + modFlags |= SC_MULTILINEUNDOREDO; + } + NotifyModified(DocModification(modFlags, action.position, action.lenData, + linesAdded, action.data)); + } + + bool endSavePoint = cb.IsSavePoint(); + if (startSavePoint != endSavePoint) + NotifySavePoint(endSavePoint); + + cb.TentativeCommit(); + } + enteredModification--; + } +} + int Document::GetMark(int line) { return static_cast(perLineData[ldMarkers])->MarkValue(line); } diff --git a/scintilla/src/Document.h b/scintilla/src/Document.h index a59f192a96..e84be14e46 100644 --- a/scintilla/src/Document.h +++ b/scintilla/src/Document.h @@ -303,6 +303,12 @@ class Document : PerLine, public IDocumentWithLineEnd, public ILoader { void AddUndoAction(int token, bool mayCoalesce) { cb.AddUndoAction(token, mayCoalesce); } void SetSavePoint(); bool IsSavePoint() const { return cb.IsSavePoint(); } + + void TentativeStart() { cb.TentativeStart(); } + void TentativeCommit() { cb.TentativeCommit(); } + void TentativeUndo(); + bool TentativeActive() const { return cb.TentativeActive(); } + const char * SCI_METHOD BufferPointer() { return cb.BufferPointer(); } const char *RangePointer(int position, int rangeLength) { return cb.RangePointer(position, rangeLength); } int GapPosition() const { return cb.GapPosition(); } @@ -368,7 +374,7 @@ class Document : PerLine, public IDocumentWithLineEnd, public ILoader { void SetDefaultCharClasses(bool includeWordClass); void SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass); - int GetCharsOfClass(CharClassify::cc charClass, unsigned char *buffer); + int GetCharsOfClass(CharClassify::cc characterClass, unsigned char *buffer); void SCI_METHOD StartStyling(int position, char mask); bool SCI_METHOD SetStyleFor(int length, char style); bool SCI_METHOD SetStyles(int length, const char *styles); diff --git a/scintilla/src/EditModel.cxx b/scintilla/src/EditModel.cxx new file mode 100644 index 0000000000..815d227819 --- /dev/null +++ b/scintilla/src/EditModel.cxx @@ -0,0 +1,74 @@ +// Scintilla source code edit control +/** @file EditModel.cxx + ** Defines the editor state that must be visible to EditorView. + **/ +// Copyright 1998-2014 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "ILexer.h" +#include "Scintilla.h" + +#include "StringCopy.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "RunStyles.h" +#include "ContractionState.h" +#include "CellBuffer.h" +#include "KeyMap.h" +#include "Indicator.h" +#include "XPM.h" +#include "LineMarker.h" +#include "Style.h" +#include "ViewStyle.h" +#include "CharClassify.h" +#include "Decoration.h" +#include "CaseFolder.h" +#include "Document.h" +#include "UniConversion.h" +#include "Selection.h" +#include "PositionCache.h" +#include "EditModel.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +Caret::Caret() : + active(false), on(false), period(500) {} + +EditModel::EditModel() { + inOverstrike = false; + xOffset = 0; + trackLineWidth = false; + posDrag = SelectionPosition(invalidPosition); + braces[0] = invalidPosition; + braces[1] = invalidPosition; + bracesMatchStyle = STYLE_BRACEBAD; + highlightGuideColumn = 0; + primarySelection = true; + foldFlags = 0; + hotspot = Range(invalidPosition); + wrapWidth = LineLayout::wrapWidthInfinite; + pdoc = new Document(); + pdoc->AddRef(); +} + +EditModel::~EditModel() { + pdoc->Release(); + pdoc = 0; +} diff --git a/scintilla/src/EditModel.h b/scintilla/src/EditModel.h new file mode 100644 index 0000000000..f7ca7497ad --- /dev/null +++ b/scintilla/src/EditModel.h @@ -0,0 +1,67 @@ +// Scintilla source code edit control +/** @file EditModel.h + ** Defines the editor state that must be visible to EditorView. + **/ +// Copyright 1998-2014 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef EDITMODEL_H +#define EDITMODEL_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** +*/ +class Caret { +public: + bool active; + bool on; + int period; + + Caret(); +}; + +class EditModel { + // Private so EditModel objects can not be copied + EditModel(const EditModel &); + EditModel &operator=(const EditModel &); + +public: + bool inOverstrike; + int xOffset; ///< Horizontal scrolled amount in pixels + bool trackLineWidth; + + SpecialRepresentations reprs; + Caret caret; + SelectionPosition posDrag; + Position braces[2]; + int bracesMatchStyle; + int highlightGuideColumn; + Selection sel; + bool primarySelection; + + int foldFlags; + ContractionState cs; + // Hotspot support + Range hotspot; + + // Wrapping support + int wrapWidth; + + Document *pdoc; + + EditModel(); + virtual ~EditModel(); + virtual int TopLineOfMain() const = 0; + virtual Point GetVisibleOriginInMain() const = 0; + virtual int LinesOnScreen() const = 0; + virtual Range GetHotSpotRange() const = 0; +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/scintilla/src/EditView.cxx b/scintilla/src/EditView.cxx new file mode 100644 index 0000000000..c46a0fbcff --- /dev/null +++ b/scintilla/src/EditView.cxx @@ -0,0 +1,2072 @@ +// Scintilla source code edit control +/** @file Editor.cxx + ** Defines the appearance of the main text area of the editor window. + **/ +// Copyright 1998-2014 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "ILexer.h" +#include "Scintilla.h" + +#include "StringCopy.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "RunStyles.h" +#include "ContractionState.h" +#include "CellBuffer.h" +#include "PerLine.h" +#include "KeyMap.h" +#include "Indicator.h" +#include "XPM.h" +#include "LineMarker.h" +#include "Style.h" +#include "ViewStyle.h" +#include "CharClassify.h" +#include "Decoration.h" +#include "CaseFolder.h" +#include "Document.h" +#include "UniConversion.h" +#include "Selection.h" +#include "PositionCache.h" +#include "EditModel.h" +#include "MarginView.h" +#include "EditView.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static inline bool IsControlCharacter(int ch) { + // iscntrl returns true for lots of chars > 127 which are displayable + return ch >= 0 && ch < ' '; +} + +PrintParameters::PrintParameters() { + magnification = 0; + colourMode = SC_PRINT_NORMAL; + wrapState = eWrapWord; +} + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +bool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st) { + if (st.multipleStyles) { + for (size_t iStyle = 0; iStyle(styles[endSegment + 1]) == style)) + endSegment++; + FontAlias fontText = vs.styles[style + styleOffset].font; + width += static_cast(surface->WidthText(fontText, text + start, + static_cast(endSegment - start + 1))); + start = endSegment + 1; + } + return width; +} + +int WidestLineWidth(Surface *surface, const ViewStyle &vs, int styleOffset, const StyledText &st) { + int widthMax = 0; + size_t start = 0; + while (start < st.length) { + size_t lenLine = st.LineLength(start); + int widthSubLine; + if (st.multipleStyles) { + widthSubLine = WidthStyledText(surface, vs, styleOffset, st.text + start, st.styles + start, lenLine); + } else { + FontAlias fontText = vs.styles[styleOffset + st.style].font; + widthSubLine = static_cast(surface->WidthText(fontText, + st.text + start, static_cast(lenLine))); + } + if (widthSubLine > widthMax) + widthMax = widthSubLine; + start += lenLine + 1; + } + return widthMax; +} + +void DrawTextNoClipPhase(Surface *surface, PRectangle rc, const Style &style, XYPOSITION ybase, + const char *s, int len, DrawPhase phase) { + FontAlias fontText = style.font; + if (phase & drawBack) { + if (phase & drawText) { + // Drawing both + surface->DrawTextNoClip(rc, fontText, ybase, s, len, + style.fore, style.back); + } else { + surface->FillRectangle(rc, style.back); + } + } else if (phase & drawText) { + surface->DrawTextTransparent(rc, fontText, ybase, s, len, style.fore); + } +} + +void DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRectangle rcText, + const StyledText &st, size_t start, size_t length, DrawPhase phase) { + + if (st.multipleStyles) { + int x = static_cast(rcText.left); + size_t i = 0; + while (i < length) { + size_t end = i; + size_t style = st.styles[i + start]; + while (end < length - 1 && st.styles[start + end + 1] == style) + end++; + style += styleOffset; + FontAlias fontText = vs.styles[style].font; + const int width = static_cast(surface->WidthText(fontText, + st.text + start + i, static_cast(end - i + 1))); + PRectangle rcSegment = rcText; + rcSegment.left = static_cast(x); + rcSegment.right = static_cast(x + width + 1); + DrawTextNoClipPhase(surface, rcSegment, vs.styles[style], + rcText.top + vs.maxAscent, st.text + start + i, + static_cast(end - i + 1), phase); + x += width; + i = end + 1; + } + } else { + const size_t style = st.style + styleOffset; + DrawTextNoClipPhase(surface, rcText, vs.styles[style], + rcText.top + vs.maxAscent, st.text + start, + static_cast(length), phase); + } +} + +#ifdef SCI_NAMESPACE +} +#endif + +const XYPOSITION epsilon = 0.0001f; // A small nudge to avoid floating point precision issues + +EditView::EditView() { + ldTabstops = NULL; + hideSelection = false; + drawOverstrikeCaret = true; + bufferedDraw = true; + phasesDraw = phasesTwo; + lineWidthMaxSeen = 0; + additionalCaretsBlink = true; + additionalCaretsVisible = true; + imeCaretBlockOverride = false; + pixmapLine = 0; + pixmapIndentGuide = 0; + pixmapIndentGuideHighlight = 0; + llc.SetLevel(LineLayoutCache::llcCaret); + posCache.SetSize(0x400); +} + +EditView::~EditView() { + delete ldTabstops; + ldTabstops = NULL; +} + +bool EditView::SetTwoPhaseDraw(bool twoPhaseDraw) { + const PhasesDraw phasesDrawNew = twoPhaseDraw ? phasesTwo : phasesOne; + const bool redraw = phasesDraw != phasesDrawNew; + phasesDraw = phasesDrawNew; + return redraw; +} + +bool EditView::SetPhasesDraw(int phases) { + const PhasesDraw phasesDrawNew = static_cast(phases); + const bool redraw = phasesDraw != phasesDrawNew; + phasesDraw = phasesDrawNew; + return redraw; +} + +bool EditView::LinesOverlap() const { + return phasesDraw == phasesMultiple; +} + +void EditView::ClearAllTabstops() { + delete ldTabstops; + ldTabstops = 0; +} + +int EditView::NextTabstopPos(int line, int x, int tabWidth) const { + int next = GetNextTabstop(line, x); + if (next > 0) + return next; + return ((((x + 2) / tabWidth) + 1) * tabWidth); +} + +bool EditView::ClearTabstops(int line) { + LineTabstops *lt = static_cast(ldTabstops); + return lt && lt->ClearTabstops(line); +} + +bool EditView::AddTabstop(int line, int x) { + if (!ldTabstops) { + ldTabstops = new LineTabstops(); + } + LineTabstops *lt = static_cast(ldTabstops); + return lt && lt->AddTabstop(line, x); +} + +int EditView::GetNextTabstop(int line, int x) const { + LineTabstops *lt = static_cast(ldTabstops); + if (lt) { + return lt->GetNextTabstop(line, x); + } else { + return 0; + } +} + +void EditView::LinesAddedOrRemoved(int lineOfPos, int linesAdded) { + if (ldTabstops) { + if (linesAdded > 0) { + for (int line = lineOfPos; line < lineOfPos + linesAdded; line++) { + ldTabstops->InsertLine(line); + } + } else { + for (int line = (lineOfPos + -linesAdded) - 1; line >= lineOfPos; line--) { + ldTabstops->RemoveLine(line); + } + } + } +} + +void EditView::DropGraphics(bool freeObjects) { + if (freeObjects) { + delete pixmapLine; + pixmapLine = 0; + delete pixmapIndentGuide; + pixmapIndentGuide = 0; + delete pixmapIndentGuideHighlight; + pixmapIndentGuideHighlight = 0; + } else { + if (pixmapLine) + pixmapLine->Release(); + if (pixmapIndentGuide) + pixmapIndentGuide->Release(); + if (pixmapIndentGuideHighlight) + pixmapIndentGuideHighlight->Release(); + } +} + +void EditView::AllocateGraphics(const ViewStyle &vsDraw) { + if (!pixmapLine) + pixmapLine = Surface::Allocate(vsDraw.technology); + if (!pixmapIndentGuide) + pixmapIndentGuide = Surface::Allocate(vsDraw.technology); + if (!pixmapIndentGuideHighlight) + pixmapIndentGuideHighlight = Surface::Allocate(vsDraw.technology); +} + +const char *ControlCharacterString(unsigned char ch) { + const char *reps[] = { + "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", + "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", + "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", + "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" + }; + if (ch < ELEMENTS(reps)) { + return reps[ch]; + } else { + return "BAD"; + } +} + +void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid) { + int ydiff = static_cast(rcTab.bottom - rcTab.top) / 2; + int xhead = static_cast(rcTab.right) - 1 - ydiff; + if (xhead <= rcTab.left) { + ydiff -= static_cast(rcTab.left) - xhead - 1; + xhead = static_cast(rcTab.left) - 1; + } + if ((rcTab.left + 2) < (rcTab.right - 1)) + surface->MoveTo(static_cast(rcTab.left) + 2, ymid); + else + surface->MoveTo(static_cast(rcTab.right) - 1, ymid); + surface->LineTo(static_cast(rcTab.right) - 1, ymid); + surface->LineTo(xhead, ymid - ydiff); + surface->MoveTo(static_cast(rcTab.right) - 1, ymid); + surface->LineTo(xhead, ymid + ydiff); +} + +void EditView::RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw) { + if (!pixmapIndentGuide->Initialised()) { + // 1 extra pixel in height so can handle odd/even positions and so produce a continuous line + pixmapIndentGuide->InitPixMap(1, vsDraw.lineHeight + 1, surfaceWindow, wid); + pixmapIndentGuideHighlight->InitPixMap(1, vsDraw.lineHeight + 1, surfaceWindow, wid); + PRectangle rcIG = PRectangle::FromInts(0, 0, 1, vsDraw.lineHeight); + pixmapIndentGuide->FillRectangle(rcIG, vsDraw.styles[STYLE_INDENTGUIDE].back); + pixmapIndentGuide->PenColour(vsDraw.styles[STYLE_INDENTGUIDE].fore); + pixmapIndentGuideHighlight->FillRectangle(rcIG, vsDraw.styles[STYLE_BRACELIGHT].back); + pixmapIndentGuideHighlight->PenColour(vsDraw.styles[STYLE_BRACELIGHT].fore); + for (int stripe = 1; stripe < vsDraw.lineHeight + 1; stripe += 2) { + PRectangle rcPixel = PRectangle::FromInts(0, stripe, 1, stripe + 1); + pixmapIndentGuide->FillRectangle(rcPixel, vsDraw.styles[STYLE_INDENTGUIDE].fore); + pixmapIndentGuideHighlight->FillRectangle(rcPixel, vsDraw.styles[STYLE_BRACELIGHT].fore); + } + } +} + +LineLayout *EditView::RetrieveLineLayout(int lineNumber, const EditModel &model) { + int posLineStart = model.pdoc->LineStart(lineNumber); + int posLineEnd = model.pdoc->LineStart(lineNumber + 1); + PLATFORM_ASSERT(posLineEnd >= posLineStart); + int lineCaret = model.pdoc->LineFromPosition(model.sel.MainCaret()); + return llc.Retrieve(lineNumber, lineCaret, + posLineEnd - posLineStart, model.pdoc->GetStyleClock(), + model.LinesOnScreen() + 1, model.pdoc->LinesTotal()); +} + +/** +* Fill in the LineLayout data for the given line. +* Copy the given @a line and its styles from the document into local arrays. +* Also determine the x position at which each character starts. +*/ +void EditView::LayoutLine(const EditModel &model, int line, Surface *surface, const ViewStyle &vstyle, LineLayout *ll, int width) { + if (!ll) + return; + + PLATFORM_ASSERT(line < model.pdoc->LinesTotal()); + PLATFORM_ASSERT(ll->chars != NULL); + int posLineStart = model.pdoc->LineStart(line); + int posLineEnd = model.pdoc->LineStart(line + 1); + // If the line is very long, limit the treatment to a length that should fit in the viewport + if (posLineEnd >(posLineStart + ll->maxLineLength)) { + posLineEnd = posLineStart + ll->maxLineLength; + } + if (ll->validity == LineLayout::llCheckTextAndStyle) { + int lineLength = posLineEnd - posLineStart; + if (!vstyle.viewEOL) { + lineLength = model.pdoc->LineEnd(line) - posLineStart; + } + if (lineLength == ll->numCharsInLine) { + // See if chars, styles, indicators, are all the same + bool allSame = true; + // Check base line layout + char styleByte = 0; + int numCharsInLine = 0; + while (numCharsInLine < lineLength) { + int charInDoc = numCharsInLine + posLineStart; + char chDoc = model.pdoc->CharAt(charInDoc); + styleByte = model.pdoc->StyleAt(charInDoc); + allSame = allSame && + (ll->styles[numCharsInLine] == static_cast(styleByte)); + if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseMixed) + allSame = allSame && + (ll->chars[numCharsInLine] == chDoc); + else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) + allSame = allSame && + (ll->chars[numCharsInLine] == static_cast(tolower(chDoc))); + else // Style::caseUpper + allSame = allSame && + (ll->chars[numCharsInLine] == static_cast(toupper(chDoc))); + numCharsInLine++; + } + allSame = allSame && (ll->styles[numCharsInLine] == styleByte); // For eolFilled + if (allSame) { + ll->validity = LineLayout::llPositions; + } else { + ll->validity = LineLayout::llInvalid; + } + } else { + ll->validity = LineLayout::llInvalid; + } + } + if (ll->validity == LineLayout::llInvalid) { + ll->widthLine = LineLayout::wrapWidthInfinite; + ll->lines = 1; + if (vstyle.edgeState == EDGE_BACKGROUND) { + ll->edgeColumn = model.pdoc->FindColumn(line, vstyle.theEdge); + if (ll->edgeColumn >= posLineStart) { + ll->edgeColumn -= posLineStart; + } + } else { + ll->edgeColumn = -1; + } + + // Fill base line layout + const int lineLength = posLineEnd - posLineStart; + model.pdoc->GetCharRange(ll->chars, posLineStart, lineLength); + model.pdoc->GetStyleRange(ll->styles, posLineStart, lineLength); + int numCharsBeforeEOL = model.pdoc->LineEnd(line) - posLineStart; + const int numCharsInLine = (vstyle.viewEOL) ? lineLength : numCharsBeforeEOL; + for (int styleInLine = 0; styleInLine < numCharsInLine; styleInLine++) { + const unsigned char styleByte = ll->styles[styleInLine]; + ll->styles[styleInLine] = styleByte; + } + const unsigned char styleByteLast = (lineLength > 0) ? ll->styles[lineLength - 1] : 0; + if (vstyle.someStylesForceCase) { + for (int charInLine = 0; charInLinechars[charInLine]; + if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseUpper) + ll->chars[charInLine] = static_cast(toupper(chDoc)); + else if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseLower) + ll->chars[charInLine] = static_cast(tolower(chDoc)); + } + } + ll->xHighlightGuide = 0; + // Extra element at the end of the line to hold end x position and act as + ll->chars[numCharsInLine] = 0; // Also triggers processing in the loops as this is a control character + ll->styles[numCharsInLine] = styleByteLast; // For eolFilled + + // Layout the line, determining the position of each character, + // with an extra element at the end for the end of the line. + ll->positions[0] = 0; + bool lastSegItalics = false; + + BreakFinder bfLayout(ll, NULL, Range(0, numCharsInLine), posLineStart, 0, false, model.pdoc, &model.reprs); + while (bfLayout.More()) { + + const TextSegment ts = bfLayout.Next(); + + std::fill(&ll->positions[ts.start + 1], &ll->positions[ts.end() + 1], 0.0f); + if (vstyle.styles[ll->styles[ts.start]].visible) { + if (ts.representation) { + XYPOSITION representationWidth = vstyle.controlCharWidth; + if (ll->chars[ts.start] == '\t') { + // Tab is a special case of representation, taking a variable amount of space + const int x = static_cast(ll->positions[ts.start]); + const int tabWidth = static_cast(vstyle.tabWidth); + representationWidth = static_cast(NextTabstopPos(line, x, tabWidth) - ll->positions[ts.start]); + } else { + if (representationWidth <= 0.0) { + XYPOSITION positionsRepr[256]; // Should expand when needed + posCache.MeasureWidths(surface, vstyle, STYLE_CONTROLCHAR, ts.representation->stringRep.c_str(), + static_cast(ts.representation->stringRep.length()), positionsRepr, model.pdoc); + representationWidth = positionsRepr[ts.representation->stringRep.length() - 1] + vstyle.ctrlCharPadding; + } + } + for (int ii = 0; ii < ts.length; ii++) + ll->positions[ts.start + 1 + ii] = representationWidth; + } else { + if ((ts.length == 1) && (' ' == ll->chars[ts.start])) { + // Over half the segments are single characters and of these about half are space characters. + ll->positions[ts.start + 1] = vstyle.styles[ll->styles[ts.start]].spaceWidth; + } else { + posCache.MeasureWidths(surface, vstyle, ll->styles[ts.start], ll->chars + ts.start, + ts.length, ll->positions + ts.start + 1, model.pdoc); + } + } + lastSegItalics = (!ts.representation) && ((ll->chars[ts.end() - 1] != ' ') && vstyle.styles[ll->styles[ts.start]].italic); + } + + for (int posToIncrease = ts.start + 1; posToIncrease <= ts.end(); posToIncrease++) { + ll->positions[posToIncrease] += ll->positions[ts.start]; + } + } + + // Small hack to make lines that end with italics not cut off the edge of the last character + if (lastSegItalics) { + ll->positions[numCharsInLine] += vstyle.lastSegItalicsOffset; + } + ll->numCharsInLine = numCharsInLine; + ll->numCharsBeforeEOL = numCharsBeforeEOL; + ll->validity = LineLayout::llPositions; + } + // Hard to cope when too narrow, so just assume there is space + if (width < 20) { + width = 20; + } + if ((ll->validity == LineLayout::llPositions) || (ll->widthLine != width)) { + ll->widthLine = width; + if (width == LineLayout::wrapWidthInfinite) { + ll->lines = 1; + } else if (width > ll->positions[ll->numCharsInLine]) { + // Simple common case where line does not need wrapping. + ll->lines = 1; + } else { + if (vstyle.wrapVisualFlags & SC_WRAPVISUALFLAG_END) { + width -= static_cast(vstyle.aveCharWidth); // take into account the space for end wrap mark + } + XYPOSITION wrapAddIndent = 0; // This will be added to initial indent of line + if (vstyle.wrapIndentMode == SC_WRAPINDENT_INDENT) { + wrapAddIndent = model.pdoc->IndentSize() * vstyle.spaceWidth; + } else if (vstyle.wrapIndentMode == SC_WRAPINDENT_FIXED) { + wrapAddIndent = vstyle.wrapVisualStartIndent * vstyle.aveCharWidth; + } + ll->wrapIndent = wrapAddIndent; + if (vstyle.wrapIndentMode != SC_WRAPINDENT_FIXED) + for (int i = 0; i < ll->numCharsInLine; i++) { + if (!IsSpaceOrTab(ll->chars[i])) { + ll->wrapIndent += ll->positions[i]; // Add line indent + break; + } + } + // Check for text width minimum + if (ll->wrapIndent > width - static_cast(vstyle.aveCharWidth) * 15) + ll->wrapIndent = wrapAddIndent; + // Check for wrapIndent minimum + if ((vstyle.wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (ll->wrapIndent < vstyle.aveCharWidth)) + ll->wrapIndent = vstyle.aveCharWidth; // Indent to show start visual + ll->lines = 0; + // Calculate line start positions based upon width. + int lastGoodBreak = 0; + int lastLineStart = 0; + XYACCUMULATOR startOffset = 0; + int p = 0; + while (p < ll->numCharsInLine) { + if ((ll->positions[p + 1] - startOffset) >= width) { + if (lastGoodBreak == lastLineStart) { + // Try moving to start of last character + if (p > 0) { + lastGoodBreak = model.pdoc->MovePositionOutsideChar(p + posLineStart, -1) + - posLineStart; + } + if (lastGoodBreak == lastLineStart) { + // Ensure at least one character on line. + lastGoodBreak = model.pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart + 1, 1) + - posLineStart; + } + } + lastLineStart = lastGoodBreak; + ll->lines++; + ll->SetLineStart(ll->lines, lastGoodBreak); + startOffset = ll->positions[lastGoodBreak]; + // take into account the space for start wrap mark and indent + startOffset -= ll->wrapIndent; + p = lastGoodBreak + 1; + continue; + } + if (p > 0) { + if (vstyle.wrapState == eWrapChar) { + lastGoodBreak = model.pdoc->MovePositionOutsideChar(p + posLineStart, -1) + - posLineStart; + p = model.pdoc->MovePositionOutsideChar(p + 1 + posLineStart, 1) - posLineStart; + continue; + } else if ((vstyle.wrapState == eWrapWord) && (ll->styles[p] != ll->styles[p - 1])) { + lastGoodBreak = p; + } else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) { + lastGoodBreak = p; + } + } + p++; + } + ll->lines++; + } + ll->validity = LineLayout::llLines; + } +} + +Point EditView::LocationFromPosition(Surface *surface, const EditModel &model, SelectionPosition pos, int topLine, const ViewStyle &vs) { + Point pt; + if (pos.Position() == INVALID_POSITION) + return pt; + const int line = model.pdoc->LineFromPosition(pos.Position()); + const int lineVisible = model.cs.DisplayFromDoc(line); + //Platform::DebugPrintf("line=%d\n", line); + AutoLineLayout ll(llc, RetrieveLineLayout(line, model)); + if (surface && ll) { + const int posLineStart = model.pdoc->LineStart(line); + LayoutLine(model, line, surface, vs, ll, model.wrapWidth); + const int posInLine = pos.Position() - posLineStart; + pt = ll->PointFromPosition(posInLine, vs.lineHeight); + pt.y += (lineVisible - topLine) * vs.lineHeight; + pt.x += vs.textStart - model.xOffset; + } + pt.x += pos.VirtualSpace() * vs.styles[ll->EndLineStyle()].spaceWidth; + return pt; +} + +SelectionPosition EditView::SPositionFromLocation(Surface *surface, const EditModel &model, Point pt, bool canReturnInvalid, bool charPosition, bool virtualSpace, const ViewStyle &vs) { + pt.x = pt.x - vs.textStart; + int visibleLine = static_cast(floor(pt.y / vs.lineHeight)); + if (!canReturnInvalid && (visibleLine < 0)) + visibleLine = 0; + const int lineDoc = model.cs.DocFromDisplay(visibleLine); + if (canReturnInvalid && (lineDoc < 0)) + return SelectionPosition(INVALID_POSITION); + if (lineDoc >= model.pdoc->LinesTotal()) + return SelectionPosition(canReturnInvalid ? INVALID_POSITION : model.pdoc->Length()); + const int posLineStart = model.pdoc->LineStart(lineDoc); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); + if (surface && ll) { + LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); + const int lineStartSet = model.cs.DisplayFromDoc(lineDoc); + const int subLine = visibleLine - lineStartSet; + if (subLine < ll->lines) { + const Range rangeSubLine = ll->SubLineRange(subLine); + const XYPOSITION subLineStart = ll->positions[rangeSubLine.start]; + if (subLine > 0) // Wrapped + pt.x -= ll->wrapIndent; + const int positionInLine = ll->FindPositionFromX(pt.x + subLineStart, rangeSubLine, charPosition); + if (positionInLine < rangeSubLine.end) { + return SelectionPosition(model.pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1)); + } + if (virtualSpace) { + const XYPOSITION spaceWidth = vs.styles[ll->EndLineStyle()].spaceWidth; + const int spaceOffset = static_cast( + (pt.x + subLineStart - ll->positions[rangeSubLine.end] + spaceWidth / 2) / spaceWidth); + return SelectionPosition(rangeSubLine.end + posLineStart, spaceOffset); + } else if (canReturnInvalid) { + if (pt.x < (ll->positions[rangeSubLine.end] - subLineStart)) { + return SelectionPosition(model.pdoc->MovePositionOutsideChar(rangeSubLine.end + posLineStart, 1)); + } + } else { + return SelectionPosition(rangeSubLine.end + posLineStart); + } + } + if (!canReturnInvalid) + return SelectionPosition(ll->numCharsInLine + posLineStart); + } + return SelectionPosition(canReturnInvalid ? INVALID_POSITION : posLineStart); +} + +/** +* Find the document position corresponding to an x coordinate on a particular document line. +* Ensure is between whole characters when document is in multi-byte or UTF-8 mode. +* This method is used for rectangular selections and does not work on wrapped lines. +*/ +SelectionPosition EditView::SPositionFromLineX(Surface *surface, const EditModel &model, int lineDoc, int x, const ViewStyle &vs) { + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); + if (surface && ll) { + const int posLineStart = model.pdoc->LineStart(lineDoc); + LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); + const Range rangeSubLine = ll->SubLineRange(0); + const XYPOSITION subLineStart = ll->positions[rangeSubLine.start]; + const int positionInLine = ll->FindPositionFromX(x + subLineStart, rangeSubLine, false); + if (positionInLine < rangeSubLine.end) { + return SelectionPosition(model.pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1)); + } + const XYPOSITION spaceWidth = vs.styles[ll->EndLineStyle()].spaceWidth; + const int spaceOffset = static_cast( + (x + subLineStart - ll->positions[rangeSubLine.end] + spaceWidth / 2) / spaceWidth); + return SelectionPosition(rangeSubLine.end + posLineStart, spaceOffset); + } + return SelectionPosition(0); +} + +int EditView::DisplayFromPosition(Surface *surface, const EditModel &model, int pos, const ViewStyle &vs) { + int lineDoc = model.pdoc->LineFromPosition(pos); + int lineDisplay = model.cs.DisplayFromDoc(lineDoc); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); + if (surface && ll) { + LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); + unsigned int posLineStart = model.pdoc->LineStart(lineDoc); + int posInLine = pos - posLineStart; + lineDisplay--; // To make up for first increment ahead. + for (int subLine = 0; subLine < ll->lines; subLine++) { + if (posInLine >= ll->LineStart(subLine)) { + lineDisplay++; + } + } + } + return lineDisplay; +} + +int EditView::StartEndDisplayLine(Surface *surface, const EditModel &model, int pos, bool start, const ViewStyle &vs) { + int line = model.pdoc->LineFromPosition(pos); + AutoLineLayout ll(llc, RetrieveLineLayout(line, model)); + int posRet = INVALID_POSITION; + if (surface && ll) { + unsigned int posLineStart = model.pdoc->LineStart(line); + LayoutLine(model, line, surface, vs, ll, model.wrapWidth); + int posInLine = pos - posLineStart; + if (posInLine <= ll->maxLineLength) { + for (int subLine = 0; subLine < ll->lines; subLine++) { + if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) { + if (start) { + posRet = ll->LineStart(subLine) + posLineStart; + } else { + if (subLine == ll->lines - 1) + posRet = ll->LineStart(subLine + 1) + posLineStart; + else + posRet = ll->LineStart(subLine + 1) + posLineStart - 1; + } + } + } + } + } + return posRet; +} + +static ColourDesired SelectionBackground(const ViewStyle &vsDraw, bool main, bool primarySelection) { + return main ? + (primarySelection ? vsDraw.selColours.back : vsDraw.selBackground2) : + vsDraw.selAdditionalBackground; +} + +static ColourDesired TextBackground(const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + ColourOptional background, int inSelection, bool inHotspot, int styleMain, int i) { + if (inSelection == 1) { + if (vsDraw.selColours.back.isSet && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { + return SelectionBackground(vsDraw, true, model.primarySelection); + } + } else if (inSelection == 2) { + if (vsDraw.selColours.back.isSet && (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA)) { + return SelectionBackground(vsDraw, false, model.primarySelection); + } + } else { + if ((vsDraw.edgeState == EDGE_BACKGROUND) && + (i >= ll->edgeColumn) && + (i < ll->numCharsBeforeEOL)) + return vsDraw.edgecolour; + if (inHotspot && vsDraw.hotspotColours.back.isSet) + return vsDraw.hotspotColours.back; + } + if (background.isSet && (styleMain != STYLE_BRACELIGHT) && (styleMain != STYLE_BRACEBAD)) { + return background; + } else { + return vsDraw.styles[styleMain].back; + } +} + +void EditView::DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight) { + Point from = Point::FromInts(0, ((lineVisible & 1) && (lineHeight & 1)) ? 1 : 0); + PRectangle rcCopyArea = PRectangle::FromInts(start + 1, static_cast(rcSegment.top), start + 2, static_cast(rcSegment.bottom)); + surface->Copy(rcCopyArea, from, + highlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide); +} + +static void SimpleAlphaRectangle(Surface *surface, PRectangle rc, ColourDesired fill, int alpha) { + if (alpha != SC_ALPHA_NOALPHA) { + surface->AlphaRectangle(rc, 0, fill, alpha, fill, alpha, 0); + } +} + +static void DrawTextBlob(Surface *surface, const ViewStyle &vsDraw, PRectangle rcSegment, + const char *s, ColourDesired textBack, ColourDesired textFore, bool fillBackground) { + if (fillBackground) { + surface->FillRectangle(rcSegment, textBack); + } + FontAlias ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; + int normalCharHeight = static_cast(surface->Ascent(ctrlCharsFont) - + surface->InternalLeading(ctrlCharsFont)); + PRectangle rcCChar = rcSegment; + rcCChar.left = rcCChar.left + 1; + rcCChar.top = rcSegment.top + vsDraw.maxAscent - normalCharHeight; + rcCChar.bottom = rcSegment.top + vsDraw.maxAscent + 1; + PRectangle rcCentral = rcCChar; + rcCentral.top++; + rcCentral.bottom--; + surface->FillRectangle(rcCentral, textFore); + PRectangle rcChar = rcCChar; + rcChar.left++; + rcChar.right--; + surface->DrawTextClipped(rcChar, ctrlCharsFont, + rcSegment.top + vsDraw.maxAscent, s, static_cast(s ? strlen(s) : 0), + textBack, textFore); +} + +void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + PRectangle rcLine, int line, int lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart, + ColourOptional background) { + + const int posLineStart = model.pdoc->LineStart(line); + PRectangle rcSegment = rcLine; + + const bool lastSubLine = subLine == (ll->lines - 1); + XYPOSITION virtualSpace = 0; + if (lastSubLine) { + const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; + virtualSpace = model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line)) * spaceWidth; + } + XYPOSITION xEol = static_cast(ll->positions[lineEnd] - subLineStart); + + // Fill the virtual space and show selections within it + if (virtualSpace) { + rcSegment.left = xEol + xStart; + rcSegment.right = xEol + xStart + virtualSpace; + surface->FillRectangle(rcSegment, background.isSet ? background : vsDraw.styles[ll->styles[ll->numCharsInLine]].back); + if (!hideSelection && ((vsDraw.selAlpha == SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA))) { + SelectionSegment virtualSpaceRange(SelectionPosition(model.pdoc->LineEnd(line)), SelectionPosition(model.pdoc->LineEnd(line), model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line)))); + for (size_t r = 0; rEndLineStyle()].spaceWidth; + rcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] - + static_cast(subLineStart)+portion.start.VirtualSpace() * spaceWidth; + rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - + static_cast(subLineStart)+portion.end.VirtualSpace() * spaceWidth; + rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; + rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection)); + } + } + } + } + } + + int eolInSelection = 0; + int alpha = SC_ALPHA_NOALPHA; + if (!hideSelection) { + int posAfterLineEnd = model.pdoc->LineStart(line + 1); + eolInSelection = (subLine == (ll->lines - 1)) ? model.sel.InSelectionForEOL(posAfterLineEnd) : 0; + alpha = (eolInSelection == 1) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; + } + + // Draw the [CR], [LF], or [CR][LF] blobs if visible line ends are on + XYPOSITION blobsWidth = 0; + if (lastSubLine) { + for (int eolPos = ll->numCharsBeforeEOL; eolPosnumCharsInLine; eolPos++) { + rcSegment.left = xStart + ll->positions[eolPos] - static_cast(subLineStart)+virtualSpace; + rcSegment.right = xStart + ll->positions[eolPos + 1] - static_cast(subLineStart)+virtualSpace; + blobsWidth += rcSegment.Width(); + char hexits[4]; + const char *ctrlChar; + unsigned char chEOL = ll->chars[eolPos]; + int styleMain = ll->styles[eolPos]; + ColourDesired textBack = TextBackground(model, vsDraw, ll, background, eolInSelection, false, styleMain, eolPos); + if (UTF8IsAscii(chEOL)) { + ctrlChar = ControlCharacterString(chEOL); + } else { + const Representation *repr = model.reprs.RepresentationFromCharacter(ll->chars + eolPos, ll->numCharsInLine - eolPos); + if (repr) { + ctrlChar = repr->stringRep.c_str(); + eolPos = ll->numCharsInLine; + } else { + sprintf(hexits, "x%2X", chEOL); + ctrlChar = hexits; + } + } + ColourDesired textFore = vsDraw.styles[styleMain].fore; + if (eolInSelection && vsDraw.selColours.fore.isSet) { + textFore = (eolInSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground; + } + if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1)) { + if (alpha == SC_ALPHA_NOALPHA) { + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection)); + } else { + surface->FillRectangle(rcSegment, textBack); + } + } else { + surface->FillRectangle(rcSegment, textBack); + } + DrawTextBlob(surface, vsDraw, rcSegment, ctrlChar, textBack, textFore, phasesDraw == phasesOne); + if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); + } + } + } + + // Draw the eol-is-selected rectangle + rcSegment.left = xEol + xStart + virtualSpace + blobsWidth; + rcSegment.right = rcSegment.left + vsDraw.aveCharWidth; + + if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha == SC_ALPHA_NOALPHA)) { + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection)); + } else { + if (background.isSet) { + surface->FillRectangle(rcSegment, background); + } else if (line < model.pdoc->LinesTotal() - 1) { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); + } else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back); + } + if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); + } + } + + // Fill the remainder of the line + rcSegment.left = rcSegment.right; + if (rcSegment.left < rcLine.left) + rcSegment.left = rcLine.left; + rcSegment.right = rcLine.right; + + if (eolInSelection && vsDraw.selEOLFilled && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha == SC_ALPHA_NOALPHA)) { + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection)); + } else { + if (background.isSet) { + surface->FillRectangle(rcSegment, background); + } else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back); + } + if (eolInSelection && vsDraw.selEOLFilled && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); + } + } + + bool drawWrapMarkEnd = false; + + if (vsDraw.wrapVisualFlags & SC_WRAPVISUALFLAG_END) { + if (subLine + 1 < ll->lines) { + drawWrapMarkEnd = ll->LineStart(subLine + 1) != 0; + } + } + + if (drawWrapMarkEnd) { + PRectangle rcPlace = rcSegment; + + if (vsDraw.wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_END_BY_TEXT) { + rcPlace.left = xEol + xStart + virtualSpace; + rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; + } else { + // rcLine is clipped to text area + rcPlace.right = rcLine.right; + rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; + } + DrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour()); + } +} + +static void DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, const ViewStyle &vsDraw, + const LineLayout *ll, int xStart, PRectangle rcLine, int subLine) { + const XYPOSITION subLineStart = ll->positions[ll->LineStart(subLine)]; + PRectangle rcIndic( + ll->positions[startPos] + xStart - subLineStart, + rcLine.top + vsDraw.maxAscent, + ll->positions[endPos] + xStart - subLineStart, + rcLine.top + vsDraw.maxAscent + 3); + vsDraw.indicators[indicNum].Draw(surface, rcIndic, rcLine); +} + +static void DrawIndicators(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int line, int xStart, PRectangle rcLine, int subLine, int lineEnd, bool under) { + // Draw decorators + const int posLineStart = model.pdoc->LineStart(line); + const int lineStart = ll->LineStart(subLine); + const int posLineEnd = posLineStart + lineEnd; + + for (Decoration *deco = model.pdoc->decorations.root; deco; deco = deco->next) { + if (under == vsDraw.indicators[deco->indicator].under) { + int startPos = posLineStart + lineStart; + if (!deco->rs.ValueAt(startPos)) { + startPos = deco->rs.EndRun(startPos); + } + while ((startPos < posLineEnd) && (deco->rs.ValueAt(startPos))) { + int endPos = deco->rs.EndRun(startPos); + if (endPos > posLineEnd) + endPos = posLineEnd; + DrawIndicator(deco->indicator, startPos - posLineStart, endPos - posLineStart, + surface, vsDraw, ll, xStart, rcLine, subLine); + startPos = endPos; + if (!deco->rs.ValueAt(startPos)) { + startPos = deco->rs.EndRun(startPos); + } + } + } + } + + // Use indicators to highlight matching braces + if ((vsDraw.braceHighlightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACELIGHT)) || + (vsDraw.braceBadLightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACEBAD))) { + int braceIndicator = (model.bracesMatchStyle == STYLE_BRACELIGHT) ? vsDraw.braceHighlightIndicator : vsDraw.braceBadLightIndicator; + if (under == vsDraw.indicators[braceIndicator].under) { + Range rangeLine(posLineStart + lineStart, posLineEnd); + if (rangeLine.ContainsCharacter(model.braces[0])) { + int braceOffset = model.braces[0] - posLineStart; + if (braceOffset < ll->numCharsInLine) { + DrawIndicator(braceIndicator, braceOffset, braceOffset + 1, surface, vsDraw, ll, xStart, rcLine, subLine); + } + } + if (rangeLine.ContainsCharacter(model.braces[1])) { + int braceOffset = model.braces[1] - posLineStart; + if (braceOffset < ll->numCharsInLine) { + DrawIndicator(braceIndicator, braceOffset, braceOffset + 1, surface, vsDraw, ll, xStart, rcLine, subLine); + } + } + } + } +} + +void EditView::DrawAnnotation(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int line, int xStart, PRectangle rcLine, int subLine, DrawPhase phase) { + int indent = static_cast(model.pdoc->GetLineIndentation(line) * vsDraw.spaceWidth); + PRectangle rcSegment = rcLine; + int annotationLine = subLine - ll->lines; + const StyledText stAnnotation = model.pdoc->AnnotationStyledText(line); + if (stAnnotation.text && ValidStyledText(vsDraw, vsDraw.annotationStyleOffset, stAnnotation)) { + if (phase & drawBack) { + surface->FillRectangle(rcSegment, vsDraw.styles[0].back); + } + rcSegment.left = static_cast(xStart); + if (model.trackLineWidth || (vsDraw.annotationVisible == ANNOTATION_BOXED)) { + // Only care about calculating width if tracking or need to draw box + int widthAnnotation = WidestLineWidth(surface, vsDraw, vsDraw.annotationStyleOffset, stAnnotation); + if (vsDraw.annotationVisible == ANNOTATION_BOXED) { + widthAnnotation += static_cast(vsDraw.spaceWidth * 2); // Margins + } + if (widthAnnotation > lineWidthMaxSeen) + lineWidthMaxSeen = widthAnnotation; + if (vsDraw.annotationVisible == ANNOTATION_BOXED) { + rcSegment.left = static_cast(xStart + indent); + rcSegment.right = rcSegment.left + widthAnnotation; + } + } + const int annotationLines = model.pdoc->AnnotationLines(line); + size_t start = 0; + size_t lengthAnnotation = stAnnotation.LineLength(start); + int lineInAnnotation = 0; + while ((lineInAnnotation < annotationLine) && (start < stAnnotation.length)) { + start += lengthAnnotation + 1; + lengthAnnotation = stAnnotation.LineLength(start); + lineInAnnotation++; + } + PRectangle rcText = rcSegment; + if ((phase & drawBack) && (vsDraw.annotationVisible == ANNOTATION_BOXED)) { + surface->FillRectangle(rcText, + vsDraw.styles[stAnnotation.StyleAt(start) + vsDraw.annotationStyleOffset].back); + rcText.left += vsDraw.spaceWidth; + } + DrawStyledText(surface, vsDraw, vsDraw.annotationStyleOffset, rcText, + stAnnotation, start, lengthAnnotation, phase); + if ((phase & drawBack) && (vsDraw.annotationVisible == ANNOTATION_BOXED)) { + surface->PenColour(vsDraw.styles[vsDraw.annotationStyleOffset].fore); + surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.top)); + surface->LineTo(static_cast(rcSegment.left), static_cast(rcSegment.bottom)); + surface->MoveTo(static_cast(rcSegment.right), static_cast(rcSegment.top)); + surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.bottom)); + if (subLine == ll->lines) { + surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.top)); + surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.top)); + } + if (subLine == ll->lines + annotationLines - 1) { + surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.bottom - 1)); + surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.bottom - 1)); + } + } + } +} + +static void DrawBlockCaret(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int subLine, int xStart, int offset, int posCaret, PRectangle rcCaret, ColourDesired caretColour) { + + int lineStart = ll->LineStart(subLine); + int posBefore = posCaret; + int posAfter = model.pdoc->MovePositionOutsideChar(posCaret + 1, 1); + int numCharsToDraw = posAfter - posCaret; + + // Work out where the starting and ending offsets are. We need to + // see if the previous character shares horizontal space, such as a + // glyph / combining character. If so we'll need to draw that too. + int offsetFirstChar = offset; + int offsetLastChar = offset + (posAfter - posCaret); + while ((posBefore > 0) && ((offsetLastChar - numCharsToDraw) >= lineStart)) { + if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - numCharsToDraw]) > 0) { + // The char does not share horizontal space + break; + } + // Char shares horizontal space, update the numChars to draw + // Update posBefore to point to the prev char + posBefore = model.pdoc->MovePositionOutsideChar(posBefore - 1, -1); + numCharsToDraw = posAfter - posBefore; + offsetFirstChar = offset - (posCaret - posBefore); + } + + // See if the next character shares horizontal space, if so we'll + // need to draw that too. + if (offsetFirstChar < 0) + offsetFirstChar = 0; + numCharsToDraw = offsetLastChar - offsetFirstChar; + while ((offsetLastChar < ll->LineStart(subLine + 1)) && (offsetLastChar <= ll->numCharsInLine)) { + // Update posAfter to point to the 2nd next char, this is where + // the next character ends, and 2nd next begins. We'll need + // to compare these two + posBefore = posAfter; + posAfter = model.pdoc->MovePositionOutsideChar(posAfter + 1, 1); + offsetLastChar = offset + (posAfter - posCaret); + if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - (posAfter - posBefore)]) > 0) { + // The char does not share horizontal space + break; + } + // Char shares horizontal space, update the numChars to draw + numCharsToDraw = offsetLastChar - offsetFirstChar; + } + + // We now know what to draw, update the caret drawing rectangle + rcCaret.left = ll->positions[offsetFirstChar] - ll->positions[lineStart] + xStart; + rcCaret.right = ll->positions[offsetFirstChar + numCharsToDraw] - ll->positions[lineStart] + xStart; + + // Adjust caret position to take into account any word wrapping symbols. + if ((ll->wrapIndent != 0) && (lineStart != 0)) { + XYPOSITION wordWrapCharWidth = ll->wrapIndent; + rcCaret.left += wordWrapCharWidth; + rcCaret.right += wordWrapCharWidth; + } + + // This character is where the caret block is, we override the colours + // (inversed) for drawing the caret here. + int styleMain = ll->styles[offsetFirstChar]; + FontAlias fontText = vsDraw.styles[styleMain].font; + surface->DrawTextClipped(rcCaret, fontText, + rcCaret.top + vsDraw.maxAscent, ll->chars + offsetFirstChar, + numCharsToDraw, vsDraw.styles[styleMain].back, + caretColour); +} + +void EditView::DrawCarets(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int lineDoc, int xStart, PRectangle rcLine, int subLine) const { + // When drag is active it is the only caret drawn + bool drawDrag = model.posDrag.IsValid(); + if (hideSelection && !drawDrag) + return; + const int posLineStart = model.pdoc->LineStart(lineDoc); + // For each selection draw + for (size_t r = 0; (rEndLineStyle()].spaceWidth; + const XYPOSITION virtualOffset = posCaret.VirtualSpace() * spaceWidth; + if (ll->InLine(offset, subLine) && offset <= ll->numCharsBeforeEOL) { + XYPOSITION xposCaret = ll->positions[offset] + virtualOffset - ll->positions[ll->LineStart(subLine)]; + if (ll->wrapIndent != 0) { + int lineStart = ll->LineStart(subLine); + if (lineStart != 0) // Wrapped + xposCaret += ll->wrapIndent; + } + bool caretBlinkState = (model.caret.active && model.caret.on) || (!additionalCaretsBlink && !mainCaret); + bool caretVisibleState = additionalCaretsVisible || mainCaret; + if ((xposCaret >= 0) && (vsDraw.caretWidth > 0) && (vsDraw.caretStyle != CARETSTYLE_INVISIBLE) && + ((model.posDrag.IsValid()) || (caretBlinkState && caretVisibleState))) { + bool caretAtEOF = false; + bool caretAtEOL = false; + bool drawBlockCaret = false; + XYPOSITION widthOverstrikeCaret; + XYPOSITION caretWidthOffset = 0; + PRectangle rcCaret = rcLine; + + if (posCaret.Position() == model.pdoc->Length()) { // At end of document + caretAtEOF = true; + widthOverstrikeCaret = vsDraw.aveCharWidth; + } else if ((posCaret.Position() - posLineStart) >= ll->numCharsInLine) { // At end of line + caretAtEOL = true; + widthOverstrikeCaret = vsDraw.aveCharWidth; + } else { + const int widthChar = model.pdoc->LenChar(posCaret.Position()); + widthOverstrikeCaret = ll->positions[offset + widthChar] - ll->positions[offset]; + } + if (widthOverstrikeCaret < 3) // Make sure its visible + widthOverstrikeCaret = 3; + + if (xposCaret > 0) + caretWidthOffset = 0.51f; // Move back so overlaps both character cells. + xposCaret += xStart; + if (model.posDrag.IsValid()) { + /* Dragging text, use a line caret */ + rcCaret.left = static_cast(RoundXYPosition(xposCaret - caretWidthOffset)); + rcCaret.right = rcCaret.left + vsDraw.caretWidth; + } else if (model.inOverstrike && drawOverstrikeCaret) { + /* Overstrike (insert mode), use a modified bar caret */ + rcCaret.top = rcCaret.bottom - 2; + rcCaret.left = xposCaret + 1; + rcCaret.right = rcCaret.left + widthOverstrikeCaret - 1; + } else if ((vsDraw.caretStyle == CARETSTYLE_BLOCK) || imeCaretBlockOverride) { + /* Block caret */ + rcCaret.left = xposCaret; + if (!caretAtEOL && !caretAtEOF && (ll->chars[offset] != '\t') && !(IsControlCharacter(ll->chars[offset]))) { + drawBlockCaret = true; + rcCaret.right = xposCaret + widthOverstrikeCaret; + } else { + rcCaret.right = xposCaret + vsDraw.aveCharWidth; + } + } else { + /* Line caret */ + rcCaret.left = static_cast(RoundXYPosition(xposCaret - caretWidthOffset)); + rcCaret.right = rcCaret.left + vsDraw.caretWidth; + } + ColourDesired caretColour = mainCaret ? vsDraw.caretcolour : vsDraw.additionalCaretColour; + if (drawBlockCaret) { + DrawBlockCaret(surface, model, vsDraw, ll, subLine, xStart, offset, posCaret.Position(), rcCaret, caretColour); + } else { + surface->FillRectangle(rcCaret, caretColour); + } + } + } + if (drawDrag) + break; + } +} + +static void DrawWrapIndentAndMarker(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll, + int xStart, PRectangle rcLine, ColourOptional background) { + // default bgnd here.. + surface->FillRectangle(rcLine, background.isSet ? background : + vsDraw.styles[STYLE_DEFAULT].back); + + if (vsDraw.wrapVisualFlags & SC_WRAPVISUALFLAG_START) { + + // draw continuation rect + PRectangle rcPlace = rcLine; + + rcPlace.left = static_cast(xStart); + rcPlace.right = rcPlace.left + ll->wrapIndent; + + if (vsDraw.wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_START_BY_TEXT) + rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; + else + rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; + + DrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour()); + } +} + +void EditView::DrawBackground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + PRectangle rcLine, Range lineRange, int posLineStart, int xStart, + int subLine, ColourOptional background) const { + + const bool selBackDrawn = vsDraw.SelectionBackgroundDrawn(); + bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. + const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; + // Does not take margin into account but not significant + const int xStartVisible = static_cast(subLineStart)-xStart; + + BreakFinder bfBack(ll, &model.sel, lineRange, posLineStart, xStartVisible, selBackDrawn, model.pdoc, &model.reprs); + + const bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background.isSet; + + // Background drawing loop + while (bfBack.More()) { + + const TextSegment ts = bfBack.Next(); + const int i = ts.end() - 1; + const int iDoc = i + posLineStart; + + PRectangle rcSegment = rcLine; + rcSegment.left = ll->positions[ts.start] + xStart - static_cast(subLineStart); + rcSegment.right = ll->positions[ts.end()] + xStart - static_cast(subLineStart); + // Only try to draw if really visible - enhances performance by not calling environment to + // draw strings that are completely past the right side of the window. + if (rcSegment.Intersects(rcLine)) { + // Clip to line rectangle, since may have a huge position which will not work with some platforms + if (rcSegment.left < rcLine.left) + rcSegment.left = rcLine.left; + if (rcSegment.right > rcLine.right) + rcSegment.right = rcLine.right; + + const int inSelection = hideSelection ? 0 : model.sel.CharacterInSelection(iDoc); + const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc); + ColourDesired textBack = TextBackground(model, vsDraw, ll, background, inSelection, + inHotspot, ll->styles[i], i); + if (ts.representation) { + if (ll->chars[i] == '\t') { + // Tab display + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) + textBack = vsDraw.whitespaceColours.back; + } else { + // Blob display + inIndentation = false; + } + surface->FillRectangle(rcSegment, textBack); + } else { + // Normal text display + surface->FillRectangle(rcSegment, textBack); + if (vsDraw.viewWhitespace != wsInvisible || + (inIndentation && vsDraw.viewIndentationGuides == ivReal)) { + for (int cpos = 0; cpos <= i - ts.start; cpos++) { + if (ll->chars[cpos + ts.start] == ' ') { + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { + PRectangle rcSpace( + ll->positions[cpos + ts.start] + xStart - static_cast(subLineStart), + rcSegment.top, + ll->positions[cpos + ts.start + 1] + xStart - static_cast(subLineStart), + rcSegment.bottom); + surface->FillRectangle(rcSpace, vsDraw.whitespaceColours.back); + } + } else { + inIndentation = false; + } + } + } + } + } else if (rcSegment.left > rcLine.right) { + break; + } + } +} + +static void DrawEdgeLine(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, + Range lineRange, int xStart) { + if (vsDraw.edgeState == EDGE_LINE) { + PRectangle rcSegment = rcLine; + int edgeX = static_cast(vsDraw.theEdge * vsDraw.spaceWidth); + rcSegment.left = static_cast(edgeX + xStart); + if ((ll->wrapIndent != 0) && (lineRange.start != 0)) + rcSegment.left -= ll->wrapIndent; + rcSegment.right = rcSegment.left + 1; + surface->FillRectangle(rcSegment, vsDraw.edgecolour); + } +} + +// Draw underline mark as part of background if not transparent +static void DrawMarkUnderline(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, + int line, PRectangle rcLine) { + int marks = model.pdoc->GetMark(line); + for (int markBit = 0; (markBit < 32) && marks; markBit++) { + if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE) && + (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) { + PRectangle rcUnderline = rcLine; + rcUnderline.top = rcUnderline.bottom - 2; + surface->FillRectangle(rcUnderline, vsDraw.markers[markBit].back); + } + marks >>= 1; + } +} +static void DrawTranslucentSelection(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int line, PRectangle rcLine, int subLine, Range lineRange, int xStart) { + if ((vsDraw.selAlpha != SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha != SC_ALPHA_NOALPHA)) { + const int posLineStart = model.pdoc->LineStart(line); + const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; + // For each selection draw + int virtualSpaces = 0; + if (subLine == (ll->lines - 1)) { + virtualSpaces = model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line)); + } + SelectionPosition posStart(posLineStart + lineRange.start); + SelectionPosition posEnd(posLineStart + lineRange.end, virtualSpaces); + SelectionSegment virtualSpaceRange(posStart, posEnd); + for (size_t r = 0; r < model.sel.Count(); r++) { + int alpha = (r == model.sel.Main()) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; + if (alpha != SC_ALPHA_NOALPHA) { + SelectionSegment portion = model.sel.Range(r).Intersect(virtualSpaceRange); + if (!portion.Empty()) { + const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; + PRectangle rcSegment = rcLine; + rcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] - + static_cast(subLineStart)+portion.start.VirtualSpace() * spaceWidth; + rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - + static_cast(subLineStart)+portion.end.VirtualSpace() * spaceWidth; + if ((ll->wrapIndent != 0) && (lineRange.start != 0)) { + if ((portion.start.Position() - posLineStart) == lineRange.start && model.sel.Range(r).ContainsCharacter(portion.start.Position() - 1)) + rcSegment.left -= static_cast(ll->wrapIndent); // indentation added to xStart was truncated to int, so we do the same here + } + rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; + rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; + if (rcSegment.right > rcLine.left) + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection), alpha); + } + } + } + } +} + +// Draw any translucent whole line states +static void DrawTranslucentLineState(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int line, PRectangle rcLine) { + if ((model.caret.active || vsDraw.alwaysShowCaretLineBackground) && vsDraw.showCaretLineBackground && ll->containsCaret) { + SimpleAlphaRectangle(surface, rcLine, vsDraw.caretLineBackground, vsDraw.caretLineAlpha); + } + int marks = model.pdoc->GetMark(line); + for (int markBit = 0; (markBit < 32) && marks; markBit++) { + if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND)) { + SimpleAlphaRectangle(surface, rcLine, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); + } else if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE)) { + PRectangle rcUnderline = rcLine; + rcUnderline.top = rcUnderline.bottom - 2; + SimpleAlphaRectangle(surface, rcUnderline, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); + } + marks >>= 1; + } + if (vsDraw.maskInLine) { + int marksMasked = model.pdoc->GetMark(line) & vsDraw.maskInLine; + if (marksMasked) { + for (int markBit = 0; (markBit < 32) && marksMasked; markBit++) { + if ((marksMasked & 1) && (vsDraw.markers[markBit].markType != SC_MARK_EMPTY)) { + SimpleAlphaRectangle(surface, rcLine, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); + } + marksMasked >>= 1; + } + } + } +} + +void EditView::DrawForeground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int lineVisible, PRectangle rcLine, Range lineRange, int posLineStart, int xStart, + int subLine, ColourOptional background) { + + const bool selBackDrawn = vsDraw.SelectionBackgroundDrawn(); + const bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background.isSet; + bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. + + const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; + const XYPOSITION indentWidth = model.pdoc->IndentSize() * vsDraw.spaceWidth; + + // Does not take margin into account but not significant + const int xStartVisible = static_cast(subLineStart)-xStart; + + // Foreground drawing loop + BreakFinder bfFore(ll, &model.sel, lineRange, posLineStart, xStartVisible, + (((phasesDraw == phasesOne) && selBackDrawn) || vsDraw.selColours.fore.isSet), model.pdoc, &model.reprs); + + while (bfFore.More()) { + + const TextSegment ts = bfFore.Next(); + const int i = ts.end() - 1; + const int iDoc = i + posLineStart; + + PRectangle rcSegment = rcLine; + rcSegment.left = ll->positions[ts.start] + xStart - static_cast(subLineStart); + rcSegment.right = ll->positions[ts.end()] + xStart - static_cast(subLineStart); + // Only try to draw if really visible - enhances performance by not calling environment to + // draw strings that are completely past the right side of the window. + if (rcSegment.Intersects(rcLine)) { + int styleMain = ll->styles[i]; + ColourDesired textFore = vsDraw.styles[styleMain].fore; + FontAlias textFont = vsDraw.styles[styleMain].font; + //hotspot foreground + const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc); + if (inHotspot) { + if (vsDraw.hotspotColours.fore.isSet) + textFore = vsDraw.hotspotColours.fore; + } + const int inSelection = hideSelection ? 0 : model.sel.CharacterInSelection(iDoc); + if (inSelection && (vsDraw.selColours.fore.isSet)) { + textFore = (inSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground; + } + ColourDesired textBack = TextBackground(model, vsDraw, ll, background, inSelection, inHotspot, styleMain, i); + if (ts.representation) { + if (ll->chars[i] == '\t') { + // Tab display + if (phasesDraw == phasesOne) { + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) + textBack = vsDraw.whitespaceColours.back; + surface->FillRectangle(rcSegment, textBack); + } + if (inIndentation && vsDraw.viewIndentationGuides == ivReal) { + for (int indentCount = static_cast((ll->positions[i] + epsilon) / indentWidth); + indentCount <= (ll->positions[i + 1] - epsilon) / indentWidth; + indentCount++) { + if (indentCount > 0) { + int xIndent = static_cast(indentCount * indentWidth); + DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcSegment, + (ll->xHighlightGuide == xIndent)); + } + } + } + if (vsDraw.viewWhitespace != wsInvisible) { + if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { + if (vsDraw.whitespaceColours.fore.isSet) + textFore = vsDraw.whitespaceColours.fore; + surface->PenColour(textFore); + PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, + rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); + DrawTabArrow(surface, rcTab, static_cast(rcSegment.top + vsDraw.lineHeight / 2)); + } + } + } else { + inIndentation = false; + if (vsDraw.controlCharSymbol >= 32) { + // Using one font for all control characters so it can be controlled independently to ensure + // the box goes around the characters tightly. Seems to be no way to work out what height + // is taken by an individual character - internal leading gives varying results. + FontAlias ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; + char cc[2] = { static_cast(vsDraw.controlCharSymbol), '\0' }; + surface->DrawTextNoClip(rcSegment, ctrlCharsFont, + rcSegment.top + vsDraw.maxAscent, + cc, 1, textBack, textFore); + } else { + DrawTextBlob(surface, vsDraw, rcSegment, ts.representation->stringRep.c_str(), + textBack, textFore, phasesDraw == phasesOne); + } + } + } else { + // Normal text display + if (vsDraw.styles[styleMain].visible) { + if (phasesDraw != phasesOne) { + surface->DrawTextTransparent(rcSegment, textFont, + rcSegment.top + vsDraw.maxAscent, ll->chars + ts.start, + i - ts.start + 1, textFore); + } else { + surface->DrawTextNoClip(rcSegment, textFont, + rcSegment.top + vsDraw.maxAscent, ll->chars + ts.start, + i - ts.start + 1, textFore, textBack); + } + } + if (vsDraw.viewWhitespace != wsInvisible || + (inIndentation && vsDraw.viewIndentationGuides != ivNone)) { + for (int cpos = 0; cpos <= i - ts.start; cpos++) { + if (ll->chars[cpos + ts.start] == ' ') { + if (vsDraw.viewWhitespace != wsInvisible) { + if (vsDraw.whitespaceColours.fore.isSet) + textFore = vsDraw.whitespaceColours.fore; + if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { + XYPOSITION xmid = (ll->positions[cpos + ts.start] + ll->positions[cpos + ts.start + 1]) / 2; + if ((phasesDraw == phasesOne) && drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { + textBack = vsDraw.whitespaceColours.back; + PRectangle rcSpace( + ll->positions[cpos + ts.start] + xStart - static_cast(subLineStart), + rcSegment.top, + ll->positions[cpos + ts.start + 1] + xStart - static_cast(subLineStart), + rcSegment.bottom); + surface->FillRectangle(rcSpace, textBack); + } + PRectangle rcDot(xmid + xStart - static_cast(subLineStart), + rcSegment.top + vsDraw.lineHeight / 2, 0.0f, 0.0f); + rcDot.right = rcDot.left + vsDraw.whitespaceSize; + rcDot.bottom = rcDot.top + vsDraw.whitespaceSize; + surface->FillRectangle(rcDot, textFore); + } + } + if (inIndentation && vsDraw.viewIndentationGuides == ivReal) { + for (int indentCount = static_cast((ll->positions[cpos + ts.start] + epsilon) / indentWidth); + indentCount <= (ll->positions[cpos + ts.start + 1] - epsilon) / indentWidth; + indentCount++) { + if (indentCount > 0) { + int xIndent = static_cast(indentCount * indentWidth); + DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcSegment, + (ll->xHighlightGuide == xIndent)); + } + } + } + } else { + inIndentation = false; + } + } + } + } + if (ll->hotspot.Valid() && vsDraw.hotspotUnderline && ll->hotspot.ContainsCharacter(iDoc)) { + PRectangle rcUL = rcSegment; + rcUL.top = rcUL.top + vsDraw.maxAscent + 1; + rcUL.bottom = rcUL.top + 1; + if (vsDraw.hotspotColours.fore.isSet) + surface->FillRectangle(rcUL, vsDraw.hotspotColours.fore); + else + surface->FillRectangle(rcUL, textFore); + } else if (vsDraw.styles[styleMain].underline) { + PRectangle rcUL = rcSegment; + rcUL.top = rcUL.top + vsDraw.maxAscent + 1; + rcUL.bottom = rcUL.top + 1; + surface->FillRectangle(rcUL, textFore); + } + } else if (rcSegment.left > rcLine.right) { + break; + } + } +} + +void EditView::DrawIndentGuidesOverEmpty(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int line, int lineVisible, PRectangle rcLine, int xStart, int subLine) { + if ((vsDraw.viewIndentationGuides == ivLookForward || vsDraw.viewIndentationGuides == ivLookBoth) + && (subLine == 0)) { + const int posLineStart = model.pdoc->LineStart(line); + int indentSpace = model.pdoc->GetLineIndentation(line); + int xStartText = static_cast(ll->positions[model.pdoc->GetLineIndentPosition(line) - posLineStart]); + + // Find the most recent line with some text + + int lineLastWithText = line; + while (lineLastWithText > Platform::Maximum(line - 20, 0) && model.pdoc->IsWhiteLine(lineLastWithText)) { + lineLastWithText--; + } + if (lineLastWithText < line) { + xStartText = 100000; // Don't limit to visible indentation on empty line + // This line is empty, so use indentation of last line with text + int indentLastWithText = model.pdoc->GetLineIndentation(lineLastWithText); + int isFoldHeader = model.pdoc->GetLevel(lineLastWithText) & SC_FOLDLEVELHEADERFLAG; + if (isFoldHeader) { + // Level is one more level than parent + indentLastWithText += model.pdoc->IndentSize(); + } + if (vsDraw.viewIndentationGuides == ivLookForward) { + // In viLookForward mode, previous line only used if it is a fold header + if (isFoldHeader) { + indentSpace = Platform::Maximum(indentSpace, indentLastWithText); + } + } else { // viLookBoth + indentSpace = Platform::Maximum(indentSpace, indentLastWithText); + } + } + + int lineNextWithText = line; + while (lineNextWithText < Platform::Minimum(line + 20, model.pdoc->LinesTotal()) && model.pdoc->IsWhiteLine(lineNextWithText)) { + lineNextWithText++; + } + if (lineNextWithText > line) { + xStartText = 100000; // Don't limit to visible indentation on empty line + // This line is empty, so use indentation of first next line with text + indentSpace = Platform::Maximum(indentSpace, + model.pdoc->GetLineIndentation(lineNextWithText)); + } + + for (int indentPos = model.pdoc->IndentSize(); indentPos < indentSpace; indentPos += model.pdoc->IndentSize()) { + int xIndent = static_cast(indentPos * vsDraw.spaceWidth); + if (xIndent < xStartText) { + DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcLine, + (ll->xHighlightGuide == xIndent)); + } + } + } +} + +void EditView::DrawLine(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int line, int lineVisible, int xStart, PRectangle rcLine, int subLine, DrawPhase phase) { + + if (subLine >= ll->lines) { + DrawAnnotation(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, phase); + return; // No further drawing + } + + // See if something overrides the line background color. + const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); + + const int posLineStart = model.pdoc->LineStart(line); + + const Range lineRange = ll->SubLineRange(subLine); + const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; + + if ((ll->wrapIndent != 0) && (subLine > 0)) { + if (phase & drawBack) { + DrawWrapIndentAndMarker(surface, vsDraw, ll, xStart, rcLine, background); + } + xStart += static_cast(ll->wrapIndent); + } + + if ((phasesDraw != phasesOne) && (phase & drawBack)) { + DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart, + subLine, background); + DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end, + xStart, subLine, subLineStart, background); + } + + if (phase & drawIndicatorsBack) { + DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, true); + DrawEdgeLine(surface, vsDraw, ll, rcLine, lineRange, xStart); + DrawMarkUnderline(surface, model, vsDraw, line, rcLine); + } + + if (phase & drawText) { + DrawForeground(surface, model, vsDraw, ll, lineVisible, rcLine, lineRange, posLineStart, xStart, + subLine, background); + } + + if (phase & drawIndentationGuides) { + DrawIndentGuidesOverEmpty(surface, model, vsDraw, ll, line, lineVisible, rcLine, xStart, subLine); + } + + if (phase & drawIndicatorsFore) { + DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, false); + } + + // End of the drawing of the current line + if (phasesDraw == phasesOne) { + DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end, + xStart, subLine, subLineStart, background); + } + + if (!hideSelection && (phase & drawSelectionTranslucent)) { + DrawTranslucentSelection(surface, model, vsDraw, ll, line, rcLine, subLine, lineRange, xStart); + } + + if (phase & drawLineTranslucent) { + DrawTranslucentLineState(surface, model, vsDraw, ll, line, rcLine); + } +} + +static void DrawFoldLines(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, int line, PRectangle rcLine) { + bool expanded = model.cs.GetExpanded(line); + const int level = model.pdoc->GetLevel(line); + const int levelNext = model.pdoc->GetLevel(line + 1); + if ((level & SC_FOLDLEVELHEADERFLAG) && + ((level & SC_FOLDLEVELNUMBERMASK) < (levelNext & SC_FOLDLEVELNUMBERMASK))) { + // Paint the line above the fold + if ((expanded && (model.foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED)) + || + (!expanded && (model.foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.bottom = rcFoldLine.top + 1; + surface->FillRectangle(rcFoldLine, vsDraw.styles[STYLE_DEFAULT].fore); + } + // Paint the line below the fold + if ((expanded && (model.foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED)) + || + (!expanded && (model.foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.top = rcFoldLine.bottom - 1; + surface->FillRectangle(rcFoldLine, vsDraw.styles[STYLE_DEFAULT].fore); + } + } +} + +void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectangle rcArea, + PRectangle rcClient, const ViewStyle &vsDraw) { + // Allow text at start of line to overlap 1 pixel into the margin as this displays + // serifs and italic stems for aliased text. + const int leftTextOverlap = ((model.xOffset == 0) && (vsDraw.leftMarginWidth > 0)) ? 1 : 0; + + // Do the painting + if (rcArea.right > vsDraw.textStart - leftTextOverlap) { + + Surface *surface = surfaceWindow; + if (bufferedDraw) { + surface = pixmapLine; + PLATFORM_ASSERT(pixmapLine->Initialised()); + } + surface->SetUnicodeMode(SC_CP_UTF8 == model.pdoc->dbcsCodePage); + surface->SetDBCSMode(model.pdoc->dbcsCodePage); + + const Point ptOrigin = model.GetVisibleOriginInMain(); + + const int screenLinePaintFirst = static_cast(rcArea.top) / vsDraw.lineHeight; + const int xStart = vsDraw.textStart - model.xOffset + static_cast(ptOrigin.x); + + SelectionPosition posCaret = model.sel.RangeMain().caret; + if (model.posDrag.IsValid()) + posCaret = model.posDrag; + const int lineCaret = model.pdoc->LineFromPosition(posCaret.Position()); + + PRectangle rcTextArea = rcClient; + if (vsDraw.marginInside) { + rcTextArea.left += vsDraw.textStart; + rcTextArea.right -= vsDraw.rightMarginWidth; + } else { + rcTextArea = rcArea; + } + + // Remove selection margin from drawing area so text will not be drawn + // on it in unbuffered mode. + if (!bufferedDraw && vsDraw.marginInside) { + PRectangle rcClipText = rcTextArea; + rcClipText.left -= leftTextOverlap; + surfaceWindow->SetClip(rcClipText); + } + + // Loop on visible lines + //double durLayout = 0.0; + //double durPaint = 0.0; + //double durCopy = 0.0; + //ElapsedTime etWhole; + + const bool bracesIgnoreStyle = ((vsDraw.braceHighlightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACELIGHT)) || + (vsDraw.braceBadLightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACEBAD))); + + int lineDocPrevious = -1; // Used to avoid laying out one document line multiple times + AutoLineLayout ll(llc, 0); + std::vector phases; + if ((phasesDraw == phasesMultiple) && !bufferedDraw) { + for (DrawPhase phase = drawBack; phase <= drawCarets; phase = static_cast(phase * 2)) { + phases.push_back(phase); + } + } else { + phases.push_back(drawAll); + } + for (std::vector::iterator it = phases.begin(); it != phases.end(); ++it) { + int ypos = 0; + if (!bufferedDraw) + ypos += screenLinePaintFirst * vsDraw.lineHeight; + int yposScreen = screenLinePaintFirst * vsDraw.lineHeight; + int visibleLine = model.TopLineOfMain() + screenLinePaintFirst; + while (visibleLine < model.cs.LinesDisplayed() && yposScreen < rcArea.bottom) { + + const int lineDoc = model.cs.DocFromDisplay(visibleLine); + // Only visible lines should be handled by the code within the loop + PLATFORM_ASSERT(model.cs.GetVisible(lineDoc)); + const int lineStartSet = model.cs.DisplayFromDoc(lineDoc); + const int subLine = visibleLine - lineStartSet; + + // Copy this line and its styles from the document into local arrays + // and determine the x position at which each character starts. + //ElapsedTime et; + if (lineDoc != lineDocPrevious) { + ll.Set(0); + ll.Set(RetrieveLineLayout(lineDoc, model)); + LayoutLine(model, lineDoc, surface, vsDraw, ll, model.wrapWidth); + lineDocPrevious = lineDoc; + } + //durLayout += et.Duration(true); + + if (ll) { + ll->containsCaret = !hideSelection && (lineDoc == lineCaret); + ll->hotspot = model.GetHotSpotRange(); + + PRectangle rcLine = rcTextArea; + rcLine.top = static_cast(ypos); + rcLine.bottom = static_cast(ypos + vsDraw.lineHeight); + + Range rangeLine(model.pdoc->LineStart(lineDoc), model.pdoc->LineStart(lineDoc + 1)); + + // Highlight the current braces if any + ll->SetBracesHighlight(rangeLine, model.braces, static_cast(model.bracesMatchStyle), + static_cast(model.highlightGuideColumn * vsDraw.spaceWidth), bracesIgnoreStyle); + + if (leftTextOverlap && bufferedDraw) { + PRectangle rcSpacer = rcLine; + rcSpacer.right = rcSpacer.left; + rcSpacer.left -= 1; + surface->FillRectangle(rcSpacer, vsDraw.styles[STYLE_DEFAULT].back); + } + + DrawLine(surface, model, vsDraw, ll, lineDoc, visibleLine, xStart, rcLine, subLine, *it); + //durPaint += et.Duration(true); + + // Restore the previous styles for the brace highlights in case layout is in cache. + ll->RestoreBracesHighlight(rangeLine, model.braces, bracesIgnoreStyle); + + if (*it & drawFoldLines) { + DrawFoldLines(surface, model, vsDraw, lineDoc, rcLine); + } + + if (*it & drawCarets) { + DrawCarets(surface, model, vsDraw, ll, lineDoc, xStart, rcLine, subLine); + } + + if (bufferedDraw) { + Point from = Point::FromInts(vsDraw.textStart - leftTextOverlap, 0); + PRectangle rcCopyArea = PRectangle::FromInts(vsDraw.textStart - leftTextOverlap, yposScreen, + static_cast(rcClient.right - vsDraw.rightMarginWidth), + yposScreen + vsDraw.lineHeight); + surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); + } + + lineWidthMaxSeen = Platform::Maximum( + lineWidthMaxSeen, static_cast(ll->positions[ll->numCharsInLine])); + //durCopy += et.Duration(true); + } + + if (!bufferedDraw) { + ypos += vsDraw.lineHeight; + } + + yposScreen += vsDraw.lineHeight; + visibleLine++; + } + } + ll.Set(0); + //if (durPaint < 0.00000001) + // durPaint = 0.00000001; + + // Right column limit indicator + PRectangle rcBeyondEOF = (vsDraw.marginInside) ? rcClient : rcArea; + rcBeyondEOF.left = static_cast(vsDraw.textStart); + rcBeyondEOF.right = rcBeyondEOF.right - ((vsDraw.marginInside) ? vsDraw.rightMarginWidth : 0); + rcBeyondEOF.top = static_cast((model.cs.LinesDisplayed() - model.TopLineOfMain()) * vsDraw.lineHeight); + if (rcBeyondEOF.top < rcBeyondEOF.bottom) { + surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.styles[STYLE_DEFAULT].back); + if (vsDraw.edgeState == EDGE_LINE) { + int edgeX = static_cast(vsDraw.theEdge * vsDraw.spaceWidth); + rcBeyondEOF.left = static_cast(edgeX + xStart); + rcBeyondEOF.right = rcBeyondEOF.left + 1; + surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.edgecolour); + } + } + //Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset); + + //Platform::DebugPrintf( + //"Layout:%9.6g Paint:%9.6g Ratio:%9.6g Copy:%9.6g Total:%9.6g\n", + //durLayout, durPaint, durLayout / durPaint, durCopy, etWhole.Duration()); + } +} + +// Space (3 space characters) between line numbers and text when printing. +#define lineNumberPrintSpace " " + +ColourDesired InvertedLight(ColourDesired orig) { + unsigned int r = orig.GetRed(); + unsigned int g = orig.GetGreen(); + unsigned int b = orig.GetBlue(); + unsigned int l = (r + g + b) / 3; // There is a better calculation for this that matches human eye + unsigned int il = 0xff - l; + if (l == 0) + return ColourDesired(0xff, 0xff, 0xff); + r = r * il / l; + g = g * il / l; + b = b * il / l; + return ColourDesired(Platform::Minimum(r, 0xff), Platform::Minimum(g, 0xff), Platform::Minimum(b, 0xff)); +} + +long EditView::FormatRange(bool draw, Sci_RangeToFormat *pfr, Surface *surface, Surface *surfaceMeasure, + const EditModel &model, const ViewStyle &vs) { + // Can't use measurements cached for screen + posCache.Clear(); + + ViewStyle vsPrint(vs); + vsPrint.technology = SC_TECHNOLOGY_DEFAULT; + + // Modify the view style for printing as do not normally want any of the transient features to be printed + // Printing supports only the line number margin. + int lineNumberIndex = -1; + for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) { + if ((vsPrint.ms[margin].style == SC_MARGIN_NUMBER) && (vsPrint.ms[margin].width > 0)) { + lineNumberIndex = margin; + } else { + vsPrint.ms[margin].width = 0; + } + } + vsPrint.fixedColumnWidth = 0; + vsPrint.zoomLevel = printParameters.magnification; + // Don't show indentation guides + // If this ever gets changed, cached pixmap would need to be recreated if technology != SC_TECHNOLOGY_DEFAULT + vsPrint.viewIndentationGuides = ivNone; + // Don't show the selection when printing + vsPrint.selColours.back.isSet = false; + vsPrint.selColours.fore.isSet = false; + vsPrint.selAlpha = SC_ALPHA_NOALPHA; + vsPrint.selAdditionalAlpha = SC_ALPHA_NOALPHA; + vsPrint.whitespaceColours.back.isSet = false; + vsPrint.whitespaceColours.fore.isSet = false; + vsPrint.showCaretLineBackground = false; + vsPrint.alwaysShowCaretLineBackground = false; + // Don't highlight matching braces using indicators + vsPrint.braceHighlightIndicatorSet = false; + vsPrint.braceBadLightIndicatorSet = false; + + // Set colours for printing according to users settings + for (size_t sty = 0; sty < vsPrint.styles.size(); sty++) { + if (printParameters.colourMode == SC_PRINT_INVERTLIGHT) { + vsPrint.styles[sty].fore = InvertedLight(vsPrint.styles[sty].fore); + vsPrint.styles[sty].back = InvertedLight(vsPrint.styles[sty].back); + } else if (printParameters.colourMode == SC_PRINT_BLACKONWHITE) { + vsPrint.styles[sty].fore = ColourDesired(0, 0, 0); + vsPrint.styles[sty].back = ColourDesired(0xff, 0xff, 0xff); + } else if (printParameters.colourMode == SC_PRINT_COLOURONWHITE) { + vsPrint.styles[sty].back = ColourDesired(0xff, 0xff, 0xff); + } else if (printParameters.colourMode == SC_PRINT_COLOURONWHITEDEFAULTBG) { + if (sty <= STYLE_DEFAULT) { + vsPrint.styles[sty].back = ColourDesired(0xff, 0xff, 0xff); + } + } + } + // White background for the line numbers + vsPrint.styles[STYLE_LINENUMBER].back = ColourDesired(0xff, 0xff, 0xff); + + // Printing uses different margins, so reset screen margins + vsPrint.leftMarginWidth = 0; + vsPrint.rightMarginWidth = 0; + + vsPrint.Refresh(*surfaceMeasure, model.pdoc->tabInChars); + // Determining width must happen after fonts have been realised in Refresh + int lineNumberWidth = 0; + if (lineNumberIndex >= 0) { + lineNumberWidth = static_cast(surfaceMeasure->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, + "99999" lineNumberPrintSpace, 5 + static_cast(strlen(lineNumberPrintSpace)))); + vsPrint.ms[lineNumberIndex].width = lineNumberWidth; + vsPrint.Refresh(*surfaceMeasure, model.pdoc->tabInChars); // Recalculate fixedColumnWidth + } + + int linePrintStart = model.pdoc->LineFromPosition(pfr->chrg.cpMin); + int linePrintLast = linePrintStart + (pfr->rc.bottom - pfr->rc.top) / vsPrint.lineHeight - 1; + if (linePrintLast < linePrintStart) + linePrintLast = linePrintStart; + int linePrintMax = model.pdoc->LineFromPosition(pfr->chrg.cpMax); + if (linePrintLast > linePrintMax) + linePrintLast = linePrintMax; + //Platform::DebugPrintf("Formatting lines=[%0d,%0d,%0d] top=%0d bottom=%0d line=%0d %0d\n", + // linePrintStart, linePrintLast, linePrintMax, pfr->rc.top, pfr->rc.bottom, vsPrint.lineHeight, + // surfaceMeasure->Height(vsPrint.styles[STYLE_LINENUMBER].font)); + int endPosPrint = model.pdoc->Length(); + if (linePrintLast < model.pdoc->LinesTotal()) + endPosPrint = model.pdoc->LineStart(linePrintLast + 1); + + // Ensure we are styled to where we are formatting. + model.pdoc->EnsureStyledTo(endPosPrint); + + int xStart = vsPrint.fixedColumnWidth + pfr->rc.left; + int ypos = pfr->rc.top; + + int lineDoc = linePrintStart; + + int nPrintPos = pfr->chrg.cpMin; + int visibleLine = 0; + int widthPrint = pfr->rc.right - pfr->rc.left - vsPrint.fixedColumnWidth; + if (printParameters.wrapState == eWrapNone) + widthPrint = LineLayout::wrapWidthInfinite; + + while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) { + + // When printing, the hdc and hdcTarget may be the same, so + // changing the state of surfaceMeasure may change the underlying + // state of surface. Therefore, any cached state is discarded before + // using each surface. + surfaceMeasure->FlushCachedState(); + + // Copy this line and its styles from the document into local arrays + // and determine the x position at which each character starts. + LineLayout ll(model.pdoc->LineStart(lineDoc + 1) - model.pdoc->LineStart(lineDoc) + 1); + LayoutLine(model, lineDoc, surfaceMeasure, vsPrint, &ll, widthPrint); + + ll.containsCaret = false; + + PRectangle rcLine = PRectangle::FromInts( + pfr->rc.left, + ypos, + pfr->rc.right - 1, + ypos + vsPrint.lineHeight); + + // When document line is wrapped over multiple display lines, find where + // to start printing from to ensure a particular position is on the first + // line of the page. + if (visibleLine == 0) { + int startWithinLine = nPrintPos - model.pdoc->LineStart(lineDoc); + for (int iwl = 0; iwl < ll.lines - 1; iwl++) { + if (ll.LineStart(iwl) <= startWithinLine && ll.LineStart(iwl + 1) >= startWithinLine) { + visibleLine = -iwl; + } + } + + if (ll.lines > 1 && startWithinLine >= ll.LineStart(ll.lines - 1)) { + visibleLine = -(ll.lines - 1); + } + } + + if (draw && lineNumberWidth && + (ypos + vsPrint.lineHeight <= pfr->rc.bottom) && + (visibleLine >= 0)) { + char number[100]; + sprintf(number, "%d" lineNumberPrintSpace, lineDoc + 1); + PRectangle rcNumber = rcLine; + rcNumber.right = rcNumber.left + lineNumberWidth; + // Right justify + rcNumber.left = rcNumber.right - surfaceMeasure->WidthText( + vsPrint.styles[STYLE_LINENUMBER].font, number, static_cast(strlen(number))); + surface->FlushCachedState(); + surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, + static_cast(ypos + vsPrint.maxAscent), number, static_cast(strlen(number)), + vsPrint.styles[STYLE_LINENUMBER].fore, + vsPrint.styles[STYLE_LINENUMBER].back); + } + + // Draw the line + surface->FlushCachedState(); + + for (int iwl = 0; iwl < ll.lines; iwl++) { + if (ypos + vsPrint.lineHeight <= pfr->rc.bottom) { + if (visibleLine >= 0) { + if (draw) { + rcLine.top = static_cast(ypos); + rcLine.bottom = static_cast(ypos + vsPrint.lineHeight); + DrawLine(surface, model, vsPrint, &ll, lineDoc, visibleLine, xStart, rcLine, iwl, drawAll); + } + ypos += vsPrint.lineHeight; + } + visibleLine++; + if (iwl == ll.lines - 1) + nPrintPos = model.pdoc->LineStart(lineDoc + 1); + else + nPrintPos += ll.LineStart(iwl + 1) - ll.LineStart(iwl); + } + } + + ++lineDoc; + } + + // Clear cache so measurements are not used for screen + posCache.Clear(); + + return nPrintPos; +} diff --git a/scintilla/src/EditView.h b/scintilla/src/EditView.h new file mode 100644 index 0000000000..18451104fa --- /dev/null +++ b/scintilla/src/EditView.h @@ -0,0 +1,163 @@ +// Scintilla source code edit control +/** @file EditView.h + ** Defines the appearance of the main text area of the editor window. + **/ +// Copyright 1998-2014 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef EDITVIEW_H +#define EDITVIEW_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +struct PrintParameters { + int magnification; + int colourMode; + WrapMode wrapState; + PrintParameters(); +}; + +/** +* The view may be drawn in separate phases. +*/ +enum DrawPhase { + drawBack = 0x1, + drawIndicatorsBack = 0x2, + drawText = 0x4, + drawIndentationGuides = 0x8, + drawIndicatorsFore = 0x10, + drawSelectionTranslucent = 0x20, + drawLineTranslucent = 0x40, + drawFoldLines = 0x80, + drawCarets = 0x100, + drawAll = 0x1FF, +}; + +bool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st); +int WidestLineWidth(Surface *surface, const ViewStyle &vs, int styleOffset, const StyledText &st); +void DrawTextNoClipPhase(Surface *surface, PRectangle rc, const Style &style, XYPOSITION ybase, + const char *s, int len, DrawPhase phase); +void DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRectangle rcText, + const StyledText &st, size_t start, size_t length, DrawPhase phase); + +/** +* EditView draws the main text area. +*/ +class EditView { +public: + PrintParameters printParameters; + PerLine *ldTabstops; + + bool hideSelection; + bool drawOverstrikeCaret; + + /** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to + * the screen. This avoids flashing but is about 30% slower. */ + bool bufferedDraw; + /** In phasesTwo mode, drawing is performed in two phases, first the background + * and then the foreground. This avoids chopping off characters that overlap the next run. + * In multiPhaseDraw mode, drawing is performed in multiple phases with each phase drawing + * one feature over the whole drawing area, instead of within one line. This allows text to + * overlap from one line to the next. */ + enum PhasesDraw { phasesOne, phasesTwo, phasesMultiple }; + PhasesDraw phasesDraw; + + int lineWidthMaxSeen; + + bool additionalCaretsBlink; + bool additionalCaretsVisible; + + bool imeCaretBlockOverride; + + Surface *pixmapLine; + Surface *pixmapIndentGuide; + Surface *pixmapIndentGuideHighlight; + + LineLayoutCache llc; + PositionCache posCache; + + EditView(); + virtual ~EditView(); + + bool SetTwoPhaseDraw(bool twoPhaseDraw); + bool SetPhasesDraw(int phases); + bool LinesOverlap() const; + + void ClearAllTabstops(); + int NextTabstopPos(int line, int x, int tabWidth) const; + bool ClearTabstops(int line); + bool AddTabstop(int line, int x); + int GetNextTabstop(int line, int x) const; + void LinesAddedOrRemoved(int lineOfPos, int linesAdded); + + void DropGraphics(bool freeObjects); + void AllocateGraphics(const ViewStyle &vsDraw); + void RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw); + + LineLayout *RetrieveLineLayout(int lineNumber, const EditModel &model); + void LayoutLine(const EditModel &model, int line, Surface *surface, const ViewStyle &vstyle, + LineLayout *ll, int width = LineLayout::wrapWidthInfinite); + + Point LocationFromPosition(Surface *surface, const EditModel &model, SelectionPosition pos, int topLine, const ViewStyle &vs); + SelectionPosition SPositionFromLocation(Surface *surface, const EditModel &model, Point pt, bool canReturnInvalid, + bool charPosition, bool virtualSpace, const ViewStyle &vs); + SelectionPosition SPositionFromLineX(Surface *surface, const EditModel &model, int lineDoc, int x, const ViewStyle &vs); + int DisplayFromPosition(Surface *surface, const EditModel &model, int pos, const ViewStyle &vs); + int StartEndDisplayLine(Surface *surface, const EditModel &model, int pos, bool start, const ViewStyle &vs); + + void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight); + void DrawEOL(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, + int line, int lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart, + ColourOptional background); + void DrawAnnotation(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int line, int xStart, PRectangle rcLine, int subLine, DrawPhase phase); + void DrawCarets(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, + int xStart, PRectangle rcLine, int subLine) const; + void DrawBackground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, + Range lineRange, int posLineStart, int xStart, + int subLine, ColourOptional background) const; + void DrawForeground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int lineVisible, + PRectangle rcLine, Range lineRange, int posLineStart, int xStart, + int subLine, ColourOptional background); + void DrawIndentGuidesOverEmpty(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + int line, int lineVisible, PRectangle rcLine, int xStart, int subLine); + void DrawLine(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, + int lineVisible, int xStart, PRectangle rcLine, int subLine, DrawPhase phase); + void PaintText(Surface *surfaceWindow, const EditModel &model, PRectangle rcArea, PRectangle rcClient, + const ViewStyle &vsDraw); + long FormatRange(bool draw, Sci_RangeToFormat *pfr, Surface *surface, Surface *surfaceMeasure, + const EditModel &model, const ViewStyle &vs); +}; + +/** +* Convenience class to ensure LineLayout objects are always disposed. +*/ +class AutoLineLayout { + LineLayoutCache &llc; + LineLayout *ll; + AutoLineLayout &operator=(const AutoLineLayout &); +public: + AutoLineLayout(LineLayoutCache &llc_, LineLayout *ll_) : llc(llc_), ll(ll_) {} + ~AutoLineLayout() { + llc.Dispose(ll); + ll = 0; + } + LineLayout *operator->() const { + return ll; + } + operator LineLayout *() const { + return ll; + } + void Set(LineLayout *ll_) { + llc.Dispose(ll); + ll = ll_; + } +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index db0aecf43b..1c1e38d659 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -29,6 +29,7 @@ #include "RunStyles.h" #include "ContractionState.h" #include "CellBuffer.h" +#include "PerLine.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" @@ -42,6 +43,9 @@ #include "UniConversion.h" #include "Selection.h" #include "PositionCache.h" +#include "EditModel.h" +#include "MarginView.h" +#include "EditView.h" #include "Editor.h" #ifdef SCI_NAMESPACE @@ -79,21 +83,13 @@ static bool IsLastStep(const DocModification &mh) { && (mh.modificationType & SC_MULTILINEUNDOREDO) != 0; } -Caret::Caret() : - active(false), on(false), period(500) {} - Timer::Timer() : ticking(false), ticksToWait(0), tickerID(0) {} Idler::Idler() : state(false), idlerID(0) {} -static inline bool IsControlCharacter(int ch) { - // iscntrl returns true for lots of chars > 127 which are displayable - return ch >= 0 && ch < ' '; -} - -static inline bool IsAllSpacesOrTabs(char *s, unsigned int len) { +static inline bool IsAllSpacesOrTabs(const char *s, unsigned int len) { for (unsigned int i = 0; i < len; i++) { // This is safe because IsSpaceOrTab() will return false for null terminators if (!IsSpaceOrTab(s[i])) @@ -102,12 +98,6 @@ static inline bool IsAllSpacesOrTabs(char *s, unsigned int len) { return true; } -PrintParameters::PrintParameters() { - magnification = 0; - colourMode = SC_PRINT_NORMAL; - wrapState = eWrapWord; -} - Editor::Editor() { ctrlID = 0; @@ -118,15 +108,9 @@ Editor::Editor() { cursorMode = SC_CURSORNORMAL; hasFocus = false; - hideSelection = false; - inOverstrike = false; - drawOverstrikeCaret = true; errorStatus = 0; mouseDownCaptures = true; - bufferedDraw = true; - twoPhaseDraw = true; - lastClickTime = 0; dwellDelay = SC_TIME_FOREVER; ticksToDwell = SC_TIME_FOREVER; @@ -135,7 +119,6 @@ Editor::Editor() { ptMouseLast.y = 0; inDragDrop = ddNone; dropWentOutside = false; - posDrag = SelectionPosition(invalidPosition); posDrop = SelectionPosition(invalidPosition); hotSpotClickPos = INVALID_POSITION; selectionType = selChar; @@ -147,8 +130,6 @@ Editor::Editor() { wordSelectAnchorEndPos = 0; wordSelectInitialCaretPos = -1; - primarySelection = true; - caretXPolicy = CARET_SLOP | CARET_EVEN; caretXSlop = 50; @@ -160,12 +141,9 @@ Editor::Editor() { searchAnchor = 0; - xOffset = 0; xCaretMargin = 50; horizontalScrollBarVisible = true; scrollWidth = 2000; - trackLineWidth = false; - lineWidthMaxSeen = 0; verticalScrollBarVisible = true; endAtLastLine = true; caretSticky = SC_CARETSTICKY_OFF; @@ -174,17 +152,8 @@ Editor::Editor() { multipleSelection = false; additionalSelectionTyping = false; multiPasteMode = SC_MULTIPASTE_ONCE; - additionalCaretsBlink = true; - additionalCaretsVisible = true; virtualSpaceOptions = SCVS_NONE; - pixmapLine = 0; - pixmapSelMargin = 0; - pixmapSelPattern = 0; - pixmapSelPatternOffset1 = 0; - pixmapIndentGuide = 0; - pixmapIndentGuideHighlight = 0; - targetStart = 0; targetEnd = 0; searchFlags = 0; @@ -196,10 +165,6 @@ Editor::Editor() { needUpdateUI = 0; ContainerNeedsUpdate(SC_UPDATE_CONTENT); - braces[0] = invalidPosition; - braces[1] = invalidPosition; - bracesMatchStyle = STYLE_BRACEBAD; - highlightGuideColumn = 0; paintState = notPainting; paintAbandonedByStyling = false; @@ -208,30 +173,18 @@ Editor::Editor() { modEventMask = SC_MODEVENTMASKALL; - pdoc = new Document(); - pdoc->AddRef(); pdoc->AddWatcher(this, 0); recordingMacro = false; - foldFlags = 0; foldAutomatic = 0; - wrapWidth = LineLayout::wrapWidthInfinite; - convertPastes = true; - hotspot = Range(invalidPosition); - - llc.SetLevel(LineLayoutCache::llcCaret); - posCache.SetSize(0x400); - SetRepresentations(); } Editor::~Editor() { pdoc->RemoveWatcher(this, 0); - pdoc->Release(); - pdoc = 0; DropGraphics(true); } @@ -284,48 +237,13 @@ void Editor::SetRepresentations() { } void Editor::DropGraphics(bool freeObjects) { - if (freeObjects) { - delete pixmapLine; - pixmapLine = 0; - delete pixmapSelMargin; - pixmapSelMargin = 0; - delete pixmapSelPattern; - pixmapSelPattern = 0; - delete pixmapSelPatternOffset1; - pixmapSelPatternOffset1 = 0; - delete pixmapIndentGuide; - pixmapIndentGuide = 0; - delete pixmapIndentGuideHighlight; - pixmapIndentGuideHighlight = 0; - } else { - if (pixmapLine) - pixmapLine->Release(); - if (pixmapSelMargin) - pixmapSelMargin->Release(); - if (pixmapSelPattern) - pixmapSelPattern->Release(); - if (pixmapSelPatternOffset1) - pixmapSelPatternOffset1->Release(); - if (pixmapIndentGuide) - pixmapIndentGuide->Release(); - if (pixmapIndentGuideHighlight) - pixmapIndentGuideHighlight->Release(); - } + marginView.DropGraphics(freeObjects); + view.DropGraphics(freeObjects); } void Editor::AllocateGraphics() { - if (!pixmapLine) - pixmapLine = Surface::Allocate(technology); - if (!pixmapSelMargin) - pixmapSelMargin = Surface::Allocate(technology); - if (!pixmapSelPattern) - pixmapSelPattern = Surface::Allocate(technology); - if (!pixmapSelPatternOffset1) - pixmapSelPatternOffset1 = Surface::Allocate(technology); - if (!pixmapIndentGuide) - pixmapIndentGuide = Surface::Allocate(technology); - if (!pixmapIndentGuideHighlight) - pixmapIndentGuideHighlight = Surface::Allocate(technology); + marginView.AllocateGraphics(vs); + view.AllocateGraphics(vs); } void Editor::InvalidateStyleData() { @@ -333,8 +251,8 @@ void Editor::InvalidateStyleData() { vs.technology = technology; DropGraphics(false); AllocateGraphics(); - llc.Invalidate(LineLayout::llInvalid); - posCache.Clear(); + view.llc.Invalidate(LineLayout::llInvalid); + view.posCache.Clear(); } void Editor::InvalidateStyleRedraw() { @@ -355,11 +273,11 @@ void Editor::RefreshStyleData() { } } -Point Editor::GetVisibleOriginInMain() { +Point Editor::GetVisibleOriginInMain() const { return Point(0,0); } -Point Editor::DocumentPointFromView(Point ptView) { +Point Editor::DocumentPointFromView(Point ptView) const { Point ptDocument = ptView; if (wMargin.GetID()) { Point ptOrigin = GetVisibleOriginInMain(); @@ -379,29 +297,30 @@ int Editor::TopLineOfMain() const { return topLine; } -PRectangle Editor::GetClientRectangle() { - return wMain.GetClientPosition(); +PRectangle Editor::GetClientRectangle() const { + Window &win = const_cast(wMain); + return win.GetClientPosition(); } PRectangle Editor::GetClientDrawingRectangle() { return GetClientRectangle(); } -PRectangle Editor::GetTextRectangle() { +PRectangle Editor::GetTextRectangle() const { PRectangle rc = GetClientRectangle(); rc.left += vs.textStart; rc.right -= vs.rightMarginWidth; return rc; } -int Editor::LinesOnScreen() { +int Editor::LinesOnScreen() const { PRectangle rcClient = GetClientRectangle(); int htClient = static_cast(rcClient.bottom - rcClient.top); //Platform::DebugPrintf("lines on screen = %d\n", htClient / lineHeight + 1); return htClient / vs.lineHeight; } -int Editor::LinesToScroll() { +int Editor::LinesToScroll() const { int retVal = LinesOnScreen() - 1; if (retVal < 1) return 1; @@ -409,7 +328,7 @@ int Editor::LinesToScroll() { return retVal; } -int Editor::MaxScrollPos() { +int Editor::MaxScrollPos() const { //Platform::DebugPrintf("Lines %d screen = %d maxScroll = %d\n", //LinesTotal(), LinesOnScreen(), LinesTotal() - LinesOnScreen() + 1); int retVal = cs.LinesDisplayed(); @@ -425,45 +344,6 @@ int Editor::MaxScrollPos() { } } -const char *ControlCharacterString(unsigned char ch) { - const char *reps[] = { - "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", - "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", - "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", - "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" - }; - if (ch < ELEMENTS(reps)) { - return reps[ch]; - } else { - return "BAD"; - } -} - -/** - * Convenience class to ensure LineLayout objects are always disposed. - */ -class AutoLineLayout { - LineLayoutCache &llc; - LineLayout *ll; - AutoLineLayout &operator=(const AutoLineLayout &); -public: - AutoLineLayout(LineLayoutCache &llc_, LineLayout *ll_) : llc(llc_), ll(ll_) {} - ~AutoLineLayout() { - llc.Dispose(ll); - ll = 0; - } - LineLayout *operator->() const { - return ll; - } - operator LineLayout *() const { - return ll; - } - void Set(LineLayout *ll_) { - llc.Dispose(ll); - ll = ll_; - } -}; - SelectionPosition Editor::ClampPositionIntoDocument(SelectionPosition sp) const { if (sp.Position() < 0) { return SelectionPosition(0); @@ -478,25 +358,9 @@ SelectionPosition Editor::ClampPositionIntoDocument(SelectionPosition sp) const } Point Editor::LocationFromPosition(SelectionPosition pos) { - Point pt; RefreshStyleData(); - if (pos.Position() == INVALID_POSITION) - return pt; - const int line = pdoc->LineFromPosition(pos.Position()); - const int lineVisible = cs.DisplayFromDoc(line); - //Platform::DebugPrintf("line=%d\n", line); AutoSurface surface(this); - AutoLineLayout ll(llc, RetrieveLineLayout(line)); - if (surface && ll) { - const int posLineStart = pdoc->LineStart(line); - LayoutLine(line, surface, vs, ll, wrapWidth); - const int posInLine = pos.Position() - posLineStart; - pt = ll->PointFromPosition(posInLine, vs.lineHeight); - pt.y += (lineVisible - topLine) * vs.lineHeight; - pt.x += vs.textStart - xOffset; - } - pt.x += pos.VirtualSpace() * vs.styles[ll->EndLineStyle()].spaceWidth; - return pt; + return view.LocationFromPosition(surface, *this, pos, topLine, vs); } Point Editor::LocationFromPosition(int pos) { @@ -513,20 +377,10 @@ int Editor::XFromPosition(SelectionPosition sp) { return static_cast(pt.x) - vs.textStart + xOffset; } -int Editor::LineFromLocation(Point pt) const { - return cs.DocFromDisplay(static_cast(pt.y) / vs.lineHeight + topLine); -} - -void Editor::SetTopLine(int topLineNew) { - if ((topLine != topLineNew) && (topLineNew >= 0)) { - topLine = topLineNew; - ContainerNeedsUpdate(SC_UPDATE_V_SCROLL); - } - posTopLine = pdoc->LineStart(cs.DocFromDisplay(topLine)); -} - SelectionPosition Editor::SPositionFromLocation(Point pt, bool canReturnInvalid, bool charPosition, bool virtualSpace) { RefreshStyleData(); + AutoSurface surface(this); + if (canReturnInvalid) { PRectangle rcClient = GetTextRectangle(); // May be in scroll view coordinates so translate back to main view @@ -540,48 +394,7 @@ SelectionPosition Editor::SPositionFromLocation(Point pt, bool canReturnInvalid, return SelectionPosition(INVALID_POSITION); } pt = DocumentPointFromView(pt); - pt.x = pt.x - vs.textStart; - int visibleLine = static_cast(floor(pt.y / vs.lineHeight)); - if (!canReturnInvalid && (visibleLine < 0)) - visibleLine = 0; - const int lineDoc = cs.DocFromDisplay(visibleLine); - if (canReturnInvalid && (lineDoc < 0)) - return SelectionPosition(INVALID_POSITION); - if (lineDoc >= pdoc->LinesTotal()) - return SelectionPosition(canReturnInvalid ? INVALID_POSITION : pdoc->Length()); - const int posLineStart = pdoc->LineStart(lineDoc); - AutoSurface surface(this); - AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); - if (surface && ll) { - LayoutLine(lineDoc, surface, vs, ll, wrapWidth); - const int lineStartSet = cs.DisplayFromDoc(lineDoc); - const int subLine = visibleLine - lineStartSet; - if (subLine < ll->lines) { - const Range rangeSubLine = ll->SubLineRange(subLine); - const XYPOSITION subLineStart = ll->positions[rangeSubLine.start]; - if (subLine > 0) // Wrapped - pt.x -= ll->wrapIndent; - const int positionInLine = ll->FindPositionFromX(pt.x + subLineStart, rangeSubLine, charPosition); - if (positionInLine < rangeSubLine.end) { - return SelectionPosition(pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1)); - } - if (virtualSpace) { - const XYPOSITION spaceWidth = vs.styles[ll->EndLineStyle()].spaceWidth; - const int spaceOffset = static_cast( - (pt.x + subLineStart - ll->positions[rangeSubLine.end] + spaceWidth / 2) / spaceWidth); - return SelectionPosition(rangeSubLine.end + posLineStart, spaceOffset); - } else if (canReturnInvalid) { - if (pt.x < (ll->positions[rangeSubLine.end] - subLineStart)) { - return SelectionPosition(pdoc->MovePositionOutsideChar(rangeSubLine.end + posLineStart, 1)); - } - } else { - return SelectionPosition(rangeSubLine.end + posLineStart); - } - } - if (!canReturnInvalid) - return SelectionPosition(ll->numCharsInLine + posLineStart); - } - return SelectionPosition(canReturnInvalid ? INVALID_POSITION : posLineStart); + return view.SPositionFromLocation(surface, *this, pt, canReturnInvalid, charPosition, virtualSpace, vs); } int Editor::PositionFromLocation(Point pt, bool canReturnInvalid, bool charPosition) { @@ -589,38 +402,35 @@ int Editor::PositionFromLocation(Point pt, bool canReturnInvalid, bool charPosit } /** - * Find the document position corresponding to an x coordinate on a particular document line. - * Ensure is between whole characters when document is in multi-byte or UTF-8 mode. - * This method is used for rectangular selections and does not work on wrapped lines. - */ +* Find the document position corresponding to an x coordinate on a particular document line. +* Ensure is between whole characters when document is in multi-byte or UTF-8 mode. +* This method is used for rectangular selections and does not work on wrapped lines. +*/ SelectionPosition Editor::SPositionFromLineX(int lineDoc, int x) { RefreshStyleData(); if (lineDoc >= pdoc->LinesTotal()) return SelectionPosition(pdoc->Length()); //Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); AutoSurface surface(this); - AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); - if (surface && ll) { - const int posLineStart = pdoc->LineStart(lineDoc); - LayoutLine(lineDoc, surface, vs, ll, wrapWidth); - const Range rangeSubLine = ll->SubLineRange(0); - const XYPOSITION subLineStart = ll->positions[rangeSubLine.start]; - const int positionInLine = ll->FindPositionFromX(x + subLineStart, rangeSubLine, false); - if (positionInLine < rangeSubLine.end) { - return SelectionPosition(pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1)); - } - const XYPOSITION spaceWidth = vs.styles[ll->EndLineStyle()].spaceWidth; - const int spaceOffset = static_cast( - (x + subLineStart - ll->positions[rangeSubLine.end] + spaceWidth / 2) / spaceWidth); - return SelectionPosition(rangeSubLine.end + posLineStart, spaceOffset); - } - return SelectionPosition(0); + return view.SPositionFromLineX(surface, *this, lineDoc, x, vs); } int Editor::PositionFromLineX(int lineDoc, int x) { return SPositionFromLineX(lineDoc, x).Position(); } +int Editor::LineFromLocation(Point pt) const { + return cs.DocFromDisplay(static_cast(pt.y) / vs.lineHeight + topLine); +} + +void Editor::SetTopLine(int topLineNew) { + if ((topLine != topLineNew) && (topLineNew >= 0)) { + topLine = topLineNew; + ContainerNeedsUpdate(SC_UPDATE_V_SCROLL); + } + posTopLine = pdoc->LineStart(cs.DocFromDisplay(topLine)); +} + /** * If painting then abandon the painting because a wider redraw is needed. * @return true if calling code should stop drawing. @@ -675,7 +485,7 @@ void Editor::RedrawSelMargin(int line, bool allAfter) { PRectangle rcSelMargin = GetClientRectangle(); rcSelMargin.right = rcSelMargin.left + vs.fixedColumnWidth; if (line != -1) { - PRectangle rcLine = RectangleFromRange(Range(pdoc->LineStart(line))); + PRectangle rcLine = RectangleFromRange(Range(pdoc->LineStart(line)), 0); // Inflate line rectangle if there are image markers with height larger than line height if (vs.largestMarkerHeight > vs.lineHeight) { @@ -705,25 +515,25 @@ void Editor::RedrawSelMargin(int line, bool allAfter) { } } -PRectangle Editor::RectangleFromRange(Range r) { +PRectangle Editor::RectangleFromRange(Range r, int overlap) { const int minLine = cs.DisplayFromDoc(pdoc->LineFromPosition(r.First())); const int maxLine = cs.DisplayLastFromDoc(pdoc->LineFromPosition(r.Last())); const PRectangle rcClientDrawing = GetClientDrawingRectangle(); PRectangle rc; const int leftTextOverlap = ((xOffset == 0) && (vs.leftMarginWidth > 0)) ? 1 : 0; rc.left = static_cast(vs.textStart - leftTextOverlap); - rc.top = static_cast((minLine - TopLineOfMain()) * vs.lineHeight); + rc.top = static_cast((minLine - TopLineOfMain()) * vs.lineHeight - overlap); if (rc.top < rcClientDrawing.top) rc.top = rcClientDrawing.top; // Extend to right of prepared area if any to prevent artifacts from caret line highlight rc.right = rcClientDrawing.right; - rc.bottom = static_cast((maxLine - TopLineOfMain() + 1) * vs.lineHeight); + rc.bottom = static_cast((maxLine - TopLineOfMain() + 1) * vs.lineHeight + overlap); return rc; } void Editor::InvalidateRange(int start, int end) { - RedrawRect(RectangleFromRange(Range(start, end))); + RedrawRect(RectangleFromRange(Range(start, end), view.LinesOverlap() ? vs.lineOverlap : 0)); } int Editor::CurrentPosition() const { @@ -819,7 +629,7 @@ void Editor::SetSelection(SelectionPosition currentPos_, SelectionPosition ancho SetRectangularRange(); ClaimSelection(); - if (highlightDelimiter.NeedsDrawing(currentLine)) { + if (marginView.highlightDelimiter.NeedsDrawing(currentLine)) { RedrawSelMargin(); } QueueIdleWork(WorkNeeded::workUpdateUI); @@ -846,7 +656,7 @@ void Editor::SetSelection(SelectionPosition currentPos_) { } ClaimSelection(); - if (highlightDelimiter.NeedsDrawing(currentLine)) { + if (marginView.highlightDelimiter.NeedsDrawing(currentLine)) { RedrawSelMargin(); } QueueIdleWork(WorkNeeded::workUpdateUI); @@ -867,7 +677,7 @@ void Editor::SetEmptySelection(SelectionPosition currentPos_) { SetRectangularRange(); ClaimSelection(); - if (highlightDelimiter.NeedsDrawing(currentLine)) { + if (marginView.highlightDelimiter.NeedsDrawing(currentLine)) { RedrawSelMargin(); } QueueIdleWork(WorkNeeded::workUpdateUI); @@ -977,7 +787,7 @@ int Editor::MovePositionTo(SelectionPosition newPos, Selection::selTypes selt, b } } - if (highlightDelimiter.NeedsDrawing(currentLine)) { + if (marginView.highlightDelimiter.NeedsDrawing(currentLine)) { RedrawSelMargin(); } return 0; @@ -1174,22 +984,8 @@ void Editor::MoveCaretInsideView(bool ensureVisible) { } int Editor::DisplayFromPosition(int pos) { - int lineDoc = pdoc->LineFromPosition(pos); - int lineDisplay = cs.DisplayFromDoc(lineDoc); AutoSurface surface(this); - AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); - if (surface && ll) { - LayoutLine(lineDoc, surface, vs, ll, wrapWidth); - unsigned int posLineStart = pdoc->LineStart(lineDoc); - int posInLine = pos - posLineStart; - lineDisplay--; // To make up for first increment ahead. - for (int subLine = 0; subLine < ll->lines; subLine++) { - if (posInLine >= ll->LineStart(subLine)) { - lineDisplay++; - } - } - } - return lineDisplay; + return view.DisplayFromPosition(surface, *this, pos, vs); } /** @@ -1451,7 +1247,7 @@ Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange &ran newXY.xOffset = static_cast(pt.x + xOffset - rcClient.left) - 2; } else if (pt.x + xOffset >= rcClient.right + newXY.xOffset) { newXY.xOffset = static_cast(pt.x + xOffset - rcClient.right) + 2; - if (vs.caretStyle == CARETSTYLE_BLOCK) { + if ((vs.caretStyle == CARETSTYLE_BLOCK) || view.imeCaretBlockOverride) { // Ensure we can see a good portion of the block caret newXY.xOffset += static_cast(vs.aveCharWidth); } @@ -1516,16 +1312,26 @@ void Editor::ShowCaretAtCurrentPosition() { if (hasFocus) { caret.active = true; caret.on = true; - SetTicking(true); + if (FineTickerAvailable()) { + FineTickerCancel(tickCaret); + if (caret.period > 0) + FineTickerStart(tickCaret, caret.period, caret.period/10); + } else { + SetTicking(true); + } } else { caret.active = false; caret.on = false; + if (FineTickerAvailable()) { + FineTickerCancel(tickCaret); + } } InvalidateCaret(); } void Editor::DropCaret() { caret.active = false; + FineTickerCancel(tickCaret); InvalidateCaret(); } @@ -1533,6 +1339,11 @@ void Editor::CaretSetPeriod(int period) { if (caret.period != period) { caret.period = period; caret.on = true; + if (FineTickerAvailable()) { + FineTickerCancel(tickCaret); + if ((caret.active) && (caret.period > 0)) + FineTickerStart(tickCaret, caret.period, caret.period/10); + } InvalidateCaret(); } } @@ -1558,7 +1369,7 @@ bool Editor::Wrapping() const { void Editor::NeedWrapping(int docLineStart, int docLineEnd) { //Platform::DebugPrintf("\nNeedWrapping: %0d..%0d\n", docLineStart, docLineEnd); if (wrapPending.AddRange(docLineStart, docLineEnd)) { - llc.Invalidate(LineLayout::llPositions); + view.llc.Invalidate(LineLayout::llPositions); } // Wrap lines during idle. if (Wrapping() && wrapPending.NeedsWrap()) { @@ -1567,10 +1378,10 @@ void Editor::NeedWrapping(int docLineStart, int docLineEnd) { } bool Editor::WrapOneLine(Surface *surface, int lineToWrap) { - AutoLineLayout ll(llc, RetrieveLineLayout(lineToWrap)); + AutoLineLayout ll(view.llc, view.RetrieveLineLayout(lineToWrap, *this)); int linesWrapped = 1; if (ll) { - LayoutLine(lineToWrap, surface, vs, ll, wrapWidth); + view.LayoutLine(*this, lineToWrap, surface, vs, ll, wrapWidth); linesWrapped = ll->lines; } return cs.SetHeight(lineToWrap, linesWrapped + @@ -1644,1785 +1455,152 @@ bool Editor::WrapLines(enum wrapScope ws) { if (surface) { //Platform::DebugPrintf("Wraplines: scope=%0d need=%0d..%0d perform=%0d..%0d\n", ws, wrapPending.start, wrapPending.end, lineToWrap, lineToWrapEnd); - while (lineToWrap < lineToWrapEnd) { - if (WrapOneLine(surface, lineToWrap)) { - wrapOccurred = true; - } - wrapPending.Wrapped(lineToWrap); - lineToWrap++; - } - - goodTopLine = cs.DisplayFromDoc(lineDocTop) + std::min(subLineTop, cs.GetHeight(lineDocTop)-1); - } - } - - // If wrapping is done, bring it to resting position - if (wrapPending.start >= lineEndNeedWrap) { - wrapPending.Reset(); - } - } - - if (wrapOccurred) { - SetScrollBars(); - SetTopLine(Platform::Clamp(goodTopLine, 0, MaxScrollPos())); - SetVerticalScrollPos(); - } - - return wrapOccurred; -} - -void Editor::LinesJoin() { - if (!RangeContainsProtected(targetStart, targetEnd)) { - UndoGroup ug(pdoc); - bool prevNonWS = true; - for (int pos = targetStart; pos < targetEnd; pos++) { - if (pdoc->IsPositionInLineEnd(pos)) { - targetEnd -= pdoc->LenChar(pos); - pdoc->DelChar(pos); - if (prevNonWS) { - // Ensure at least one space separating previous lines - const int lengthInserted = pdoc->InsertString(pos, " ", 1); - targetEnd += lengthInserted; - } - } else { - prevNonWS = pdoc->CharAt(pos) != ' '; - } - } - } -} - -const char *Editor::StringFromEOLMode(int eolMode) { - if (eolMode == SC_EOL_CRLF) { - return "\r\n"; - } else if (eolMode == SC_EOL_CR) { - return "\r"; - } else { - return "\n"; - } -} - -void Editor::LinesSplit(int pixelWidth) { - if (!RangeContainsProtected(targetStart, targetEnd)) { - if (pixelWidth == 0) { - PRectangle rcText = GetTextRectangle(); - pixelWidth = static_cast(rcText.Width()); - } - int lineStart = pdoc->LineFromPosition(targetStart); - int lineEnd = pdoc->LineFromPosition(targetEnd); - const char *eol = StringFromEOLMode(pdoc->eolMode); - UndoGroup ug(pdoc); - for (int line = lineStart; line <= lineEnd; line++) { - AutoSurface surface(this); - AutoLineLayout ll(llc, RetrieveLineLayout(line)); - if (surface && ll) { - unsigned int posLineStart = pdoc->LineStart(line); - LayoutLine(line, surface, vs, ll, pixelWidth); - int lengthInsertedTotal = 0; - for (int subLine = 1; subLine < ll->lines; subLine++) { - const int lengthInserted = pdoc->InsertString( - static_cast(posLineStart + lengthInsertedTotal + - ll->LineStart(subLine)), - eol, istrlen(eol)); - targetEnd += lengthInserted; - lengthInsertedTotal += lengthInserted; - } - } - lineEnd = pdoc->LineFromPosition(targetEnd); - } - } -} - -int Editor::SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) const { - if (vs.markers[markerCheck].markType == SC_MARK_EMPTY) - return markerDefault; - return markerCheck; -} - -bool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st) { - if (st.multipleStyles) { - for (size_t iStyle=0; iStyle(styles[endSegment+1]) == style)) - endSegment++; - FontAlias fontText = vs.styles[style + styleOffset].font; - width += static_cast(surface->WidthText(fontText, text + start, - static_cast(endSegment - start + 1))); - start = endSegment + 1; - } - return width; -} - -static int WidestLineWidth(Surface *surface, const ViewStyle &vs, int styleOffset, const StyledText &st) { - int widthMax = 0; - size_t start = 0; - while (start < st.length) { - size_t lenLine = st.LineLength(start); - int widthSubLine; - if (st.multipleStyles) { - widthSubLine = WidthStyledText(surface, vs, styleOffset, st.text + start, st.styles + start, lenLine); - } else { - FontAlias fontText = vs.styles[styleOffset + st.style].font; - widthSubLine = static_cast(surface->WidthText(fontText, - st.text + start, static_cast(lenLine))); - } - if (widthSubLine > widthMax) - widthMax = widthSubLine; - start += lenLine + 1; - } - return widthMax; -} - -static void DrawTextInStyle(Surface *surface, PRectangle rcText, const Style &style, XYPOSITION ybase, const char *s, size_t length) { - FontAlias fontText = style.font; - surface->DrawTextNoClip(rcText, fontText, ybase, s, static_cast(length), - style.fore, style.back); -} - -static void DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRectangle rcText, - const StyledText &st, size_t start, size_t length) { - - if (st.multipleStyles) { - int x = static_cast(rcText.left); - size_t i = 0; - while (i < length) { - size_t end = i; - size_t style = st.styles[i + start]; - while (end < length-1 && st.styles[start+end+1] == style) - end++; - style += styleOffset; - FontAlias fontText = vs.styles[style].font; - const int width = static_cast(surface->WidthText(fontText, - st.text + start + i, static_cast(end - i + 1))); - PRectangle rcSegment = rcText; - rcSegment.left = static_cast(x); - rcSegment.right = static_cast(x + width + 1); - DrawTextInStyle(surface, rcSegment, vs.styles[style], rcText.top + vs.maxAscent, - st.text + start + i, end - i + 1); - x += width; - i = end + 1; - } - } else { - const size_t style = st.style + styleOffset; - DrawTextInStyle(surface, rcText, vs.styles[style], rcText.top + vs.maxAscent, - st.text + start, length); - } -} - -void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { - if (vs.fixedColumnWidth == 0) - return; - - AllocateGraphics(); - RefreshStyleData(); - RefreshPixMaps(surfWindow); - - // On GTK+ with Ubuntu overlay scroll bars, the surface may have been finished - // at this point. The Initialised call checks for this case and sets the status - // to be bad which avoids crashes in following calls. - if (!surfWindow->Initialised()) { - return; - } - - PRectangle rcMargin = GetClientRectangle(); - Point ptOrigin = GetVisibleOriginInMain(); - rcMargin.Move(0, -ptOrigin.y); - rcMargin.left = 0; - rcMargin.right = static_cast(vs.fixedColumnWidth); - - if (!rc.Intersects(rcMargin)) - return; - - Surface *surface; - if (bufferedDraw) { - surface = pixmapSelMargin; - } else { - surface = surfWindow; - } - - // Clip vertically to paint area to avoid drawing line numbers - if (rcMargin.bottom > rc.bottom) - rcMargin.bottom = rc.bottom; - if (rcMargin.top < rc.top) - rcMargin.top = rc.top; - - PRectangle rcSelMargin = rcMargin; - rcSelMargin.right = rcMargin.left; - if (rcSelMargin.bottom < rc.bottom) - rcSelMargin.bottom = rc.bottom; - - for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) { - if (vs.ms[margin].width > 0) { - - rcSelMargin.left = rcSelMargin.right; - rcSelMargin.right = rcSelMargin.left + vs.ms[margin].width; - - if (vs.ms[margin].style != SC_MARGIN_NUMBER) { - if (vs.ms[margin].mask & SC_MASK_FOLDERS) { - // Required because of special way brush is created for selection margin - // Ensure patterns line up when scrolling with separate margin view - // by choosing correctly aligned variant. - bool invertPhase = static_cast(ptOrigin.y) & 1; - surface->FillRectangle(rcSelMargin, - invertPhase ? *pixmapSelPattern : *pixmapSelPatternOffset1); - } else { - ColourDesired colour; - switch (vs.ms[margin].style) { - case SC_MARGIN_BACK: - colour = vs.styles[STYLE_DEFAULT].back; - break; - case SC_MARGIN_FORE: - colour = vs.styles[STYLE_DEFAULT].fore; - break; - default: - colour = vs.styles[STYLE_LINENUMBER].back; - break; - } - surface->FillRectangle(rcSelMargin, colour); - } - } else { - surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back); - } - - const int lineStartPaint = static_cast(rcMargin.top + ptOrigin.y) / vs.lineHeight; - int visibleLine = TopLineOfMain() + lineStartPaint; - int yposScreen = lineStartPaint * vs.lineHeight - static_cast(ptOrigin.y); - // Work out whether the top line is whitespace located after a - // lessening of fold level which implies a 'fold tail' but which should not - // be displayed until the last of a sequence of whitespace. - bool needWhiteClosure = false; - if (vs.ms[margin].mask & SC_MASK_FOLDERS) { - int level = pdoc->GetLevel(cs.DocFromDisplay(visibleLine)); - if (level & SC_FOLDLEVELWHITEFLAG) { - int lineBack = cs.DocFromDisplay(visibleLine); - int levelPrev = level; - while ((lineBack > 0) && (levelPrev & SC_FOLDLEVELWHITEFLAG)) { - lineBack--; - levelPrev = pdoc->GetLevel(lineBack); - } - if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) { - if ((level & SC_FOLDLEVELNUMBERMASK) < (levelPrev & SC_FOLDLEVELNUMBERMASK)) - needWhiteClosure = true; - } - } - if (highlightDelimiter.isEnabled) { - int lastLine = cs.DocFromDisplay(topLine + LinesOnScreen()) + 1; - pdoc->GetHighlightDelimiters(highlightDelimiter, pdoc->LineFromPosition(CurrentPosition()), lastLine); - } - } - - // Old code does not know about new markers needed to distinguish all cases - const int folderOpenMid = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEROPENMID, - SC_MARKNUM_FOLDEROPEN); - const int folderEnd = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEREND, - SC_MARKNUM_FOLDER); - - while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rc.bottom) { - - PLATFORM_ASSERT(visibleLine < cs.LinesDisplayed()); - const int lineDoc = cs.DocFromDisplay(visibleLine); - PLATFORM_ASSERT(cs.GetVisible(lineDoc)); - const bool firstSubLine = visibleLine == cs.DisplayFromDoc(lineDoc); - const bool lastSubLine = visibleLine == cs.DisplayLastFromDoc(lineDoc); - - int marks = pdoc->GetMark(lineDoc); - if (!firstSubLine) - marks = 0; - - bool headWithTail = false; - - if (vs.ms[margin].mask & SC_MASK_FOLDERS) { - // Decide which fold indicator should be displayed - const int level = pdoc->GetLevel(lineDoc); - const int levelNext = pdoc->GetLevel(lineDoc + 1); - const int levelNum = level & SC_FOLDLEVELNUMBERMASK; - const int levelNextNum = levelNext & SC_FOLDLEVELNUMBERMASK; - if (level & SC_FOLDLEVELHEADERFLAG) { - if (firstSubLine) { - if (levelNum < levelNextNum) { - if (cs.GetExpanded(lineDoc)) { - if (levelNum == SC_FOLDLEVELBASE) - marks |= 1 << SC_MARKNUM_FOLDEROPEN; - else - marks |= 1 << folderOpenMid; - } else { - if (levelNum == SC_FOLDLEVELBASE) - marks |= 1 << SC_MARKNUM_FOLDER; - else - marks |= 1 << folderEnd; - } - } else if (levelNum > SC_FOLDLEVELBASE) { - marks |= 1 << SC_MARKNUM_FOLDERSUB; - } - } else { - if (levelNum < levelNextNum) { - if (cs.GetExpanded(lineDoc)) { - marks |= 1 << SC_MARKNUM_FOLDERSUB; - } else if (levelNum > SC_FOLDLEVELBASE) { - marks |= 1 << SC_MARKNUM_FOLDERSUB; - } - } else if (levelNum > SC_FOLDLEVELBASE) { - marks |= 1 << SC_MARKNUM_FOLDERSUB; - } - } - needWhiteClosure = false; - const int firstFollowupLine = cs.DocFromDisplay(cs.DisplayFromDoc(lineDoc + 1)); - const int firstFollowupLineLevel = pdoc->GetLevel(firstFollowupLine); - const int secondFollowupLineLevelNum = pdoc->GetLevel(firstFollowupLine + 1) & SC_FOLDLEVELNUMBERMASK; - if (!cs.GetExpanded(lineDoc)) { - if ((firstFollowupLineLevel & SC_FOLDLEVELWHITEFLAG) && - (levelNum > secondFollowupLineLevelNum)) - needWhiteClosure = true; - - if (highlightDelimiter.IsFoldBlockHighlighted(firstFollowupLine)) - headWithTail = true; - } - } else if (level & SC_FOLDLEVELWHITEFLAG) { - if (needWhiteClosure) { - if (levelNext & SC_FOLDLEVELWHITEFLAG) { - marks |= 1 << SC_MARKNUM_FOLDERSUB; - } else if (levelNextNum > SC_FOLDLEVELBASE) { - marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; - needWhiteClosure = false; - } else { - marks |= 1 << SC_MARKNUM_FOLDERTAIL; - needWhiteClosure = false; - } - } else if (levelNum > SC_FOLDLEVELBASE) { - if (levelNextNum < levelNum) { - if (levelNextNum > SC_FOLDLEVELBASE) { - marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; - } else { - marks |= 1 << SC_MARKNUM_FOLDERTAIL; - } - } else { - marks |= 1 << SC_MARKNUM_FOLDERSUB; - } - } - } else if (levelNum > SC_FOLDLEVELBASE) { - if (levelNextNum < levelNum) { - needWhiteClosure = false; - if (levelNext & SC_FOLDLEVELWHITEFLAG) { - marks |= 1 << SC_MARKNUM_FOLDERSUB; - needWhiteClosure = true; - } else if (lastSubLine) { - if (levelNextNum > SC_FOLDLEVELBASE) { - marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; - } else { - marks |= 1 << SC_MARKNUM_FOLDERTAIL; - } - } else { - marks |= 1 << SC_MARKNUM_FOLDERSUB; - } - } else { - marks |= 1 << SC_MARKNUM_FOLDERSUB; - } - } - } - - marks &= vs.ms[margin].mask; - - PRectangle rcMarker = rcSelMargin; - rcMarker.top = static_cast(yposScreen); - rcMarker.bottom = static_cast(yposScreen + vs.lineHeight); - if (vs.ms[margin].style == SC_MARGIN_NUMBER) { - if (firstSubLine) { - char number[100] = ""; - if (lineDoc >= 0) - sprintf(number, "%d", lineDoc + 1); - if (foldFlags & (SC_FOLDFLAG_LEVELNUMBERS | SC_FOLDFLAG_LINESTATE)) { - if (foldFlags & SC_FOLDFLAG_LEVELNUMBERS) { - int lev = pdoc->GetLevel(lineDoc); - sprintf(number, "%c%c %03X %03X", - (lev & SC_FOLDLEVELHEADERFLAG) ? 'H' : '_', - (lev & SC_FOLDLEVELWHITEFLAG) ? 'W' : '_', - lev & SC_FOLDLEVELNUMBERMASK, - lev >> 16 - ); - } else { - int state = pdoc->GetLineState(lineDoc); - sprintf(number, "%0X", state); - } - } - PRectangle rcNumber = rcMarker; - // Right justify - XYPOSITION width = surface->WidthText(vs.styles[STYLE_LINENUMBER].font, number, istrlen(number)); - XYPOSITION xpos = rcNumber.right - width - vs.marginNumberPadding; - rcNumber.left = xpos; - DrawTextInStyle(surface, rcNumber, vs.styles[STYLE_LINENUMBER], - rcNumber.top + vs.maxAscent, number, strlen(number)); - } else if (vs.wrapVisualFlags & SC_WRAPVISUALFLAG_MARGIN) { - PRectangle rcWrapMarker = rcMarker; - rcWrapMarker.right -= 3; - rcWrapMarker.left = rcWrapMarker.right - vs.styles[STYLE_LINENUMBER].aveCharWidth; - DrawWrapMarker(surface, rcWrapMarker, false, vs.styles[STYLE_LINENUMBER].fore); - } - } else if (vs.ms[margin].style == SC_MARGIN_TEXT || vs.ms[margin].style == SC_MARGIN_RTEXT) { - if (firstSubLine) { - const StyledText stMargin = pdoc->MarginStyledText(lineDoc); - if (stMargin.text && ValidStyledText(vs, vs.marginStyleOffset, stMargin)) { - surface->FillRectangle(rcMarker, - vs.styles[stMargin.StyleAt(0)+vs.marginStyleOffset].back); - if (vs.ms[margin].style == SC_MARGIN_RTEXT) { - int width = WidestLineWidth(surface, vs, vs.marginStyleOffset, stMargin); - rcMarker.left = rcMarker.right - width - 3; - } - DrawStyledText(surface, vs, vs.marginStyleOffset, rcMarker, - stMargin, 0, stMargin.length); - } - } - } - - if (marks) { - for (int markBit = 0; (markBit < 32) && marks; markBit++) { - if (marks & 1) { - LineMarker::typeOfFold tFold = LineMarker::undefined; - if ((vs.ms[margin].mask & SC_MASK_FOLDERS) && highlightDelimiter.IsFoldBlockHighlighted(lineDoc)) { - if (highlightDelimiter.IsBodyOfFoldBlock(lineDoc)) { - tFold = LineMarker::body; - } else if (highlightDelimiter.IsHeadOfFoldBlock(lineDoc)) { - if (firstSubLine) { - tFold = headWithTail ? LineMarker::headWithTail : LineMarker::head; - } else { - if (cs.GetExpanded(lineDoc) || headWithTail) { - tFold = LineMarker::body; - } else { - tFold = LineMarker::undefined; - } - } - } else if (highlightDelimiter.IsTailOfFoldBlock(lineDoc)) { - tFold = LineMarker::tail; - } - } - vs.markers[markBit].Draw(surface, rcMarker, vs.styles[STYLE_LINENUMBER].font, tFold, vs.ms[margin].style); - } - marks >>= 1; - } - } - - visibleLine++; - yposScreen += vs.lineHeight; - } - } - } - - PRectangle rcBlankMargin = rcMargin; - rcBlankMargin.left = rcSelMargin.right; - surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back); - - if (bufferedDraw) { - surfWindow->Copy(rcMargin, Point(rcMargin.left, rcMargin.top), *pixmapSelMargin); - } -} - -void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid) { - int ydiff = static_cast(rcTab.bottom - rcTab.top) / 2; - int xhead = static_cast(rcTab.right) - 1 - ydiff; - if (xhead <= rcTab.left) { - ydiff -= static_cast(rcTab.left) - xhead - 1; - xhead = static_cast(rcTab.left) - 1; - } - if ((rcTab.left + 2) < (rcTab.right - 1)) - surface->MoveTo(static_cast(rcTab.left) + 2, ymid); - else - surface->MoveTo(static_cast(rcTab.right) - 1, ymid); - surface->LineTo(static_cast(rcTab.right) - 1, ymid); - surface->LineTo(xhead, ymid - ydiff); - surface->MoveTo(static_cast(rcTab.right) - 1, ymid); - surface->LineTo(xhead, ymid + ydiff); -} - -LineLayout *Editor::RetrieveLineLayout(int lineNumber) { - int posLineStart = pdoc->LineStart(lineNumber); - int posLineEnd = pdoc->LineStart(lineNumber + 1); - PLATFORM_ASSERT(posLineEnd >= posLineStart); - int lineCaret = pdoc->LineFromPosition(sel.MainCaret()); - return llc.Retrieve(lineNumber, lineCaret, - posLineEnd - posLineStart, pdoc->GetStyleClock(), - LinesOnScreen() + 1, pdoc->LinesTotal()); -} - -/** - * Fill in the LineLayout data for the given line. - * Copy the given @a line and its styles from the document into local arrays. - * Also determine the x position at which each character starts. - */ -void Editor::LayoutLine(int line, Surface *surface, const ViewStyle &vstyle, LineLayout *ll, int width) { - if (!ll) - return; - - PLATFORM_ASSERT(line < pdoc->LinesTotal()); - PLATFORM_ASSERT(ll->chars != NULL); - int posLineStart = pdoc->LineStart(line); - int posLineEnd = pdoc->LineStart(line + 1); - // If the line is very long, limit the treatment to a length that should fit in the viewport - if (posLineEnd > (posLineStart + ll->maxLineLength)) { - posLineEnd = posLineStart + ll->maxLineLength; - } - if (ll->validity == LineLayout::llCheckTextAndStyle) { - int lineLength = posLineEnd - posLineStart; - if (!vstyle.viewEOL) { - lineLength = pdoc->LineEnd(line) - posLineStart; - } - if (lineLength == ll->numCharsInLine) { - // See if chars, styles, indicators, are all the same - bool allSame = true; - // Check base line layout - char styleByte = 0; - int numCharsInLine = 0; - while (numCharsInLine < lineLength) { - int charInDoc = numCharsInLine + posLineStart; - char chDoc = pdoc->CharAt(charInDoc); - styleByte = pdoc->StyleAt(charInDoc); - allSame = allSame && - (ll->styles[numCharsInLine] == static_cast(styleByte)); - if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseMixed) - allSame = allSame && - (ll->chars[numCharsInLine] == chDoc); - else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) - allSame = allSame && - (ll->chars[numCharsInLine] == static_cast(tolower(chDoc))); - else // Style::caseUpper - allSame = allSame && - (ll->chars[numCharsInLine] == static_cast(toupper(chDoc))); - numCharsInLine++; - } - allSame = allSame && (ll->styles[numCharsInLine] == styleByte); // For eolFilled - if (allSame) { - ll->validity = LineLayout::llPositions; - } else { - ll->validity = LineLayout::llInvalid; - } - } else { - ll->validity = LineLayout::llInvalid; - } - } - if (ll->validity == LineLayout::llInvalid) { - ll->widthLine = LineLayout::wrapWidthInfinite; - ll->lines = 1; - if (vstyle.edgeState == EDGE_BACKGROUND) { - ll->edgeColumn = pdoc->FindColumn(line, vstyle.theEdge); - if (ll->edgeColumn >= posLineStart) { - ll->edgeColumn -= posLineStart; - } - } else { - ll->edgeColumn = -1; - } - - // Fill base line layout - const int lineLength = posLineEnd - posLineStart; - pdoc->GetCharRange(ll->chars, posLineStart, lineLength); - pdoc->GetStyleRange(ll->styles, posLineStart, lineLength); - int numCharsBeforeEOL = pdoc->LineEnd(line) - posLineStart; - const int numCharsInLine = (vstyle.viewEOL) ? lineLength : numCharsBeforeEOL; - for (int styleInLine = 0; styleInLine < numCharsInLine; styleInLine++) { - const unsigned char styleByte = ll->styles[styleInLine]; - ll->styles[styleInLine] = styleByte; - } - const unsigned char styleByteLast = (lineLength > 0) ? ll->styles[lineLength-1] : 0; - if (vstyle.someStylesForceCase) { - for (int charInLine = 0; charInLinechars[charInLine]; - if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseUpper) - ll->chars[charInLine] = static_cast(toupper(chDoc)); - else if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseLower) - ll->chars[charInLine] = static_cast(tolower(chDoc)); - } - } - ll->xHighlightGuide = 0; - // Extra element at the end of the line to hold end x position and act as - ll->chars[numCharsInLine] = 0; // Also triggers processing in the loops as this is a control character - ll->styles[numCharsInLine] = styleByteLast; // For eolFilled - - // Layout the line, determining the position of each character, - // with an extra element at the end for the end of the line. - ll->positions[0] = 0; - bool lastSegItalics = false; - - BreakFinder bfLayout(ll, NULL, 0, numCharsInLine, posLineStart, 0, false, pdoc, &reprs); - while (bfLayout.More()) { - - const TextSegment ts = bfLayout.Next(); - - std::fill(&ll->positions[ts.start+1], &ll->positions[ts.end()+1], 0.0f); - if (vstyle.styles[ll->styles[ts.start]].visible) { - if (ts.representation) { - XYPOSITION representationWidth = vstyle.controlCharWidth; - if (ll->chars[ts.start] == '\t') { - // Tab is a special case of representation, taking a variable amount of space - representationWidth = - ((static_cast((ll->positions[ts.start] + 2) / vstyle.tabWidth) + 1) * vstyle.tabWidth) - ll->positions[ts.start]; - } else { - if (representationWidth <= 0.0) { - XYPOSITION positionsRepr[256]; // Should expand when needed - posCache.MeasureWidths(surface, vstyle, STYLE_CONTROLCHAR, ts.representation->stringRep.c_str(), - static_cast(ts.representation->stringRep.length()), positionsRepr, pdoc); - representationWidth = positionsRepr[ts.representation->stringRep.length()-1] + vstyle.ctrlCharPadding; - } - } - for (int ii=0; ii < ts.length; ii++) - ll->positions[ts.start + 1 + ii] = representationWidth; - } else { - if ((ts.length == 1) && (' ' == ll->chars[ts.start])) { - // Over half the segments are single characters and of these about half are space characters. - ll->positions[ts.start + 1] = vstyle.styles[ll->styles[ts.start]].spaceWidth; - } else { - posCache.MeasureWidths(surface, vstyle, ll->styles[ts.start], ll->chars + ts.start, - ts.length, ll->positions + ts.start + 1, pdoc); - } - } - lastSegItalics = (!ts.representation) && ((ll->chars[ts.end()-1] != ' ') && vstyle.styles[ll->styles[ts.start]].italic); - } - - for (int posToIncrease = ts.start+1; posToIncrease <= ts.end(); posToIncrease++) { - ll->positions[posToIncrease] += ll->positions[ts.start]; - } - } - - // Small hack to make lines that end with italics not cut off the edge of the last character - if (lastSegItalics) { - ll->positions[numCharsInLine] += vstyle.lastSegItalicsOffset; - } - ll->numCharsInLine = numCharsInLine; - ll->numCharsBeforeEOL = numCharsBeforeEOL; - ll->validity = LineLayout::llPositions; - } - // Hard to cope when too narrow, so just assume there is space - if (width < 20) { - width = 20; - } - if ((ll->validity == LineLayout::llPositions) || (ll->widthLine != width)) { - ll->widthLine = width; - if (width == LineLayout::wrapWidthInfinite) { - ll->lines = 1; - } else if (width > ll->positions[ll->numCharsInLine]) { - // Simple common case where line does not need wrapping. - ll->lines = 1; - } else { - if (vstyle.wrapVisualFlags & SC_WRAPVISUALFLAG_END) { - width -= static_cast(vstyle.aveCharWidth); // take into account the space for end wrap mark - } - XYPOSITION wrapAddIndent = 0; // This will be added to initial indent of line - if (vstyle.wrapIndentMode == SC_WRAPINDENT_INDENT) { - wrapAddIndent = pdoc->IndentSize() * vstyle.spaceWidth; - } else if (vstyle.wrapIndentMode == SC_WRAPINDENT_FIXED) { - wrapAddIndent = vstyle.wrapVisualStartIndent * vstyle.aveCharWidth; - } - ll->wrapIndent = wrapAddIndent; - if (vstyle.wrapIndentMode != SC_WRAPINDENT_FIXED) - for (int i = 0; i < ll->numCharsInLine; i++) { - if (!IsSpaceOrTab(ll->chars[i])) { - ll->wrapIndent += ll->positions[i]; // Add line indent - break; - } - } - // Check for text width minimum - if (ll->wrapIndent > width - static_cast(vstyle.aveCharWidth) * 15) - ll->wrapIndent = wrapAddIndent; - // Check for wrapIndent minimum - if ((vstyle.wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (ll->wrapIndent < vstyle.aveCharWidth)) - ll->wrapIndent = vstyle.aveCharWidth; // Indent to show start visual - ll->lines = 0; - // Calculate line start positions based upon width. - int lastGoodBreak = 0; - int lastLineStart = 0; - XYACCUMULATOR startOffset = 0; - int p = 0; - while (p < ll->numCharsInLine) { - if ((ll->positions[p + 1] - startOffset) >= width) { - if (lastGoodBreak == lastLineStart) { - // Try moving to start of last character - if (p > 0) { - lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1) - - posLineStart; - } - if (lastGoodBreak == lastLineStart) { - // Ensure at least one character on line. - lastGoodBreak = pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart + 1, 1) - - posLineStart; - } - } - lastLineStart = lastGoodBreak; - ll->lines++; - ll->SetLineStart(ll->lines, lastGoodBreak); - startOffset = ll->positions[lastGoodBreak]; - // take into account the space for start wrap mark and indent - startOffset -= ll->wrapIndent; - p = lastGoodBreak + 1; - continue; - } - if (p > 0) { - if (vstyle.wrapState == eWrapChar) { - lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1) - - posLineStart; - p = pdoc->MovePositionOutsideChar(p + 1 + posLineStart, 1) - posLineStart; - continue; - } else if ((vstyle.wrapState == eWrapWord) && (ll->styles[p] != ll->styles[p - 1])) { - lastGoodBreak = p; - } else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) { - lastGoodBreak = p; - } - } - p++; - } - ll->lines++; - } - ll->validity = LineLayout::llLines; - } -} - -ColourDesired Editor::SelectionBackground(const ViewStyle &vsDraw, bool main) const { - return main ? - (primarySelection ? vsDraw.selColours.back : vsDraw.selBackground2) : - vsDraw.selAdditionalBackground; -} - -ColourDesired Editor::TextBackground(const ViewStyle &vsDraw, - ColourOptional background, int inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) const { - if (inSelection == 1) { - if (vsDraw.selColours.back.isSet && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { - return SelectionBackground(vsDraw, true); - } - } else if (inSelection == 2) { - if (vsDraw.selColours.back.isSet && (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA)) { - return SelectionBackground(vsDraw, false); - } - } else { - if ((vsDraw.edgeState == EDGE_BACKGROUND) && - (i >= ll->edgeColumn) && - (i < ll->numCharsBeforeEOL)) - return vsDraw.edgecolour; - if (inHotspot && vsDraw.hotspotColours.back.isSet) - return vsDraw.hotspotColours.back; - } - if (background.isSet && (styleMain != STYLE_BRACELIGHT) && (styleMain != STYLE_BRACEBAD)) { - return background; - } else { - return vsDraw.styles[styleMain].back; - } -} - -void Editor::DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight) { - Point from = Point::FromInts(0, ((lineVisible & 1) && (lineHeight & 1)) ? 1 : 0); - PRectangle rcCopyArea = PRectangle::FromInts(start + 1, static_cast(rcSegment.top), start + 2, static_cast(rcSegment.bottom)); - surface->Copy(rcCopyArea, from, - highlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide); -} - -void Editor::DrawWrapMarker(Surface *surface, PRectangle rcPlace, - bool isEndMarker, ColourDesired wrapColour) { - surface->PenColour(wrapColour); - - enum { xa = 1 }; // gap before start - int w = static_cast(rcPlace.right - rcPlace.left) - xa - 1; - - bool xStraight = isEndMarker; // x-mirrored symbol for start marker - - int x0 = static_cast(xStraight ? rcPlace.left : rcPlace.right - 1); - int y0 = static_cast(rcPlace.top); - - int dy = static_cast(rcPlace.bottom - rcPlace.top) / 5; - int y = static_cast(rcPlace.bottom - rcPlace.top) / 2 + dy; - - struct Relative { - Surface *surface; - int xBase; - int xDir; - int yBase; - int yDir; - void MoveTo(int xRelative, int yRelative) { - surface->MoveTo(xBase + xDir * xRelative, yBase + yDir * yRelative); - } - void LineTo(int xRelative, int yRelative) { - surface->LineTo(xBase + xDir * xRelative, yBase + yDir * yRelative); - } - }; - Relative rel = {surface, x0, xStraight ? 1 : -1, y0, 1}; - - // arrow head - rel.MoveTo(xa, y); - rel.LineTo(xa + 2*w / 3, y - dy); - rel.MoveTo(xa, y); - rel.LineTo(xa + 2*w / 3, y + dy); - - // arrow body - rel.MoveTo(xa, y); - rel.LineTo(xa + w, y); - rel.LineTo(xa + w, y - 2 * dy); - rel.LineTo(xa - 1, // on windows lineto is exclusive endpoint, perhaps GTK not... - y - 2 * dy); -} - -static void SimpleAlphaRectangle(Surface *surface, PRectangle rc, ColourDesired fill, int alpha) { - if (alpha != SC_ALPHA_NOALPHA) { - surface->AlphaRectangle(rc, 0, fill, alpha, fill, alpha, 0); - } -} - -void DrawTextBlob(Surface *surface, const ViewStyle &vsDraw, PRectangle rcSegment, - const char *s, ColourDesired textBack, ColourDesired textFore, bool twoPhaseDraw) { - if (!twoPhaseDraw) { - surface->FillRectangle(rcSegment, textBack); - } - FontAlias ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; - int normalCharHeight = static_cast(surface->Ascent(ctrlCharsFont) - - surface->InternalLeading(ctrlCharsFont)); - PRectangle rcCChar = rcSegment; - rcCChar.left = rcCChar.left + 1; - rcCChar.top = rcSegment.top + vsDraw.maxAscent - normalCharHeight; - rcCChar.bottom = rcSegment.top + vsDraw.maxAscent + 1; - PRectangle rcCentral = rcCChar; - rcCentral.top++; - rcCentral.bottom--; - surface->FillRectangle(rcCentral, textFore); - PRectangle rcChar = rcCChar; - rcChar.left++; - rcChar.right--; - surface->DrawTextClipped(rcChar, ctrlCharsFont, - rcSegment.top + vsDraw.maxAscent, s, istrlen(s), - textBack, textFore); -} - -void Editor::DrawEOL(Surface *surface, const ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, - int line, int lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart, - ColourOptional background) { - - const int posLineStart = pdoc->LineStart(line); - PRectangle rcSegment = rcLine; - - const bool lastSubLine = subLine == (ll->lines - 1); - XYPOSITION virtualSpace = 0; - if (lastSubLine) { - const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; - virtualSpace = sel.VirtualSpaceFor(pdoc->LineEnd(line)) * spaceWidth; - } - XYPOSITION xEol = static_cast(ll->positions[lineEnd] - subLineStart); - - // Fill the virtual space and show selections within it - if (virtualSpace) { - rcSegment.left = xEol + xStart; - rcSegment.right = xEol + xStart + virtualSpace; - surface->FillRectangle(rcSegment, background.isSet ? background : vsDraw.styles[ll->styles[ll->numCharsInLine]].back); - if (!hideSelection && ((vsDraw.selAlpha == SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA))) { - SelectionSegment virtualSpaceRange(SelectionPosition(pdoc->LineEnd(line)), SelectionPosition(pdoc->LineEnd(line), sel.VirtualSpaceFor(pdoc->LineEnd(line)))); - for (size_t r=0; rEndLineStyle()].spaceWidth; - rcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] - - static_cast(subLineStart) + portion.start.VirtualSpace() * spaceWidth; - rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - - static_cast(subLineStart) + portion.end.VirtualSpace() * spaceWidth; - rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; - rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; - surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, r == sel.Main())); - } - } - } - } - } - - int eolInSelection = 0; - int alpha = SC_ALPHA_NOALPHA; - if (!hideSelection) { - int posAfterLineEnd = pdoc->LineStart(line + 1); - eolInSelection = (subLine == (ll->lines - 1)) ? sel.InSelectionForEOL(posAfterLineEnd) : 0; - alpha = (eolInSelection == 1) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; - } - - // Draw the [CR], [LF], or [CR][LF] blobs if visible line ends are on - XYPOSITION blobsWidth = 0; - if (lastSubLine) { - for (int eolPos=ll->numCharsBeforeEOL; eolPosnumCharsInLine; eolPos++) { - rcSegment.left = xStart + ll->positions[eolPos] - static_cast(subLineStart) + virtualSpace; - rcSegment.right = xStart + ll->positions[eolPos + 1] - static_cast(subLineStart) + virtualSpace; - blobsWidth += rcSegment.Width(); - char hexits[4]; - const char *ctrlChar; - unsigned char chEOL = ll->chars[eolPos]; - int styleMain = ll->styles[eolPos]; - ColourDesired textBack = TextBackground(vsDraw, background, eolInSelection, false, styleMain, eolPos, ll); - if (UTF8IsAscii(chEOL)) { - ctrlChar = ControlCharacterString(chEOL); - } else { - const Representation *repr = reprs.RepresentationFromCharacter(ll->chars + eolPos, ll->numCharsInLine - eolPos); - if (repr) { - ctrlChar = repr->stringRep.c_str(); - eolPos = ll->numCharsInLine; - } else { - sprintf(hexits, "x%2X", chEOL); - ctrlChar = hexits; - } - } - ColourDesired textFore = vsDraw.styles[styleMain].fore; - if (eolInSelection && vsDraw.selColours.fore.isSet) { - textFore = (eolInSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground; - } - if (eolInSelection && vsDraw.selColours.back.isSet && (line < pdoc->LinesTotal() - 1)) { - if (alpha == SC_ALPHA_NOALPHA) { - surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1)); - } else { - surface->FillRectangle(rcSegment, textBack); - } - } else { - surface->FillRectangle(rcSegment, textBack); - } - DrawTextBlob(surface, vsDraw, rcSegment, ctrlChar, textBack, textFore, twoPhaseDraw); - if (eolInSelection && vsDraw.selColours.back.isSet && (line < pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { - SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1), alpha); - } - } - } - - // Draw the eol-is-selected rectangle - rcSegment.left = xEol + xStart + virtualSpace + blobsWidth; - rcSegment.right = rcSegment.left + vsDraw.aveCharWidth; - - if (eolInSelection && vsDraw.selColours.back.isSet && (line < pdoc->LinesTotal() - 1) && (alpha == SC_ALPHA_NOALPHA)) { - surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1)); - } else { - if (background.isSet) { - surface->FillRectangle(rcSegment, background); - } else if (line < pdoc->LinesTotal() - 1) { - surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); - } else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) { - surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); - } else { - surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back); - } - if (eolInSelection && vsDraw.selColours.back.isSet && (line < pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { - SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1), alpha); - } - } - - // Fill the remainder of the line - rcSegment.left = rcSegment.right; - if (rcSegment.left < rcLine.left) - rcSegment.left = rcLine.left; - rcSegment.right = rcLine.right; - - if (eolInSelection && vsDraw.selEOLFilled && vsDraw.selColours.back.isSet && (line < pdoc->LinesTotal() - 1) && (alpha == SC_ALPHA_NOALPHA)) { - surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1)); - } else { - if (background.isSet) { - surface->FillRectangle(rcSegment, background); - } else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) { - surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); - } else { - surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back); - } - if (eolInSelection && vsDraw.selEOLFilled && vsDraw.selColours.back.isSet && (line < pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { - SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1), alpha); - } - } - - bool drawWrapMarkEnd = false; - - if (vsDraw.wrapVisualFlags & SC_WRAPVISUALFLAG_END) { - if (subLine + 1 < ll->lines) { - drawWrapMarkEnd = ll->LineStart(subLine + 1) != 0; - } - } - - if (drawWrapMarkEnd) { - PRectangle rcPlace = rcSegment; - - if (vsDraw.wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_END_BY_TEXT) { - rcPlace.left = xEol + xStart + virtualSpace; - rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; - } else { - // rcLine is clipped to text area - rcPlace.right = rcLine.right; - rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; - } - DrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour()); - } -} - -void Editor::DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, const ViewStyle &vsDraw, - int xStart, PRectangle rcLine, LineLayout *ll, int subLine) { - const XYPOSITION subLineStart = ll->positions[ll->LineStart(subLine)]; - PRectangle rcIndic( - ll->positions[startPos] + xStart - subLineStart, - rcLine.top + vsDraw.maxAscent, - ll->positions[endPos] + xStart - subLineStart, - rcLine.top + vsDraw.maxAscent + 3); - vsDraw.indicators[indicNum].Draw(surface, rcIndic, rcLine); -} - -void Editor::DrawIndicators(Surface *surface, const ViewStyle &vsDraw, int line, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine, int lineEnd, bool under) { - // Draw decorators - const int posLineStart = pdoc->LineStart(line); - const int lineStart = ll->LineStart(subLine); - const int posLineEnd = posLineStart + lineEnd; - - for (Decoration *deco = pdoc->decorations.root; deco; deco = deco->next) { - if (under == vsDraw.indicators[deco->indicator].under) { - int startPos = posLineStart + lineStart; - if (!deco->rs.ValueAt(startPos)) { - startPos = deco->rs.EndRun(startPos); - } - while ((startPos < posLineEnd) && (deco->rs.ValueAt(startPos))) { - int endPos = deco->rs.EndRun(startPos); - if (endPos > posLineEnd) - endPos = posLineEnd; - DrawIndicator(deco->indicator, startPos - posLineStart, endPos - posLineStart, - surface, vsDraw, xStart, rcLine, ll, subLine); - startPos = endPos; - if (!deco->rs.ValueAt(startPos)) { - startPos = deco->rs.EndRun(startPos); - } - } - } - } - - // Use indicators to highlight matching braces - if ((vsDraw.braceHighlightIndicatorSet && (bracesMatchStyle == STYLE_BRACELIGHT)) || - (vsDraw.braceBadLightIndicatorSet && (bracesMatchStyle == STYLE_BRACEBAD))) { - int braceIndicator = (bracesMatchStyle == STYLE_BRACELIGHT) ? vsDraw.braceHighlightIndicator : vsDraw.braceBadLightIndicator; - if (under == vsDraw.indicators[braceIndicator].under) { - Range rangeLine(posLineStart + lineStart, posLineEnd); - if (rangeLine.ContainsCharacter(braces[0])) { - int braceOffset = braces[0] - posLineStart; - if (braceOffset < ll->numCharsInLine) { - DrawIndicator(braceIndicator, braceOffset, braceOffset + 1, surface, vsDraw, xStart, rcLine, ll, subLine); - } - } - if (rangeLine.ContainsCharacter(braces[1])) { - int braceOffset = braces[1] - posLineStart; - if (braceOffset < ll->numCharsInLine) { - DrawIndicator(braceIndicator, braceOffset, braceOffset + 1, surface, vsDraw, xStart, rcLine, ll, subLine); - } - } - } - } -} - -void Editor::DrawAnnotation(Surface *surface, const ViewStyle &vsDraw, int line, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine) { - int indent = static_cast(pdoc->GetLineIndentation(line) * vsDraw.spaceWidth); - PRectangle rcSegment = rcLine; - int annotationLine = subLine - ll->lines; - const StyledText stAnnotation = pdoc->AnnotationStyledText(line); - if (stAnnotation.text && ValidStyledText(vsDraw, vsDraw.annotationStyleOffset, stAnnotation)) { - surface->FillRectangle(rcSegment, vsDraw.styles[0].back); - rcSegment.left = static_cast(xStart); - if (trackLineWidth || (vsDraw.annotationVisible == ANNOTATION_BOXED)) { - // Only care about calculating width if tracking or need to draw box - int widthAnnotation = WidestLineWidth(surface, vsDraw, vsDraw.annotationStyleOffset, stAnnotation); - if (vsDraw.annotationVisible == ANNOTATION_BOXED) { - widthAnnotation += static_cast(vsDraw.spaceWidth * 2); // Margins - } - if (widthAnnotation > lineWidthMaxSeen) - lineWidthMaxSeen = widthAnnotation; - if (vsDraw.annotationVisible == ANNOTATION_BOXED) { - rcSegment.left = static_cast(xStart + indent); - rcSegment.right = rcSegment.left + widthAnnotation; - } - } - const int annotationLines = pdoc->AnnotationLines(line); - size_t start = 0; - size_t lengthAnnotation = stAnnotation.LineLength(start); - int lineInAnnotation = 0; - while ((lineInAnnotation < annotationLine) && (start < stAnnotation.length)) { - start += lengthAnnotation + 1; - lengthAnnotation = stAnnotation.LineLength(start); - lineInAnnotation++; - } - PRectangle rcText = rcSegment; - if (vsDraw.annotationVisible == ANNOTATION_BOXED) { - surface->FillRectangle(rcText, - vsDraw.styles[stAnnotation.StyleAt(start) + vsDraw.annotationStyleOffset].back); - rcText.left += vsDraw.spaceWidth; - } - DrawStyledText(surface, vsDraw, vsDraw.annotationStyleOffset, rcText, - stAnnotation, start, lengthAnnotation); - if (vsDraw.annotationVisible == ANNOTATION_BOXED) { - surface->PenColour(vsDraw.styles[vsDraw.annotationStyleOffset].fore); - surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.top)); - surface->LineTo(static_cast(rcSegment.left), static_cast(rcSegment.bottom)); - surface->MoveTo(static_cast(rcSegment.right), static_cast(rcSegment.top)); - surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.bottom)); - if (subLine == ll->lines) { - surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.top)); - surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.top)); - } - if (subLine == ll->lines+annotationLines-1) { - surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.bottom - 1)); - surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.bottom - 1)); - } - } - } -} - -void Editor::DrawLine(Surface *surface, const ViewStyle &vsDraw, int line, int lineVisible, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine) { - - if (subLine >= ll->lines) { - DrawAnnotation(surface, vsDraw, line, xStart, rcLine, ll, subLine); - return; // No further drawing - } - - PRectangle rcSegment = rcLine; - - // Using one font for all control characters so it can be controlled independently to ensure - // the box goes around the characters tightly. Seems to be no way to work out what height - // is taken by an individual character - internal leading gives varying results. - FontAlias ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; - - // See if something overrides the line background color. - const ColourOptional background = vsDraw.Background(pdoc->GetMark(line), caret.active, ll->containsCaret); - - const bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) && - (!background.isSet) && (vsDraw.whitespaceColours.back.isSet); - - bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. - const XYPOSITION indentWidth = pdoc->IndentSize() * vsDraw.spaceWidth; - const XYPOSITION epsilon = 0.0001f; // A small nudge to avoid floating point precision issues - - const int posLineStart = pdoc->LineStart(line); - - const int startseg = ll->LineStart(subLine); - const XYACCUMULATOR subLineStart = ll->positions[startseg]; - int lineStart = 0; - int lineEnd = 0; - if (subLine < ll->lines) { - lineStart = ll->LineStart(subLine); - lineEnd = ll->LineStart(subLine + 1); - if (subLine == ll->lines - 1) { - lineEnd = ll->numCharsBeforeEOL; - } - } - - if (ll->wrapIndent != 0) { - - bool continuedWrapLine = false; - if (subLine < ll->lines) { - continuedWrapLine = ll->LineStart(subLine) != 0; - } - - if (continuedWrapLine) { - // draw continuation rect - PRectangle rcPlace = rcSegment; - - rcPlace.left = ll->positions[startseg] + xStart - static_cast(subLineStart); - rcPlace.right = rcPlace.left + ll->wrapIndent; - - // default bgnd here.. - surface->FillRectangle(rcSegment, background.isSet ? background : - vsDraw.styles[STYLE_DEFAULT].back); - - // main line style would be below but this would be inconsistent with end markers - // also would possibly not be the style at wrap point - //int styleMain = ll->styles[lineStart]; - //surface->FillRectangle(rcPlace, vsDraw.styles[styleMain].back); - - if (vsDraw.wrapVisualFlags & SC_WRAPVISUALFLAG_START) { - - if (vsDraw.wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_START_BY_TEXT) - rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; - else - rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; - - DrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour()); - } - - xStart += static_cast(ll->wrapIndent); - } - } - - const bool selBackDrawn = vsDraw.selColours.back.isSet && - ((vsDraw.selAlpha == SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA)); - - // Does not take margin into account but not significant - const int xStartVisible = static_cast(subLineStart) - xStart; - - if (twoPhaseDraw) { - BreakFinder bfBack(ll, &sel, lineStart, lineEnd, posLineStart, xStartVisible, selBackDrawn, pdoc, &reprs); - - // Background drawing loop - while (bfBack.More()) { - - const TextSegment ts = bfBack.Next(); - const int i = ts.end() - 1; - const int iDoc = i + posLineStart; - - rcSegment.left = ll->positions[ts.start] + xStart - static_cast(subLineStart); - rcSegment.right = ll->positions[ts.end()] + xStart - static_cast(subLineStart); - // Only try to draw if really visible - enhances performance by not calling environment to - // draw strings that are completely past the right side of the window. - if (rcSegment.Intersects(rcLine)) { - // Clip to line rectangle, since may have a huge position which will not work with some platforms - if (rcSegment.left < rcLine.left) - rcSegment.left = rcLine.left; - if (rcSegment.right > rcLine.right) - rcSegment.right = rcLine.right; - - const int inSelection = hideSelection ? 0 : sel.CharacterInSelection(iDoc); - const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc); - ColourDesired textBack = TextBackground(vsDraw, background, inSelection, - inHotspot, ll->styles[i], i, ll); - if (ts.representation) { - if (ll->chars[i] == '\t') { - // Tab display - if (drawWhitespaceBackground && - (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) - textBack = vsDraw.whitespaceColours.back; - } else { - // Blob display - inIndentation = false; - } - surface->FillRectangle(rcSegment, textBack); - } else { - // Normal text display - surface->FillRectangle(rcSegment, textBack); - if (vsDraw.viewWhitespace != wsInvisible || - (inIndentation && vsDraw.viewIndentationGuides == ivReal)) { - for (int cpos = 0; cpos <= i - ts.start; cpos++) { - if (ll->chars[cpos + ts.start] == ' ') { - if (drawWhitespaceBackground && - (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { - PRectangle rcSpace( - ll->positions[cpos + ts.start] + xStart - static_cast(subLineStart), - rcSegment.top, - ll->positions[cpos + ts.start + 1] + xStart - static_cast(subLineStart), - rcSegment.bottom); - surface->FillRectangle(rcSpace, vsDraw.whitespaceColours.back); - } - } else { - inIndentation = false; - } - } - } - } - } else if (rcSegment.left > rcLine.right) { - break; - } - } - - DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, - xStart, subLine, subLineStart, background); - } - - DrawIndicators(surface, vsDraw, line, xStart, rcLine, ll, subLine, lineEnd, true); - - if (vsDraw.edgeState == EDGE_LINE) { - int edgeX = static_cast(vsDraw.theEdge * vsDraw.spaceWidth); - rcSegment.left = static_cast(edgeX + xStart); - if ((ll->wrapIndent != 0) && (lineStart != 0)) - rcSegment.left -= ll->wrapIndent; - rcSegment.right = rcSegment.left + 1; - surface->FillRectangle(rcSegment, vsDraw.edgecolour); - } - - // Draw underline mark as part of background if not transparent - int marks = pdoc->GetMark(line); - int markBit; - for (markBit = 0; (markBit < 32) && marks; markBit++) { - if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE) && - (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) { - PRectangle rcUnderline = rcLine; - rcUnderline.top = rcUnderline.bottom - 2; - surface->FillRectangle(rcUnderline, vsDraw.markers[markBit].back); - } - marks >>= 1; - } - - inIndentation = subLine == 0; // Do not handle indentation except on first subline. - // Foreground drawing loop - BreakFinder bfFore(ll, &sel, lineStart, lineEnd, posLineStart, xStartVisible, - ((!twoPhaseDraw && selBackDrawn) || vsDraw.selColours.fore.isSet), pdoc, &reprs); - - while (bfFore.More()) { - - const TextSegment ts = bfFore.Next(); - const int i = ts.end() - 1; - const int iDoc = i + posLineStart; - - rcSegment.left = ll->positions[ts.start] + xStart - static_cast(subLineStart); - rcSegment.right = ll->positions[ts.end()] + xStart - static_cast(subLineStart); - // Only try to draw if really visible - enhances performance by not calling environment to - // draw strings that are completely past the right side of the window. - if (rcSegment.Intersects(rcLine)) { - int styleMain = ll->styles[i]; - ColourDesired textFore = vsDraw.styles[styleMain].fore; - FontAlias textFont = vsDraw.styles[styleMain].font; - //hotspot foreground - const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc); - if (inHotspot) { - if (vsDraw.hotspotColours.fore.isSet) - textFore = vsDraw.hotspotColours.fore; - } - const int inSelection = hideSelection ? 0 : sel.CharacterInSelection(iDoc); - if (inSelection && (vsDraw.selColours.fore.isSet)) { - textFore = (inSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground; - } - ColourDesired textBack = TextBackground(vsDraw, background, inSelection, inHotspot, styleMain, i, ll); - if (ts.representation) { - if (ll->chars[i] == '\t') { - // Tab display - if (!twoPhaseDraw) { - if (drawWhitespaceBackground && - (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) - textBack = vsDraw.whitespaceColours.back; - surface->FillRectangle(rcSegment, textBack); - } - if (inIndentation && vsDraw.viewIndentationGuides == ivReal) { - for (int indentCount = static_cast((ll->positions[i] + epsilon) / indentWidth); - indentCount <= (ll->positions[i + 1] - epsilon) / indentWidth; - indentCount++) { - if (indentCount > 0) { - int xIndent = static_cast(indentCount * indentWidth); - DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcSegment, - (ll->xHighlightGuide == xIndent)); - } - } - } - if (vsDraw.viewWhitespace != wsInvisible) { - if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { - if (vsDraw.whitespaceColours.fore.isSet) - textFore = vsDraw.whitespaceColours.fore; - surface->PenColour(textFore); - PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, - rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); - DrawTabArrow(surface, rcTab, static_cast(rcSegment.top + vsDraw.lineHeight / 2)); - } - } - } else { - inIndentation = false; - if (vsDraw.controlCharSymbol >= 32) { - char cc[2] = { static_cast(vsDraw.controlCharSymbol), '\0' }; - surface->DrawTextNoClip(rcSegment, ctrlCharsFont, - rcSegment.top + vsDraw.maxAscent, - cc, 1, textBack, textFore); - } else { - DrawTextBlob(surface, vsDraw, rcSegment, ts.representation->stringRep.c_str(), textBack, textFore, twoPhaseDraw); - } - } - } else { - // Normal text display - if (vsDraw.styles[styleMain].visible) { - if (twoPhaseDraw) { - surface->DrawTextTransparent(rcSegment, textFont, - rcSegment.top + vsDraw.maxAscent, ll->chars + ts.start, - i - ts.start + 1, textFore); - } else { - surface->DrawTextNoClip(rcSegment, textFont, - rcSegment.top + vsDraw.maxAscent, ll->chars + ts.start, - i - ts.start + 1, textFore, textBack); - } - } - if (vsDraw.viewWhitespace != wsInvisible || - (inIndentation && vsDraw.viewIndentationGuides != ivNone)) { - for (int cpos = 0; cpos <= i - ts.start; cpos++) { - if (ll->chars[cpos + ts.start] == ' ') { - if (vsDraw.viewWhitespace != wsInvisible) { - if (vsDraw.whitespaceColours.fore.isSet) - textFore = vsDraw.whitespaceColours.fore; - if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { - XYPOSITION xmid = (ll->positions[cpos + ts.start] + ll->positions[cpos + ts.start + 1]) / 2; - if (!twoPhaseDraw && drawWhitespaceBackground && - (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { - textBack = vsDraw.whitespaceColours.back; - PRectangle rcSpace( - ll->positions[cpos + ts.start] + xStart - static_cast(subLineStart), - rcSegment.top, - ll->positions[cpos + ts.start + 1] + xStart - static_cast(subLineStart), - rcSegment.bottom); - surface->FillRectangle(rcSpace, textBack); - } - PRectangle rcDot(xmid + xStart - static_cast(subLineStart), - rcSegment.top + vsDraw.lineHeight / 2, 0.0f, 0.0f); - rcDot.right = rcDot.left + vsDraw.whitespaceSize; - rcDot.bottom = rcDot.top + vsDraw.whitespaceSize; - surface->FillRectangle(rcDot, textFore); - } - } - if (inIndentation && vsDraw.viewIndentationGuides == ivReal) { - for (int indentCount = static_cast((ll->positions[cpos + ts.start] + epsilon) / indentWidth); - indentCount <= (ll->positions[cpos + ts.start + 1] - epsilon) / indentWidth; - indentCount++) { - if (indentCount > 0) { - int xIndent = static_cast(indentCount * indentWidth); - DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcSegment, - (ll->xHighlightGuide == xIndent)); - } - } - } - } else { - inIndentation = false; - } - } - } - } - if (ll->hotspot.Valid() && vsDraw.hotspotUnderline && ll->hotspot.ContainsCharacter(iDoc)) { - PRectangle rcUL = rcSegment; - rcUL.top = rcUL.top + vsDraw.maxAscent + 1; - rcUL.bottom = rcUL.top + 1; - if (vsDraw.hotspotColours.fore.isSet) - surface->FillRectangle(rcUL, vsDraw.hotspotColours.fore); - else - surface->FillRectangle(rcUL, textFore); - } else if (vsDraw.styles[styleMain].underline) { - PRectangle rcUL = rcSegment; - rcUL.top = rcUL.top + vsDraw.maxAscent + 1; - rcUL.bottom = rcUL.top + 1; - surface->FillRectangle(rcUL, textFore); - } - } else if (rcSegment.left > rcLine.right) { - break; - } - } - if ((vsDraw.viewIndentationGuides == ivLookForward || vsDraw.viewIndentationGuides == ivLookBoth) - && (subLine == 0)) { - int indentSpace = pdoc->GetLineIndentation(line); - int xStartText = static_cast(ll->positions[pdoc->GetLineIndentPosition(line) - posLineStart]); - - // Find the most recent line with some text - - int lineLastWithText = line; - while (lineLastWithText > Platform::Maximum(line-20, 0) && pdoc->IsWhiteLine(lineLastWithText)) { - lineLastWithText--; - } - if (lineLastWithText < line) { - xStartText = 100000; // Don't limit to visible indentation on empty line - // This line is empty, so use indentation of last line with text - int indentLastWithText = pdoc->GetLineIndentation(lineLastWithText); - int isFoldHeader = pdoc->GetLevel(lineLastWithText) & SC_FOLDLEVELHEADERFLAG; - if (isFoldHeader) { - // Level is one more level than parent - indentLastWithText += pdoc->IndentSize(); - } - if (vsDraw.viewIndentationGuides == ivLookForward) { - // In viLookForward mode, previous line only used if it is a fold header - if (isFoldHeader) { - indentSpace = Platform::Maximum(indentSpace, indentLastWithText); + while (lineToWrap < lineToWrapEnd) { + if (WrapOneLine(surface, lineToWrap)) { + wrapOccurred = true; + } + wrapPending.Wrapped(lineToWrap); + lineToWrap++; } - } else { // viLookBoth - indentSpace = Platform::Maximum(indentSpace, indentLastWithText); + + goodTopLine = cs.DisplayFromDoc(lineDocTop) + std::min(subLineTop, cs.GetHeight(lineDocTop)-1); } } - int lineNextWithText = line; - while (lineNextWithText < Platform::Minimum(line+20, pdoc->LinesTotal()) && pdoc->IsWhiteLine(lineNextWithText)) { - lineNextWithText++; - } - if (lineNextWithText > line) { - xStartText = 100000; // Don't limit to visible indentation on empty line - // This line is empty, so use indentation of first next line with text - indentSpace = Platform::Maximum(indentSpace, - pdoc->GetLineIndentation(lineNextWithText)); + // If wrapping is done, bring it to resting position + if (wrapPending.start >= lineEndNeedWrap) { + wrapPending.Reset(); } + } - for (int indentPos = pdoc->IndentSize(); indentPos < indentSpace; indentPos += pdoc->IndentSize()) { - int xIndent = static_cast(indentPos * vsDraw.spaceWidth); - if (xIndent < xStartText) { - DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcSegment, - (ll->xHighlightGuide == xIndent)); - } - } + if (wrapOccurred) { + SetScrollBars(); + SetTopLine(Platform::Clamp(goodTopLine, 0, MaxScrollPos())); + SetVerticalScrollPos(); } - DrawIndicators(surface, vsDraw, line, xStart, rcLine, ll, subLine, lineEnd, false); + return wrapOccurred; +} - // End of the drawing of the current line - if (!twoPhaseDraw) { - DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, - xStart, subLine, subLineStart, background); - } - if (!hideSelection && ((vsDraw.selAlpha != SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha != SC_ALPHA_NOALPHA))) { - // For each selection draw - int virtualSpaces = 0; - if (subLine == (ll->lines - 1)) { - virtualSpaces = sel.VirtualSpaceFor(pdoc->LineEnd(line)); - } - SelectionPosition posStart(posLineStart + lineStart); - SelectionPosition posEnd(posLineStart + lineEnd, virtualSpaces); - SelectionSegment virtualSpaceRange(posStart, posEnd); - for (size_t r=0; rEndLineStyle()].spaceWidth; - rcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] - - static_cast(subLineStart) + portion.start.VirtualSpace() * spaceWidth; - rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - - static_cast(subLineStart) + portion.end.VirtualSpace() * spaceWidth; - if ((ll->wrapIndent != 0) && (lineStart != 0)) { - if ((portion.start.Position() - posLineStart) == lineStart && sel.Range(r).ContainsCharacter(portion.start.Position() - 1)) - rcSegment.left -= static_cast(ll->wrapIndent); // indentation added to xStart was truncated to int, so we do the same here - } - rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; - rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; - if (rcSegment.right > rcLine.left) - SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, r == sel.Main()), alpha); +void Editor::LinesJoin() { + if (!RangeContainsProtected(targetStart, targetEnd)) { + UndoGroup ug(pdoc); + bool prevNonWS = true; + for (int pos = targetStart; pos < targetEnd; pos++) { + if (pdoc->IsPositionInLineEnd(pos)) { + targetEnd -= pdoc->LenChar(pos); + pdoc->DelChar(pos); + if (prevNonWS) { + // Ensure at least one space separating previous lines + const int lengthInserted = pdoc->InsertString(pos, " ", 1); + targetEnd += lengthInserted; } + } else { + prevNonWS = pdoc->CharAt(pos) != ' '; } } } +} - // Draw any translucent whole line states - rcSegment = rcLine; - if ((caret.active || vsDraw.alwaysShowCaretLineBackground) && vsDraw.showCaretLineBackground && ll->containsCaret) { - SimpleAlphaRectangle(surface, rcSegment, vsDraw.caretLineBackground, vsDraw.caretLineAlpha); +const char *Editor::StringFromEOLMode(int eolMode) { + if (eolMode == SC_EOL_CRLF) { + return "\r\n"; + } else if (eolMode == SC_EOL_CR) { + return "\r"; + } else { + return "\n"; } - marks = pdoc->GetMark(line); - for (markBit = 0; (markBit < 32) && marks; markBit++) { - if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND)) { - SimpleAlphaRectangle(surface, rcSegment, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); - } else if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE)) { - PRectangle rcUnderline = rcSegment; - rcUnderline.top = rcUnderline.bottom - 2; - SimpleAlphaRectangle(surface, rcUnderline, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); +} + +void Editor::LinesSplit(int pixelWidth) { + if (!RangeContainsProtected(targetStart, targetEnd)) { + if (pixelWidth == 0) { + PRectangle rcText = GetTextRectangle(); + pixelWidth = static_cast(rcText.Width()); } - marks >>= 1; - } - if (vsDraw.maskInLine) { - int marksMasked = pdoc->GetMark(line) & vsDraw.maskInLine; - if (marksMasked) { - for (markBit = 0; (markBit < 32) && marksMasked; markBit++) { - if ((marksMasked & 1) && (vsDraw.markers[markBit].markType != SC_MARK_EMPTY)) { - SimpleAlphaRectangle(surface, rcSegment, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); + int lineStart = pdoc->LineFromPosition(targetStart); + int lineEnd = pdoc->LineFromPosition(targetEnd); + const char *eol = StringFromEOLMode(pdoc->eolMode); + UndoGroup ug(pdoc); + for (int line = lineStart; line <= lineEnd; line++) { + AutoSurface surface(this); + AutoLineLayout ll(view.llc, view.RetrieveLineLayout(line, *this)); + if (surface && ll) { + unsigned int posLineStart = pdoc->LineStart(line); + view.LayoutLine(*this, line, surface, vs, ll, pixelWidth); + int lengthInsertedTotal = 0; + for (int subLine = 1; subLine < ll->lines; subLine++) { + const int lengthInserted = pdoc->InsertString( + static_cast(posLineStart + lengthInsertedTotal + + ll->LineStart(subLine)), + eol, istrlen(eol)); + targetEnd += lengthInserted; + lengthInsertedTotal += lengthInserted; } - marksMasked >>= 1; } + lineEnd = pdoc->LineFromPosition(targetEnd); } } } -void Editor::DrawBlockCaret(Surface *surface, const ViewStyle &vsDraw, LineLayout *ll, int subLine, - int xStart, int offset, int posCaret, PRectangle rcCaret, ColourDesired caretColour) const { +void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { + if (vs.fixedColumnWidth == 0) + return; - int lineStart = ll->LineStart(subLine); - int posBefore = posCaret; - int posAfter = MovePositionOutsideChar(posCaret + 1, 1); - int numCharsToDraw = posAfter - posCaret; + AllocateGraphics(); + RefreshStyleData(); + RefreshPixMaps(surfWindow); - // Work out where the starting and ending offsets are. We need to - // see if the previous character shares horizontal space, such as a - // glyph / combining character. If so we'll need to draw that too. - int offsetFirstChar = offset; - int offsetLastChar = offset + (posAfter - posCaret); - while ((posBefore > 0) && ((offsetLastChar - numCharsToDraw) >= lineStart)) { - if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - numCharsToDraw]) > 0) { - // The char does not share horizontal space - break; - } - // Char shares horizontal space, update the numChars to draw - // Update posBefore to point to the prev char - posBefore = MovePositionOutsideChar(posBefore - 1, -1); - numCharsToDraw = posAfter - posBefore; - offsetFirstChar = offset - (posCaret - posBefore); - } - - // See if the next character shares horizontal space, if so we'll - // need to draw that too. - if (offsetFirstChar < 0) - offsetFirstChar = 0; - numCharsToDraw = offsetLastChar - offsetFirstChar; - while ((offsetLastChar < ll->LineStart(subLine + 1)) && (offsetLastChar <= ll->numCharsInLine)) { - // Update posAfter to point to the 2nd next char, this is where - // the next character ends, and 2nd next begins. We'll need - // to compare these two - posBefore = posAfter; - posAfter = MovePositionOutsideChar(posAfter + 1, 1); - offsetLastChar = offset + (posAfter - posCaret); - if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - (posAfter - posBefore)]) > 0) { - // The char does not share horizontal space - break; - } - // Char shares horizontal space, update the numChars to draw - numCharsToDraw = offsetLastChar - offsetFirstChar; + // On GTK+ with Ubuntu overlay scroll bars, the surface may have been finished + // at this point. The Initialised call checks for this case and sets the status + // to be bad which avoids crashes in following calls. + if (!surfWindow->Initialised()) { + return; } - // We now know what to draw, update the caret drawing rectangle - rcCaret.left = ll->positions[offsetFirstChar] - ll->positions[lineStart] + xStart; - rcCaret.right = ll->positions[offsetFirstChar+numCharsToDraw] - ll->positions[lineStart] + xStart; + PRectangle rcMargin = GetClientRectangle(); + Point ptOrigin = GetVisibleOriginInMain(); + rcMargin.Move(0, -ptOrigin.y); + rcMargin.left = 0; + rcMargin.right = static_cast(vs.fixedColumnWidth); + + if (!rc.Intersects(rcMargin)) + return; - // Adjust caret position to take into account any word wrapping symbols. - if ((ll->wrapIndent != 0) && (lineStart != 0)) { - XYPOSITION wordWrapCharWidth = ll->wrapIndent; - rcCaret.left += wordWrapCharWidth; - rcCaret.right += wordWrapCharWidth; + Surface *surface; + if (view.bufferedDraw) { + surface = marginView.pixmapSelMargin; + } else { + surface = surfWindow; } - // This character is where the caret block is, we override the colours - // (inversed) for drawing the caret here. - int styleMain = ll->styles[offsetFirstChar]; - FontAlias fontText = vsDraw.styles[styleMain].font; - surface->DrawTextClipped(rcCaret, fontText, - rcCaret.top + vsDraw.maxAscent, ll->chars + offsetFirstChar, - numCharsToDraw, vsDraw.styles[styleMain].back, - caretColour); -} + // Clip vertically to paint area to avoid drawing line numbers + if (rcMargin.bottom > rc.bottom) + rcMargin.bottom = rc.bottom; + if (rcMargin.top < rc.top) + rcMargin.top = rc.top; -void Editor::RefreshPixMaps(Surface *surfaceWindow) { - if (!pixmapSelPattern->Initialised()) { - const int patternSize = 8; - pixmapSelPattern->InitPixMap(patternSize, patternSize, surfaceWindow, wMain.GetID()); - pixmapSelPatternOffset1->InitPixMap(patternSize, patternSize, surfaceWindow, wMain.GetID()); - // This complex procedure is to reproduce the checkerboard dithered pattern used by windows - // for scroll bars and Visual Studio for its selection margin. The colour of this pattern is half - // way between the chrome colour and the chrome highlight colour making a nice transition - // between the window chrome and the content area. And it works in low colour depths. - PRectangle rcPattern = PRectangle::FromInts(0, 0, patternSize, patternSize); - - // Initialize default colours based on the chrome colour scheme. Typically the highlight is white. - ColourDesired colourFMFill = vs.selbar; - ColourDesired colourFMStripes = vs.selbarlight; - - if (!(vs.selbarlight == ColourDesired(0xff, 0xff, 0xff))) { - // User has chosen an unusual chrome colour scheme so just use the highlight edge colour. - // (Typically, the highlight colour is white.) - colourFMFill = vs.selbarlight; - } - - if (vs.foldmarginColour.isSet) { - // override default fold margin colour - colourFMFill = vs.foldmarginColour; - } - if (vs.foldmarginHighlightColour.isSet) { - // override default fold margin highlight colour - colourFMStripes = vs.foldmarginHighlightColour; - } - - pixmapSelPattern->FillRectangle(rcPattern, colourFMFill); - pixmapSelPatternOffset1->FillRectangle(rcPattern, colourFMStripes); - for (int y = 0; y < patternSize; y++) { - for (int x = y % 2; x < patternSize; x+=2) { - PRectangle rcPixel = PRectangle::FromInts(x, y, x + 1, y + 1); - pixmapSelPattern->FillRectangle(rcPixel, colourFMStripes); - pixmapSelPatternOffset1->FillRectangle(rcPixel, colourFMFill); - } - } - } + marginView.PaintMargin(surface, topLine, rc, rcMargin, *this, vs); - if (!pixmapIndentGuide->Initialised()) { - // 1 extra pixel in height so can handle odd/even positions and so produce a continuous line - pixmapIndentGuide->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID()); - pixmapIndentGuideHighlight->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID()); - PRectangle rcIG = PRectangle::FromInts(0, 0, 1, vs.lineHeight); - pixmapIndentGuide->FillRectangle(rcIG, vs.styles[STYLE_INDENTGUIDE].back); - pixmapIndentGuide->PenColour(vs.styles[STYLE_INDENTGUIDE].fore); - pixmapIndentGuideHighlight->FillRectangle(rcIG, vs.styles[STYLE_BRACELIGHT].back); - pixmapIndentGuideHighlight->PenColour(vs.styles[STYLE_BRACELIGHT].fore); - for (int stripe = 1; stripe < vs.lineHeight + 1; stripe += 2) { - PRectangle rcPixel = PRectangle::FromInts(0, stripe, 1, stripe + 1); - pixmapIndentGuide->FillRectangle(rcPixel, vs.styles[STYLE_INDENTGUIDE].fore); - pixmapIndentGuideHighlight->FillRectangle(rcPixel, vs.styles[STYLE_BRACELIGHT].fore); - } + if (view.bufferedDraw) { + surfWindow->Copy(rcMargin, Point(rcMargin.left, rcMargin.top), *marginView.pixmapSelMargin); } +} + +void Editor::RefreshPixMaps(Surface *surfaceWindow) { + view.RefreshPixMaps(surfaceWindow, wMain.GetID(), vs); + marginView.RefreshPixMaps(surfaceWindow, wMain.GetID(), vs); + if (view.bufferedDraw) { + PRectangle rcClient = GetClientRectangle(); + if (!view.pixmapLine->Initialised()) { - if (bufferedDraw) { - if (!pixmapLine->Initialised()) { - PRectangle rcClient = GetClientRectangle(); - pixmapLine->InitPixMap(static_cast(rcClient.Width()), vs.lineHeight, + view.pixmapLine->InitPixMap(static_cast(rcClient.Width()), vs.lineHeight, surfaceWindow, wMain.GetID()); - pixmapSelMargin->InitPixMap(vs.fixedColumnWidth, - static_cast(rcClient.Height()), surfaceWindow, wMain.GetID()); } - } -} - -void Editor::DrawCarets(Surface *surface, const ViewStyle &vsDraw, int lineDoc, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine) { - // When drag is active it is the only caret drawn - bool drawDrag = posDrag.IsValid(); - if (hideSelection && !drawDrag) - return; - const int posLineStart = pdoc->LineStart(lineDoc); - // For each selection draw - for (size_t r=0; (rEndLineStyle()].spaceWidth; - const XYPOSITION virtualOffset = posCaret.VirtualSpace() * spaceWidth; - if (ll->InLine(offset, subLine) && offset <= ll->numCharsBeforeEOL) { - XYPOSITION xposCaret = ll->positions[offset] + virtualOffset - ll->positions[ll->LineStart(subLine)]; - if (ll->wrapIndent != 0) { - int lineStart = ll->LineStart(subLine); - if (lineStart != 0) // Wrapped - xposCaret += ll->wrapIndent; - } - bool caretBlinkState = (caret.active && caret.on) || (!additionalCaretsBlink && !mainCaret); - bool caretVisibleState = additionalCaretsVisible || mainCaret; - if ((xposCaret >= 0) && (vsDraw.caretWidth > 0) && (vsDraw.caretStyle != CARETSTYLE_INVISIBLE) && - ((posDrag.IsValid()) || (caretBlinkState && caretVisibleState))) { - bool caretAtEOF = false; - bool caretAtEOL = false; - bool drawBlockCaret = false; - XYPOSITION widthOverstrikeCaret; - XYPOSITION caretWidthOffset = 0; - PRectangle rcCaret = rcLine; - - if (posCaret.Position() == pdoc->Length()) { // At end of document - caretAtEOF = true; - widthOverstrikeCaret = vsDraw.aveCharWidth; - } else if ((posCaret.Position() - posLineStart) >= ll->numCharsInLine) { // At end of line - caretAtEOL = true; - widthOverstrikeCaret = vsDraw.aveCharWidth; - } else { - widthOverstrikeCaret = ll->positions[offset + 1] - ll->positions[offset]; - } - if (widthOverstrikeCaret < 3) // Make sure its visible - widthOverstrikeCaret = 3; - - if (xposCaret > 0) - caretWidthOffset = 0.51f; // Move back so overlaps both character cells. - xposCaret += xStart; - if (posDrag.IsValid()) { - /* Dragging text, use a line caret */ - rcCaret.left = static_cast(RoundXYPosition(xposCaret - caretWidthOffset)); - rcCaret.right = rcCaret.left + vsDraw.caretWidth; - } else if (inOverstrike && drawOverstrikeCaret) { - /* Overstrike (insert mode), use a modified bar caret */ - rcCaret.top = rcCaret.bottom - 2; - rcCaret.left = xposCaret + 1; - rcCaret.right = rcCaret.left + widthOverstrikeCaret - 1; - } else if (vsDraw.caretStyle == CARETSTYLE_BLOCK) { - /* Block caret */ - rcCaret.left = xposCaret; - if (!caretAtEOL && !caretAtEOF && (ll->chars[offset] != '\t') && !(IsControlCharacter(ll->chars[offset]))) { - drawBlockCaret = true; - rcCaret.right = xposCaret + widthOverstrikeCaret; - } else { - rcCaret.right = xposCaret + vsDraw.aveCharWidth; - } - } else { - /* Line caret */ - rcCaret.left = static_cast(RoundXYPosition(xposCaret - caretWidthOffset)); - rcCaret.right = rcCaret.left + vsDraw.caretWidth; - } - ColourDesired caretColour = mainCaret ? vsDraw.caretcolour : vsDraw.additionalCaretColour; - if (drawBlockCaret) { - DrawBlockCaret(surface, vsDraw, ll, subLine, xStart, offset, posCaret.Position(), rcCaret, caretColour); - } else { - surface->FillRectangle(rcCaret, caretColour); - } - } + if (!marginView.pixmapSelMargin->Initialised()) { + marginView.pixmapSelMargin->InitPixMap(vs.fixedColumnWidth, + static_cast(rcClient.Height()), surfaceWindow, wMain.GetID()); } - if (drawDrag) - break; } } @@ -3441,18 +1619,9 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { StyleToPositionInView(PositionAfterArea(rcArea)); PRectangle rcClient = GetClientRectangle(); - Point ptOrigin = GetVisibleOriginInMain(); //Platform::DebugPrintf("Client: (%3d,%3d) ... (%3d,%3d) %d\n", // rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); - int screenLinePaintFirst = static_cast(rcArea.top) / vs.lineHeight; - - int xStart = vs.textStart - xOffset + static_cast(ptOrigin.x); - int ypos = 0; - if (!bufferedDraw) - ypos += screenLinePaintFirst * vs.lineHeight; - int yposScreen = screenLinePaintFirst * vs.lineHeight; - if (NotifyUpdateUI()) { RefreshStyleData(); RefreshPixMaps(surfaceWindow); @@ -3467,9 +1636,9 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { } RefreshPixMaps(surfaceWindow); // In case pixmaps invalidated by scrollbar change } - PLATFORM_ASSERT(pixmapSelPattern->Initialised()); + PLATFORM_ASSERT(marginView.pixmapSelPattern->Initialised()); - if (!bufferedDraw) + if (!view.bufferedDraw) surfaceWindow->SetClip(rcArea); if (paintState != paintAbandoned) { @@ -3503,195 +1672,19 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { } return; } - //Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset); - - // Allow text at start of line to overlap 1 pixel into the margin as this displays - // serifs and italic stems for aliased text. - const int leftTextOverlap = ((xOffset == 0) && (vs.leftMarginWidth > 0)) ? 1 : 0; - - // Do the painting - if (rcArea.right > vs.textStart - leftTextOverlap) { - - Surface *surface = surfaceWindow; - if (bufferedDraw) { - surface = pixmapLine; - PLATFORM_ASSERT(pixmapLine->Initialised()); - } - surface->SetUnicodeMode(IsUnicodeMode()); - surface->SetDBCSMode(CodePage()); - - int visibleLine = TopLineOfMain() + screenLinePaintFirst; - - SelectionPosition posCaret = sel.RangeMain().caret; - if (posDrag.IsValid()) - posCaret = posDrag; - int lineCaret = pdoc->LineFromPosition(posCaret.Position()); - - PRectangle rcTextArea = rcClient; - if (vs.marginInside) { - rcTextArea.left += vs.textStart; - rcTextArea.right -= vs.rightMarginWidth; - } else { - rcTextArea = rcArea; - } - - // Remove selection margin from drawing area so text will not be drawn - // on it in unbuffered mode. - if (!bufferedDraw && vs.marginInside) { - PRectangle rcClipText = rcTextArea; - rcClipText.left -= leftTextOverlap; - surfaceWindow->SetClip(rcClipText); - } - - // Loop on visible lines - //double durLayout = 0.0; - //double durPaint = 0.0; - //double durCopy = 0.0; - //ElapsedTime etWhole; - int lineDocPrevious = -1; // Used to avoid laying out one document line multiple times - AutoLineLayout ll(llc, 0); - while (visibleLine < cs.LinesDisplayed() && yposScreen < rcArea.bottom) { - - int lineDoc = cs.DocFromDisplay(visibleLine); - // Only visible lines should be handled by the code within the loop - PLATFORM_ASSERT(cs.GetVisible(lineDoc)); - int lineStartSet = cs.DisplayFromDoc(lineDoc); - int subLine = visibleLine - lineStartSet; - - // Copy this line and its styles from the document into local arrays - // and determine the x position at which each character starts. - //ElapsedTime et; - if (lineDoc != lineDocPrevious) { - ll.Set(0); - ll.Set(RetrieveLineLayout(lineDoc)); - LayoutLine(lineDoc, surface, vs, ll, wrapWidth); - lineDocPrevious = lineDoc; - } - //durLayout += et.Duration(true); - - if (ll) { - ll->containsCaret = lineDoc == lineCaret; - if (hideSelection) { - ll->containsCaret = false; - } - - ll->hotspot = GetHotSpotRange(); - - PRectangle rcLine = rcTextArea; - rcLine.top = static_cast(ypos); - rcLine.bottom = static_cast(ypos + vs.lineHeight); - - bool bracesIgnoreStyle = false; - if ((vs.braceHighlightIndicatorSet && (bracesMatchStyle == STYLE_BRACELIGHT)) || - (vs.braceBadLightIndicatorSet && (bracesMatchStyle == STYLE_BRACEBAD))) { - bracesIgnoreStyle = true; - } - Range rangeLine(pdoc->LineStart(lineDoc), pdoc->LineStart(lineDoc + 1)); - // Highlight the current braces if any - ll->SetBracesHighlight(rangeLine, braces, static_cast(bracesMatchStyle), - static_cast(highlightGuideColumn * vs.spaceWidth), bracesIgnoreStyle); - - if (leftTextOverlap && bufferedDraw) { - PRectangle rcSpacer = rcLine; - rcSpacer.right = rcSpacer.left; - rcSpacer.left -= 1; - surface->FillRectangle(rcSpacer, vs.styles[STYLE_DEFAULT].back); - } - - // Draw the line - DrawLine(surface, vs, lineDoc, visibleLine, xStart, rcLine, ll, subLine); - //durPaint += et.Duration(true); - - // Restore the previous styles for the brace highlights in case layout is in cache. - ll->RestoreBracesHighlight(rangeLine, braces, bracesIgnoreStyle); - - bool expanded = cs.GetExpanded(lineDoc); - const int level = pdoc->GetLevel(lineDoc); - const int levelNext = pdoc->GetLevel(lineDoc + 1); - if ((level & SC_FOLDLEVELHEADERFLAG) && - ((level & SC_FOLDLEVELNUMBERMASK) < (levelNext & SC_FOLDLEVELNUMBERMASK))) { - // Paint the line above the fold - if ((expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED)) - || - (!expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) { - PRectangle rcFoldLine = rcLine; - rcFoldLine.bottom = rcFoldLine.top + 1; - surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore); - } - // Paint the line below the fold - if ((expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED)) - || - (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { - PRectangle rcFoldLine = rcLine; - rcFoldLine.top = rcFoldLine.bottom - 1; - surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore); - } - } - - DrawCarets(surface, vs, lineDoc, xStart, rcLine, ll, subLine); - - if (bufferedDraw) { - Point from = Point::FromInts(vs.textStart-leftTextOverlap, 0); - PRectangle rcCopyArea = PRectangle::FromInts(vs.textStart - leftTextOverlap, yposScreen, - static_cast(rcClient.right - vs.rightMarginWidth), - yposScreen + vs.lineHeight); - surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); - } - - lineWidthMaxSeen = Platform::Maximum( - lineWidthMaxSeen, static_cast(ll->positions[ll->numCharsInLine])); - //durCopy += et.Duration(true); - } - if (!bufferedDraw) { - ypos += vs.lineHeight; - } + view.PaintText(surfaceWindow, *this, rcArea, rcClient, vs); - yposScreen += vs.lineHeight; - visibleLine++; - - //gdk_flush(); - } - ll.Set(0); - //if (durPaint < 0.00000001) - // durPaint = 0.00000001; - - // Right column limit indicator - PRectangle rcBeyondEOF = (vs.marginInside) ? rcClient : rcArea; - rcBeyondEOF.left = static_cast(vs.textStart); - rcBeyondEOF.right = rcBeyondEOF.right - ((vs.marginInside) ? vs.rightMarginWidth : 0); - rcBeyondEOF.top = static_cast((cs.LinesDisplayed() - TopLineOfMain()) * vs.lineHeight); - if (rcBeyondEOF.top < rcBeyondEOF.bottom) { - surfaceWindow->FillRectangle(rcBeyondEOF, vs.styles[STYLE_DEFAULT].back); - if (vs.edgeState == EDGE_LINE) { - int edgeX = static_cast(vs.theEdge * vs.spaceWidth); - rcBeyondEOF.left = static_cast(edgeX + xStart); - rcBeyondEOF.right = rcBeyondEOF.left + 1; - surfaceWindow->FillRectangle(rcBeyondEOF, vs.edgecolour); + if (horizontalScrollBarVisible && trackLineWidth && (view.lineWidthMaxSeen > scrollWidth)) { + if (FineTickerAvailable()) { + scrollWidth = view.lineWidthMaxSeen; + if (!FineTickerRunning(tickWiden)) { + FineTickerStart(tickWiden, 50, 5); } } - //Platform::DebugPrintf( - //"Layout:%9.6g Paint:%9.6g Ratio:%9.6g Copy:%9.6g Total:%9.6g\n", - //durLayout, durPaint, durLayout / durPaint, durCopy, etWhole.Duration()); - NotifyPainted(); } -} - -// Space (3 space characters) between line numbers and text when printing. -#define lineNumberPrintSpace " " -ColourDesired InvertedLight(ColourDesired orig) { - unsigned int r = orig.GetRed(); - unsigned int g = orig.GetGreen(); - unsigned int b = orig.GetBlue(); - unsigned int l = (r + g + b) / 3; // There is a better calculation for this that matches human eye - unsigned int il = 0xff - l; - if (l == 0) - return ColourDesired(0xff, 0xff, 0xff); - r = r * il / l; - g = g * il / l; - b = b * il / l; - return ColourDesired(Platform::Minimum(r, 0xff), Platform::Minimum(g, 0xff), Platform::Minimum(b, 0xff)); + NotifyPainted(); } // This is mostly copied from the Paint method but with some things omitted @@ -3708,184 +1701,7 @@ long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) { if (!surfaceMeasure) { return 0; } - - // Can't use measurements cached for screen - posCache.Clear(); - - ViewStyle vsPrint(vs); - vsPrint.technology = SC_TECHNOLOGY_DEFAULT; - - // Modify the view style for printing as do not normally want any of the transient features to be printed - // Printing supports only the line number margin. - int lineNumberIndex = -1; - for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) { - if ((vsPrint.ms[margin].style == SC_MARGIN_NUMBER) && (vsPrint.ms[margin].width > 0)) { - lineNumberIndex = margin; - } else { - vsPrint.ms[margin].width = 0; - } - } - vsPrint.fixedColumnWidth = 0; - vsPrint.zoomLevel = printParameters.magnification; - // Don't show indentation guides - // If this ever gets changed, cached pixmap would need to be recreated if technology != SC_TECHNOLOGY_DEFAULT - vsPrint.viewIndentationGuides = ivNone; - // Don't show the selection when printing - vsPrint.selColours.back.isSet = false; - vsPrint.selColours.fore.isSet = false; - vsPrint.selAlpha = SC_ALPHA_NOALPHA; - vsPrint.selAdditionalAlpha = SC_ALPHA_NOALPHA; - vsPrint.whitespaceColours.back.isSet = false; - vsPrint.whitespaceColours.fore.isSet = false; - vsPrint.showCaretLineBackground = false; - vsPrint.alwaysShowCaretLineBackground = false; - // Don't highlight matching braces using indicators - vsPrint.braceHighlightIndicatorSet = false; - vsPrint.braceBadLightIndicatorSet = false; - - // Set colours for printing according to users settings - for (size_t sty = 0; sty < vsPrint.styles.size(); sty++) { - if (printParameters.colourMode == SC_PRINT_INVERTLIGHT) { - vsPrint.styles[sty].fore = InvertedLight(vsPrint.styles[sty].fore); - vsPrint.styles[sty].back = InvertedLight(vsPrint.styles[sty].back); - } else if (printParameters.colourMode == SC_PRINT_BLACKONWHITE) { - vsPrint.styles[sty].fore = ColourDesired(0, 0, 0); - vsPrint.styles[sty].back = ColourDesired(0xff, 0xff, 0xff); - } else if (printParameters.colourMode == SC_PRINT_COLOURONWHITE) { - vsPrint.styles[sty].back = ColourDesired(0xff, 0xff, 0xff); - } else if (printParameters.colourMode == SC_PRINT_COLOURONWHITEDEFAULTBG) { - if (sty <= STYLE_DEFAULT) { - vsPrint.styles[sty].back = ColourDesired(0xff, 0xff, 0xff); - } - } - } - // White background for the line numbers - vsPrint.styles[STYLE_LINENUMBER].back = ColourDesired(0xff, 0xff, 0xff); - - // Printing uses different margins, so reset screen margins - vsPrint.leftMarginWidth = 0; - vsPrint.rightMarginWidth = 0; - - vsPrint.Refresh(*surfaceMeasure, pdoc->tabInChars); - // Determining width must happen after fonts have been realised in Refresh - int lineNumberWidth = 0; - if (lineNumberIndex >= 0) { - lineNumberWidth = static_cast(surfaceMeasure->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, - "99999" lineNumberPrintSpace, 5 + istrlen(lineNumberPrintSpace))); - vsPrint.ms[lineNumberIndex].width = lineNumberWidth; - vsPrint.Refresh(*surfaceMeasure, pdoc->tabInChars); // Recalculate fixedColumnWidth - } - - int linePrintStart = pdoc->LineFromPosition(pfr->chrg.cpMin); - int linePrintLast = linePrintStart + (pfr->rc.bottom - pfr->rc.top) / vsPrint.lineHeight - 1; - if (linePrintLast < linePrintStart) - linePrintLast = linePrintStart; - int linePrintMax = pdoc->LineFromPosition(pfr->chrg.cpMax); - if (linePrintLast > linePrintMax) - linePrintLast = linePrintMax; - //Platform::DebugPrintf("Formatting lines=[%0d,%0d,%0d] top=%0d bottom=%0d line=%0d %0d\n", - // linePrintStart, linePrintLast, linePrintMax, pfr->rc.top, pfr->rc.bottom, vsPrint.lineHeight, - // surfaceMeasure->Height(vsPrint.styles[STYLE_LINENUMBER].font)); - int endPosPrint = pdoc->Length(); - if (linePrintLast < pdoc->LinesTotal()) - endPosPrint = pdoc->LineStart(linePrintLast + 1); - - // Ensure we are styled to where we are formatting. - pdoc->EnsureStyledTo(endPosPrint); - - int xStart = vsPrint.fixedColumnWidth + pfr->rc.left; - int ypos = pfr->rc.top; - - int lineDoc = linePrintStart; - - int nPrintPos = pfr->chrg.cpMin; - int visibleLine = 0; - int widthPrint = pfr->rc.right - pfr->rc.left - vsPrint.fixedColumnWidth; - if (printParameters.wrapState == eWrapNone) - widthPrint = LineLayout::wrapWidthInfinite; - - while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) { - - // When printing, the hdc and hdcTarget may be the same, so - // changing the state of surfaceMeasure may change the underlying - // state of surface. Therefore, any cached state is discarded before - // using each surface. - surfaceMeasure->FlushCachedState(); - - // Copy this line and its styles from the document into local arrays - // and determine the x position at which each character starts. - LineLayout ll(pdoc->LineStart(lineDoc+1)-pdoc->LineStart(lineDoc)+1); - LayoutLine(lineDoc, surfaceMeasure, vsPrint, &ll, widthPrint); - - ll.containsCaret = false; - - PRectangle rcLine = PRectangle::FromInts( - pfr->rc.left, - ypos, - pfr->rc.right - 1, - ypos + vsPrint.lineHeight); - - // When document line is wrapped over multiple display lines, find where - // to start printing from to ensure a particular position is on the first - // line of the page. - if (visibleLine == 0) { - int startWithinLine = nPrintPos - pdoc->LineStart(lineDoc); - for (int iwl = 0; iwl < ll.lines - 1; iwl++) { - if (ll.LineStart(iwl) <= startWithinLine && ll.LineStart(iwl + 1) >= startWithinLine) { - visibleLine = -iwl; - } - } - - if (ll.lines > 1 && startWithinLine >= ll.LineStart(ll.lines - 1)) { - visibleLine = -(ll.lines - 1); - } - } - - if (draw && lineNumberWidth && - (ypos + vsPrint.lineHeight <= pfr->rc.bottom) && - (visibleLine >= 0)) { - char number[100]; - sprintf(number, "%d" lineNumberPrintSpace, lineDoc + 1); - PRectangle rcNumber = rcLine; - rcNumber.right = rcNumber.left + lineNumberWidth; - // Right justify - rcNumber.left = rcNumber.right - surfaceMeasure->WidthText( - vsPrint.styles[STYLE_LINENUMBER].font, number, istrlen(number)); - surface->FlushCachedState(); - surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, - static_cast(ypos + vsPrint.maxAscent), number, istrlen(number), - vsPrint.styles[STYLE_LINENUMBER].fore, - vsPrint.styles[STYLE_LINENUMBER].back); - } - - // Draw the line - surface->FlushCachedState(); - - for (int iwl = 0; iwl < ll.lines; iwl++) { - if (ypos + vsPrint.lineHeight <= pfr->rc.bottom) { - if (visibleLine >= 0) { - if (draw) { - rcLine.top = static_cast(ypos); - rcLine.bottom = static_cast(ypos + vsPrint.lineHeight); - DrawLine(surface, vsPrint, lineDoc, visibleLine, xStart, rcLine, &ll, iwl); - } - ypos += vsPrint.lineHeight; - } - visibleLine++; - if (iwl == ll.lines - 1) - nPrintPos = pdoc->LineStart(lineDoc + 1); - else - nPrintPos += ll.LineStart(iwl + 1) - ll.LineStart(iwl); - } - } - - ++lineDoc; - } - - // Clear cache so measurements are not used for screen - posCache.Clear(); - - return nPrintPos; + return view.FormatRange(draw, pfr, surface, surfaceMeasure, *this, vs); } int Editor::TextWidth(int style, const char *text) { @@ -3968,7 +1784,7 @@ static bool cmpSelPtrs(const SelectionRange *a, const SelectionRange *b) { } // AddCharUTF inserts an array of bytes which may or may not be in UTF-8. -void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { +void Editor::AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS) { FilterSelections(); { UndoGroup ug(pdoc, (sel.Count() > 1) || !sel.Empty() || inOverstrike); @@ -4172,6 +1988,9 @@ void Editor::ClearAll() { pdoc->MarginClearAll(); } } + + view.ClearAllTabstops(); + sel.Clear(); SetTopLine(0); SetVerticalScrollPos(); @@ -4192,6 +2011,7 @@ void Editor::ClearDocumentStyle() { pdoc->StartStyling(0, '\377'); pdoc->SetStyleFor(pdoc->Length(), 0); cs.ShowAll(); + SetAnnotationHeights(0, pdoc->LinesTotal()); pdoc->ClearLevels(); } @@ -4321,6 +2141,7 @@ void Editor::DelChar() { } void Editor::DelCharBack(bool allowLineStartDeletion) { + RefreshStyleData(); if (!sel.IsRectangular()) FilterSelections(); if (sel.IsRectangular()) @@ -4591,7 +2412,7 @@ void Editor::NotifySavePoint(Document *, void *, bool atSavePoint) { void Editor::CheckModificationForWrap(DocModification mh) { if (mh.modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) { - llc.Invalidate(LineLayout::llCheckTextAndStyle); + view.llc.Invalidate(LineLayout::llCheckTextAndStyle); int lineDoc = pdoc->LineFromPosition(mh.position); int lines = Platform::Maximum(0, mh.linesAdded); if (Wrapping()) { @@ -4640,6 +2461,9 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { Redraw(); } } + if (mh.modificationType & SC_MOD_CHANGETABSTOPS) { + Redraw(); + } if (mh.modificationType & SC_MOD_LEXERSTATE) { if (paintState == painting) { CheckForChangeOutsidePaint( @@ -4661,7 +2485,7 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { } } if (mh.modificationType & SC_MOD_CHANGESTYLE) { - llc.Invalidate(LineLayout::llCheckTextAndStyle); + view.llc.Invalidate(LineLayout::llCheckTextAndStyle); } } else { // Move selection and brace highlights @@ -4703,6 +2527,7 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { } else { cs.DeleteLines(lineOfPos, -mh.linesAdded); } + view.LinesAddedOrRemoved(lineOfPos, mh.linesAdded); } if (mh.modificationType & SC_MOD_CHANGEANNOTATION) { int lineDoc = pdoc->LineFromPosition(mh.position); @@ -4742,7 +2567,7 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { if ((!willRedrawAll) && ((paintState == notPainting) || !PaintContainsMargin())) { if (mh.modificationType & SC_MOD_CHANGEFOLD) { // Fold changes can affect the drawing of following lines so redraw whole margin - RedrawSelMargin(highlightDelimiter.isEnabled ? -1 : mh.line-1, true); + RedrawSelMargin(marginView.highlightDelimiter.isEnabled ? -1 : mh.line - 1, true); } else { RedrawSelMargin(mh.line); } @@ -5195,29 +3020,8 @@ void Editor::ParaUpOrDown(int direction, Selection::selTypes selt) { int Editor::StartEndDisplayLine(int pos, bool start) { RefreshStyleData(); - int line = pdoc->LineFromPosition(pos); AutoSurface surface(this); - AutoLineLayout ll(llc, RetrieveLineLayout(line)); - int posRet = INVALID_POSITION; - if (surface && ll) { - unsigned int posLineStart = pdoc->LineStart(line); - LayoutLine(line, surface, vs, ll, wrapWidth); - int posInLine = pos - posLineStart; - if (posInLine <= ll->maxLineLength) { - for (int subLine = 0; subLine < ll->lines; subLine++) { - if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) { - if (start) { - posRet = ll->LineStart(subLine) + posLineStart; - } else { - if (subLine == ll->lines - 1) - posRet = ll->LineStart(subLine + 1) + posLineStart; - else - posRet = ll->LineStart(subLine + 1) + posLineStart - 1; - } - } - } - } - } + int posRet = view.StartEndDisplayLine(surface, *this, pos, start, vs); if (posRet == INVALID_POSITION) { return pos; } else { @@ -5581,6 +3385,7 @@ int Editor::KeyCommand(unsigned int iMessage) { break; case SCI_DELWORDRIGHT: { UndoGroup ug(pdoc); + InvalidateSelection(sel.RangeMain(), true); sel.RangeMain().caret = SelectionPosition( InsertSpace(sel.RangeMain().caret.Position(), sel.RangeMain().caret.VirtualSpace())); sel.RangeMain().anchor = sel.RangeMain().caret; @@ -5590,6 +3395,7 @@ int Editor::KeyCommand(unsigned int iMessage) { break; case SCI_DELWORDRIGHTEND: { UndoGroup ug(pdoc); + InvalidateSelection(sel.RangeMain(), true); sel.RangeMain().caret = SelectionPosition( InsertSpace(sel.RangeMain().caret.Position(), sel.RangeMain().caret.VirtualSpace())); int endWord = pdoc->NextWordEnd(sel.MainCaret(), 1); @@ -6038,7 +3844,13 @@ void Editor::SetDragPosition(SelectionPosition newPos) { } if (!(posDrag == newPos)) { caret.on = true; - SetTicking(true); + if (FineTickerAvailable()) { + FineTickerCancel(tickCaret); + if ((caret.active) && (caret.period > 0) && (newPos.Position() < 0)) + FineTickerStart(tickCaret, caret.period, caret.period/10); + } else { + SetTicking(true); + } InvalidateCaret(); posDrag = newPos; InvalidateCaret(); @@ -6169,7 +3981,7 @@ bool Editor::PointInSelection(Point pt) { return false; } -bool Editor::PointInSelMargin(Point pt) { +bool Editor::PointInSelMargin(Point pt) const { // Really means: "Point in a margin" if (vs.fixedColumnWidth > 0) { // There is a margin PRectangle rcSelMargin = GetClientRectangle(); @@ -6262,6 +4074,12 @@ void Editor::DwellEnd(bool mouseMoved) { dwelling = false; NotifyDwelling(ptMouseLast, dwelling); } + if (FineTickerAvailable()) { + FineTickerCancel(tickDwell); + if (mouseMoved && (dwellDelay < SC_TIME_FOREVER)) { + //FineTickerStart(tickDwell, dwellDelay, dwellDelay/10); + } + } } void Editor::MouseLeave() { @@ -6309,6 +4127,9 @@ void Editor::ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifie if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick)) { //Platform::DebugPrintf("Double click %d %d = %d\n", curTime, lastClickTime, curTime - lastClickTime); SetMouseCapture(true); + if (FineTickerAvailable()) { + FineTickerStart(tickScroll, 100, 10); + } if (!ctrl || !multipleSelection || (selectionType != selChar && selectionType != selWord)) SetEmptySelection(newPos.Position()); bool doubleClick = false; @@ -6405,6 +4226,9 @@ void Editor::ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifie SetDragPosition(SelectionPosition(invalidPosition)); SetMouseCapture(true); + if (FineTickerAvailable()) { + FineTickerStart(tickScroll, 100, 10); + } } else { if (PointIsHotspot(pt)) { NotifyHotSpotClicked(newCharPos.Position(), modifiers); @@ -6417,6 +4241,9 @@ void Editor::ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifie inDragDrop = ddNone; } SetMouseCapture(true); + if (FineTickerAvailable()) { + FineTickerStart(tickScroll, 100, 10); + } if (inDragDrop != ddInitial) { SetDragPosition(SelectionPosition(invalidPosition)); if (!shift) { @@ -6510,6 +4337,9 @@ void Editor::ButtonMoveWithModifiers(Point pt, int modifiers) { if (inDragDrop == ddInitial) { if (DragThreshold(ptMouseLast, pt)) { SetMouseCapture(false); + if (FineTickerAvailable()) { + FineTickerCancel(tickScroll); + } SetDragPosition(movePos); CopySelectionRange(&drag); StartDrag(); @@ -6518,6 +4348,12 @@ void Editor::ButtonMoveWithModifiers(Point pt, int modifiers) { } ptMouseLast = pt; + PRectangle rcClient = GetClientRectangle(); + Point ptOrigin = GetVisibleOriginInMain(); + rcClient.Move(0, -ptOrigin.y); + if (FineTickerAvailable() && (dwellDelay < SC_TIME_FOREVER) && rcClient.Contains(pt)) { + FineTickerStart(tickDwell, dwellDelay, dwellDelay/10); + } //Platform::DebugPrintf("Move %d %d\n", pt.x, pt.y); if (HaveMouseCapture()) { @@ -6569,9 +4405,6 @@ void Editor::ButtonMoveWithModifiers(Point pt, int modifiers) { } // Autoscroll - PRectangle rcClient = GetClientRectangle(); - Point ptOrigin = GetVisibleOriginInMain(); - rcClient.Move(0, -ptOrigin.y); int lineMove = DisplayFromPosition(movePos.Position()); if (pt.y > rcClient.bottom) { ScrollTo(lineMove - LinesOnScreen() + 1); @@ -6643,6 +4476,9 @@ void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) { } ptMouseLast = pt; SetMouseCapture(false); + if (FineTickerAvailable()) { + FineTickerCancel(tickScroll); + } NotifyIndicatorClick(false, newPos.Position(), 0); if (inDragDrop == ddDragging) { SelectionPosition selStart = SelectionStart(); @@ -6719,8 +4555,8 @@ void Editor::Tick() { } } } - if (horizontalScrollBarVisible && trackLineWidth && (lineWidthMaxSeen > scrollWidth)) { - scrollWidth = lineWidthMaxSeen; + if (horizontalScrollBarVisible && trackLineWidth && (view.lineWidthMaxSeen > scrollWidth)) { + scrollWidth = view.lineWidthMaxSeen; SetScrollBars(); } if ((dwellDelay < SC_TIME_FOREVER) && @@ -6759,6 +4595,66 @@ bool Editor::Idle() { return !idleDone; } +void Editor::SetTicking(bool) { + // SetTicking is deprecated. In the past it was pure virtual and was overridden in each + // derived platform class but fine grained timers should now be implemented. + // Either way, execution should not arrive here so assert failure. + assert(false); +} + +void Editor::TickFor(TickReason reason) { + switch (reason) { + case tickCaret: + caret.on = !caret.on; + if (caret.active) { + InvalidateCaret(); + } + break; + case tickScroll: + // Auto scroll + ButtonMove(ptMouseLast); + break; + case tickWiden: + SetScrollBars(); + FineTickerCancel(tickWiden); + break; + case tickDwell: + if ((!HaveMouseCapture()) && + (ptMouseLast.y >= 0)) { + dwelling = true; + NotifyDwelling(ptMouseLast, dwelling); + } + FineTickerCancel(tickDwell); + break; + default: + // tickPlatform handled by subclass + break; + } +} + +bool Editor::FineTickerAvailable() { + return false; +} + +// FineTickerStart is be overridden by subclasses that support fine ticking so +// this method should never be called. +bool Editor::FineTickerRunning(TickReason) { + assert(false); + return false; +} + +// FineTickerStart is be overridden by subclasses that support fine ticking so +// this method should never be called. +void Editor::FineTickerStart(TickReason, int, int) { + assert(false); +} + +// FineTickerCancel is be overridden by subclasses that support fine ticking so +// this method should never be called. +void Editor::FineTickerCancel(TickReason) { + assert(false); +} + void Editor::SetFocusState(bool focusState) { hasFocus = focusState; NotifyFocus(hasFocus); @@ -6838,7 +4734,7 @@ void Editor::CheckForChangeOutsidePaint(Range r) { if (!r.Valid()) return; - PRectangle rcRange = RectangleFromRange(r); + PRectangle rcRange = RectangleFromRange(r, 0); PRectangle rcText = GetTextRectangle(); if (rcRange.top < rcText.top) { rcRange.top = rcText.top; @@ -6880,9 +4776,9 @@ void Editor::SetAnnotationHeights(int start, int end) { int linesWrapped = 1; if (Wrapping()) { AutoSurface surface(this); - AutoLineLayout ll(llc, RetrieveLineLayout(line)); + AutoLineLayout ll(view.llc, view.RetrieveLineLayout(line, *this)); if (surface && ll) { - LayoutLine(line, surface, vs, ll, wrapWidth); + view.LayoutLine(*this, line, surface, vs, ll, wrapWidth); linesWrapped = ll->lines; } } @@ -6922,9 +4818,11 @@ void Editor::SetDocPointer(Document *document) { cs.Clear(); cs.InsertLines(0, pdoc->LinesTotal() - 1); SetAnnotationHeights(0, pdoc->LinesTotal()); - llc.Deallocate(); + view.llc.Deallocate(); NeedWrapping(); + view.ClearAllTabstops(); + pdoc->AddWatcher(this, 0); SetScrollBars(); Redraw(); @@ -7235,10 +5133,10 @@ int Editor::CodePage() const { int Editor::WrapCount(int line) { AutoSurface surface(this); - AutoLineLayout ll(llc, RetrieveLineLayout(line)); + AutoLineLayout ll(view.llc, view.RetrieveLineLayout(line, *this)); if (surface && ll) { - LayoutLine(line, surface, vs, ll, wrapWidth); + view.LayoutLine(*this, line, surface, vs, ll, wrapWidth); return ll->lines; } else { return 1; @@ -7704,7 +5602,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { } case SCI_HIDESELECTION: - hideSelection = wParam != 0; + view.hideSelection = wParam != 0; Redraw(); break; @@ -7892,25 +5790,25 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { break; case SCI_SETPRINTMAGNIFICATION: - printParameters.magnification = static_cast(wParam); + view.printParameters.magnification = static_cast(wParam); break; case SCI_GETPRINTMAGNIFICATION: - return printParameters.magnification; + return view.printParameters.magnification; case SCI_SETPRINTCOLOURMODE: - printParameters.colourMode = static_cast(wParam); + view.printParameters.colourMode = static_cast(wParam); break; case SCI_GETPRINTCOLOURMODE: - return printParameters.colourMode; + return view.printParameters.colourMode; case SCI_SETPRINTWRAPMODE: - printParameters.wrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone; + view.printParameters.wrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone; break; case SCI_GETPRINTWRAPMODE: - return printParameters.wrapState; + return view.printParameters.wrapState; case SCI_GETSTYLEAT: if (static_cast(wParam) >= pdoc->Length()) @@ -8052,18 +5950,26 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { break; case SCI_SETBUFFEREDDRAW: - bufferedDraw = wParam != 0; + view.bufferedDraw = wParam != 0; break; case SCI_GETBUFFEREDDRAW: - return bufferedDraw; + return view.bufferedDraw; case SCI_GETTWOPHASEDRAW: - return twoPhaseDraw; + return view.phasesDraw == EditView::phasesTwo; case SCI_SETTWOPHASEDRAW: - twoPhaseDraw = wParam != 0; - InvalidateStyleRedraw(); + if (view.SetTwoPhaseDraw(wParam != 0)) + InvalidateStyleRedraw(); + break; + + case SCI_GETPHASESDRAW: + return view.phasesDraw; + + case SCI_SETPHASESDRAW: + if (view.SetPhasesDraw(static_cast(wParam))) + InvalidateStyleRedraw(); break; case SCI_SETFONTQUALITY: @@ -8087,6 +5993,23 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETTABWIDTH: return pdoc->tabInChars; + case SCI_CLEARTABSTOPS: + if (view.ClearTabstops(static_cast(wParam))) { + DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, 0, static_cast(wParam)); + NotifyModified(pdoc, mh, NULL); + } + break; + + case SCI_ADDTABSTOP: + if (view.AddTabstop(static_cast(wParam), static_cast(lParam))) { + DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, 0, static_cast(wParam)); + NotifyModified(pdoc, mh, NULL); + } + break; + + case SCI_GETNEXTTABSTOP: + return view.GetNextTabstop(static_cast(wParam), static_cast(lParam)); + case SCI_SETINDENT: pdoc->indentInChars = static_cast(wParam); if (pdoc->indentInChars != 0) @@ -8197,23 +6120,23 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return vs.wrapIndentMode; case SCI_SETLAYOUTCACHE: - llc.SetLevel(static_cast(wParam)); + view.llc.SetLevel(static_cast(wParam)); break; case SCI_GETLAYOUTCACHE: - return llc.GetLevel(); + return view.llc.GetLevel(); case SCI_SETPOSITIONCACHE: - posCache.SetSize(wParam); + view.posCache.SetSize(wParam); break; case SCI_GETPOSITIONCACHE: - return posCache.GetSize(); + return view.posCache.GetSize(); case SCI_SETSCROLLWIDTH: PLATFORM_ASSERT(wParam > 0); if ((wParam > 0) && (wParam != static_cast(scrollWidth))) { - lineWidthMaxSeen = 0; + view.lineWidthMaxSeen = 0; scrollWidth = static_cast(wParam); SetScrollBars(); } @@ -8374,7 +6297,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { RedrawSelMargin(); break; case SCI_MARKERENABLEHIGHLIGHT: - highlightDelimiter.isEnabled = wParam == 1; + marginView.highlightDelimiter.isEnabled = wParam == 1; RedrawSelMargin(); break; case SCI_MARKERSETBACK: @@ -9441,20 +7364,20 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return multiPasteMode; case SCI_SETADDITIONALCARETSBLINK: - additionalCaretsBlink = wParam != 0; + view.additionalCaretsBlink = wParam != 0; InvalidateCaret(); break; case SCI_GETADDITIONALCARETSBLINK: - return additionalCaretsBlink; + return view.additionalCaretsBlink; case SCI_SETADDITIONALCARETSVISIBLE: - additionalCaretsVisible = wParam != 0; + view.additionalCaretsVisible = wParam != 0; InvalidateCaret(); break; case SCI_GETADDITIONALCARETSVISIBLE: - return additionalCaretsVisible; + return view.additionalCaretsVisible; case SCI_GETSELECTIONS: return sel.Count(); diff --git a/scintilla/src/Editor.h b/scintilla/src/Editor.h index c7d44c16d6..7e505bb093 100644 --- a/scintilla/src/Editor.h +++ b/scintilla/src/Editor.h @@ -12,17 +12,6 @@ namespace Scintilla { #endif -/** - */ -class Caret { -public: - bool active; - bool on; - int period; - - Caret(); -}; - /** */ class Timer { @@ -160,16 +149,9 @@ struct WrapPending { } }; -struct PrintParameters { - int magnification; - int colourMode; - WrapMode wrapState; - PrintParameters(); -}; - /** */ -class Editor : public DocWatcher { +class Editor : public EditModel, public DocWatcher { // Private so Editor objects can not be copied Editor(const Editor &); Editor &operator=(const Editor &); @@ -189,32 +171,17 @@ class Editor : public DocWatcher { Point sizeRGBAImage; float scaleRGBAImage; - PrintParameters printParameters; + MarginView marginView; + EditView view; int cursorMode; - // Highlight current folding block - HighlightDelimiter highlightDelimiter; - bool hasFocus; - bool hideSelection; - bool inOverstrike; - bool drawOverstrikeCaret; bool mouseDownCaptures; - /** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to - * the screen. This avoids flashing but is about 30% slower. */ - bool bufferedDraw; - /** In twoPhaseDraw mode, drawing is performed in two phases, first the background - * and then the foreground. This avoids chopping off characters that overlap the next run. */ - bool twoPhaseDraw; - - int xOffset; ///< Horizontal scrolled amount in pixels int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret bool horizontalScrollBarVisible; int scrollWidth; - bool trackLineWidth; - int lineWidthMaxSeen; bool verticalScrollBarVisible; bool endAtLastLine; int caretSticky; @@ -223,25 +190,11 @@ class Editor : public DocWatcher { bool multipleSelection; bool additionalSelectionTyping; int multiPasteMode; - bool additionalCaretsBlink; - bool additionalCaretsVisible; int virtualSpaceOptions; - Surface *pixmapLine; - Surface *pixmapSelMargin; - Surface *pixmapSelPattern; - Surface *pixmapSelPatternOffset1; - Surface *pixmapIndentGuide; - Surface *pixmapIndentGuideHighlight; - - LineLayoutCache llc; - PositionCache posCache; - SpecialRepresentations reprs; - KeyMap kmap; - Caret caret; Timer timer; Timer autoScrollTimer; enum { autoScrollDelay = 200 }; @@ -257,7 +210,6 @@ class Editor : public DocWatcher { Point ptMouseLast; enum { ddNone, ddInitial, ddDragging } inDragDrop; bool dropWentOutside; - SelectionPosition posDrag; SelectionPosition posDrop; int hotSpotClickPos; int lastXChosen; @@ -274,9 +226,6 @@ class Editor : public DocWatcher { int lengthForEncode; int needUpdateUI; - Position braces[2]; - int bracesMatchStyle; - int highlightGuideColumn; enum { notPainting, painting, paintAbandoned } paintState; bool paintAbandonedByStyling; @@ -288,8 +237,6 @@ class Editor : public DocWatcher { int modEventMask; SelectionText drag; - Selection sel; - bool primarySelection; int caretXPolicy; int caretXSlop; ///< Ensure this many pixels visible on both sides of caret @@ -304,21 +251,13 @@ class Editor : public DocWatcher { bool recordingMacro; - int foldFlags; int foldAutomatic; - ContractionState cs; - - // Hotspot support - Range hotspot; // Wrapping support - int wrapWidth; WrapPending wrapPending; bool convertPastes; - Document *pdoc; - Editor(); virtual ~Editor(); virtual void Initialise() = 0; @@ -333,23 +272,23 @@ class Editor : public DocWatcher { // The top left visible point in main window coordinates. Will be 0,0 except for // scroll views where it will be equivalent to the current scroll position. - virtual Point GetVisibleOriginInMain(); - Point DocumentPointFromView(Point ptView); // Convert a point from view space to document + virtual Point GetVisibleOriginInMain() const; + Point DocumentPointFromView(Point ptView) const; // Convert a point from view space to document int TopLineOfMain() const; // Return the line at Main's y coordinate 0 - virtual PRectangle GetClientRectangle(); + virtual PRectangle GetClientRectangle() const; virtual PRectangle GetClientDrawingRectangle(); - PRectangle GetTextRectangle(); + PRectangle GetTextRectangle() const; - int LinesOnScreen(); - int LinesToScroll(); - int MaxScrollPos(); + virtual int LinesOnScreen() const; + int LinesToScroll() const; + int MaxScrollPos() const; SelectionPosition ClampPositionIntoDocument(SelectionPosition sp) const; Point LocationFromPosition(SelectionPosition pos); Point LocationFromPosition(int pos); int XFromPosition(int pos); int XFromPosition(SelectionPosition sp); SelectionPosition SPositionFromLocation(Point pt, bool canReturnInvalid=false, bool charPosition=false, bool virtualSpace=true); - int PositionFromLocation(Point pt, bool canReturnInvalid=false, bool charPosition=false); + int PositionFromLocation(Point pt, bool canReturnInvalid = false, bool charPosition = false); SelectionPosition SPositionFromLineX(int lineDoc, int x); int PositionFromLineX(int line, int x); int LineFromLocation(Point pt) const; @@ -360,7 +299,7 @@ class Editor : public DocWatcher { virtual void DiscardOverdraw(); virtual void Redraw(); void RedrawSelMargin(int line=-1, bool allAfter=false); - PRectangle RectangleFromRange(Range r); + PRectangle RectangleFromRange(Range r, int overlap); void InvalidateRange(int start, int end); bool UserVirtualSpace() const { @@ -383,8 +322,8 @@ class Editor : public DocWatcher { bool SelectionContainsProtected(); int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true) const; SelectionPosition MovePositionOutsideChar(SelectionPosition pos, int moveDir, bool checkLineEnd=true) const; - int MovePositionTo(SelectionPosition newPos, Selection::selTypes sel=Selection::noSel, bool ensureVisible=true); - int MovePositionTo(int newPos, Selection::selTypes sel=Selection::noSel, bool ensureVisible=true); + int MovePositionTo(SelectionPosition newPos, Selection::selTypes selt=Selection::noSel, bool ensureVisible=true); + int MovePositionTo(int newPos, Selection::selTypes selt=Selection::noSel, bool ensureVisible=true); SelectionPosition MovePositionSoVisible(SelectionPosition pos, int moveDir); SelectionPosition MovePositionSoVisible(int pos, int moveDir); Point PointMainCaret(); @@ -431,30 +370,7 @@ class Editor : public DocWatcher { void LinesJoin(); void LinesSplit(int pixelWidth); - int SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) const; void PaintSelMargin(Surface *surface, PRectangle &rc); - LineLayout *RetrieveLineLayout(int lineNumber); - void LayoutLine(int line, Surface *surface, const ViewStyle &vstyle, LineLayout *ll, - int width=LineLayout::wrapWidthInfinite); - ColourDesired SelectionBackground(const ViewStyle &vsDraw, bool main) const; - ColourDesired TextBackground(const ViewStyle &vsDraw, ColourOptional background, int inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) const; - void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight); - static void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour); - void DrawEOL(Surface *surface, const ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, - int line, int lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart, - ColourOptional background); - static void DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, const ViewStyle &vsDraw, - int xStart, PRectangle rcLine, LineLayout *ll, int subLine); - void DrawIndicators(Surface *surface, const ViewStyle &vsDraw, int line, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine, int lineEnd, bool under); - void DrawAnnotation(Surface *surface, const ViewStyle &vsDraw, int line, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine); - void DrawLine(Surface *surface, const ViewStyle &vsDraw, int line, int lineVisible, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine); - void DrawBlockCaret(Surface *surface, const ViewStyle &vsDraw, LineLayout *ll, int subLine, - int xStart, int offset, int posCaret, PRectangle rcCaret, ColourDesired caretColour) const; - void DrawCarets(Surface *surface, const ViewStyle &vsDraw, int line, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine); void RefreshPixMaps(Surface *surfaceWindow); void Paint(Surface *surfaceWindow, PRectangle rcArea); long FormatRange(bool draw, Sci_RangeToFormat *pfr); @@ -470,7 +386,7 @@ class Editor : public DocWatcher { void FilterSelections(); int InsertSpace(int position, unsigned int spaces); void AddChar(char ch); - virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false); + virtual void AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS=false); void InsertPaste(const char *text, int len); enum PasteShape { pasteStream=0, pasteRectangular = 1, pasteLine = 2 }; void InsertPasteShape(const char *text, int len, PasteShape shape); @@ -530,7 +446,7 @@ class Editor : public DocWatcher { void NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam); void ContainerNeedsUpdate(int flags); - void PageMove(int direction, Selection::selTypes sel=Selection::noSel, bool stuttered = false); + void PageMove(int direction, Selection::selTypes selt=Selection::noSel, bool stuttered = false); enum { cmSame, cmUpper, cmLower }; virtual std::string CaseMapString(const std::string &s, int caseMapping); void ChangeCaseOfSelection(int caseMapping); @@ -538,8 +454,8 @@ class Editor : public DocWatcher { void Duplicate(bool forLine); virtual void CancelModes(); void NewLine(); - void CursorUpOrDown(int direction, Selection::selTypes sel=Selection::noSel); - void ParaUpOrDown(int direction, Selection::selTypes sel=Selection::noSel); + void CursorUpOrDown(int direction, Selection::selTypes selt=Selection::noSel); + void ParaUpOrDown(int direction, Selection::selTypes selt=Selection::noSel); int StartEndDisplayLine(int pos, bool start); virtual int KeyCommand(unsigned int iMessage); virtual int KeyDefault(int /* key */, int /*modifiers*/); @@ -569,7 +485,7 @@ class Editor : public DocWatcher { /** PositionInSelection returns true if position in selection. */ bool PositionInSelection(int pos); bool PointInSelection(Point pt); - bool PointInSelMargin(Point pt); + bool PointInSelMargin(Point pt) const; Window::Cursor GetMarginCursor(Point pt) const; void TrimAndSetSelection(int currentPos_, int anchor_); void LineSelection(int lineCurrentPos_, int lineAnchorPos_, bool wholeLine); @@ -584,7 +500,13 @@ class Editor : public DocWatcher { void Tick(); bool Idle(); - virtual void SetTicking(bool on) = 0; + virtual void SetTicking(bool on); + enum TickReason { tickCaret, tickScroll, tickWiden, tickDwell, tickPlatform }; + virtual void TickFor(TickReason reason); + virtual bool FineTickerAvailable(); + virtual bool FineTickerRunning(TickReason reason); + virtual void FineTickerStart(TickReason reason, int millis, int tolerance); + virtual void FineTickerCancel(TickReason reason); virtual bool SetIdle(bool) { return false; } virtual void SetMouseCapture(bool on) = 0; virtual bool HaveMouseCapture() = 0; diff --git a/scintilla/src/LineMarker.cxx b/scintilla/src/LineMarker.cxx index 8ae815a653..eb36f1bbc4 100644 --- a/scintilla/src/LineMarker.cxx +++ b/scintilla/src/LineMarker.cxx @@ -72,23 +72,23 @@ static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, C } void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, typeOfFold tFold, int marginStyle) const { - ColourDesired head = back; - ColourDesired body = back; - ColourDesired tail = back; + ColourDesired colourHead = back; + ColourDesired colourBody = back; + ColourDesired colourTail = back; switch (tFold) { case LineMarker::head : case LineMarker::headWithTail : - head = backSelected; - tail = backSelected; + colourHead = backSelected; + colourTail = backSelected; break; case LineMarker::body : - head = backSelected; - body = backSelected; + colourHead = backSelected; + colourBody = backSelected; break; case LineMarker::tail : - body = backSelected; - tail = backSelected; + colourBody = backSelected; + colourTail = backSelected; break; default : // LineMarker::undefined @@ -192,69 +192,69 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac // An invisible marker so don't draw anything } else if (markType == SC_MARK_VLINE) { - surface->PenColour(body); + surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, static_cast(rcWhole.bottom)); } else if (markType == SC_MARK_LCORNER) { - surface->PenColour(tail); + surface->PenColour(colourTail); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY); surface->LineTo(static_cast(rc.right) - 1, centreY); } else if (markType == SC_MARK_TCORNER) { - surface->PenColour(tail); + surface->PenColour(colourTail); surface->MoveTo(centreX, centreY); surface->LineTo(static_cast(rc.right) - 1, centreY); - surface->PenColour(body); + surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY + 1); - surface->PenColour(head); + surface->PenColour(colourHead); surface->LineTo(centreX, static_cast(rcWhole.bottom)); } else if (markType == SC_MARK_LCORNERCURVE) { - surface->PenColour(tail); + surface->PenColour(colourTail); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY-3); surface->LineTo(centreX+3, centreY); surface->LineTo(static_cast(rc.right) - 1, centreY); } else if (markType == SC_MARK_TCORNERCURVE) { - surface->PenColour(tail); + surface->PenColour(colourTail); surface->MoveTo(centreX, centreY-3); surface->LineTo(centreX+3, centreY); surface->LineTo(static_cast(rc.right) - 1, centreY); - surface->PenColour(body); + surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY-2); - surface->PenColour(head); + surface->PenColour(colourHead); surface->LineTo(centreX, static_cast(rcWhole.bottom)); } else if (markType == SC_MARK_BOXPLUS) { - DrawBox(surface, centreX, centreY, blobSize, fore, head); - DrawPlus(surface, centreX, centreY, blobSize, tail); + DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); + DrawPlus(surface, centreX, centreY, blobSize, colourTail); } else if (markType == SC_MARK_BOXPLUSCONNECTED) { if (tFold == LineMarker::headWithTail) - surface->PenColour(tail); + surface->PenColour(colourTail); else - surface->PenColour(body); + surface->PenColour(colourBody); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); - surface->PenColour(body); + surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY - blobSize); - DrawBox(surface, centreX, centreY, blobSize, fore, head); - DrawPlus(surface, centreX, centreY, blobSize, tail); + DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); + DrawPlus(surface, centreX, centreY, blobSize, colourTail); if (tFold == LineMarker::body) { - surface->PenColour(tail); + surface->PenColour(colourTail); surface->MoveTo(centreX + 1, centreY + blobSize); surface->LineTo(centreX + blobSize + 1, centreY + blobSize); @@ -265,27 +265,27 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac surface->LineTo(centreX + blobSize + 1, centreY - blobSize); } } else if (markType == SC_MARK_BOXMINUS) { - DrawBox(surface, centreX, centreY, blobSize, fore, head); - DrawMinus(surface, centreX, centreY, blobSize, tail); + DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); + DrawMinus(surface, centreX, centreY, blobSize, colourTail); - surface->PenColour(head); + surface->PenColour(colourHead); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); } else if (markType == SC_MARK_BOXMINUSCONNECTED) { - DrawBox(surface, centreX, centreY, blobSize, fore, head); - DrawMinus(surface, centreX, centreY, blobSize, tail); + DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); + DrawMinus(surface, centreX, centreY, blobSize, colourTail); - surface->PenColour(head); + surface->PenColour(colourHead); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); - surface->PenColour(body); + surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY - blobSize); if (tFold == LineMarker::body) { - surface->PenColour(tail); + surface->PenColour(colourTail); surface->MoveTo(centreX + 1, centreY + blobSize); surface->LineTo(centreX + blobSize + 1, centreY + blobSize); @@ -296,43 +296,43 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac surface->LineTo(centreX + blobSize + 1, centreY - blobSize); } } else if (markType == SC_MARK_CIRCLEPLUS) { - DrawCircle(surface, centreX, centreY, blobSize, fore, head); - DrawPlus(surface, centreX, centreY, blobSize, tail); + DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); + DrawPlus(surface, centreX, centreY, blobSize, colourTail); } else if (markType == SC_MARK_CIRCLEPLUSCONNECTED) { if (tFold == LineMarker::headWithTail) - surface->PenColour(tail); + surface->PenColour(colourTail); else - surface->PenColour(body); + surface->PenColour(colourBody); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); - surface->PenColour(body); + surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY - blobSize); - DrawCircle(surface, centreX, centreY, blobSize, fore, head); - DrawPlus(surface, centreX, centreY, blobSize, tail); + DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); + DrawPlus(surface, centreX, centreY, blobSize, colourTail); } else if (markType == SC_MARK_CIRCLEMINUS) { - surface->PenColour(head); + surface->PenColour(colourHead); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); - DrawCircle(surface, centreX, centreY, blobSize, fore, head); - DrawMinus(surface, centreX, centreY, blobSize, tail); + DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); + DrawMinus(surface, centreX, centreY, blobSize, colourTail); } else if (markType == SC_MARK_CIRCLEMINUSCONNECTED) { - surface->PenColour(head); + surface->PenColour(colourHead); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); - surface->PenColour(body); + surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY - blobSize); - DrawCircle(surface, centreX, centreY, blobSize, fore, head); - DrawMinus(surface, centreX, centreY, blobSize, tail); + DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); + DrawMinus(surface, centreX, centreY, blobSize, colourTail); } else if (markType >= SC_MARK_CHARACTER) { char character[1]; diff --git a/scintilla/src/MarginView.cxx b/scintilla/src/MarginView.cxx new file mode 100644 index 0000000000..9297eb4a80 --- /dev/null +++ b/scintilla/src/MarginView.cxx @@ -0,0 +1,455 @@ +// Scintilla source code edit control +/** @file MarginView.cxx + ** Defines the appearance of the editor margin. + **/ +// Copyright 1998-2014 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "ILexer.h" +#include "Scintilla.h" + +#include "StringCopy.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "RunStyles.h" +#include "ContractionState.h" +#include "CellBuffer.h" +#include "KeyMap.h" +#include "Indicator.h" +#include "XPM.h" +#include "LineMarker.h" +#include "Style.h" +#include "ViewStyle.h" +#include "CharClassify.h" +#include "Decoration.h" +#include "CaseFolder.h" +#include "Document.h" +#include "UniConversion.h" +#include "Selection.h" +#include "PositionCache.h" +#include "EditModel.h" +#include "MarginView.h" +#include "EditView.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +void DrawWrapMarker(Surface *surface, PRectangle rcPlace, + bool isEndMarker, ColourDesired wrapColour) { + surface->PenColour(wrapColour); + + enum { xa = 1 }; // gap before start + int w = static_cast(rcPlace.right - rcPlace.left) - xa - 1; + + bool xStraight = isEndMarker; // x-mirrored symbol for start marker + + int x0 = static_cast(xStraight ? rcPlace.left : rcPlace.right - 1); + int y0 = static_cast(rcPlace.top); + + int dy = static_cast(rcPlace.bottom - rcPlace.top) / 5; + int y = static_cast(rcPlace.bottom - rcPlace.top) / 2 + dy; + + struct Relative { + Surface *surface; + int xBase; + int xDir; + int yBase; + int yDir; + void MoveTo(int xRelative, int yRelative) { + surface->MoveTo(xBase + xDir * xRelative, yBase + yDir * yRelative); + } + void LineTo(int xRelative, int yRelative) { + surface->LineTo(xBase + xDir * xRelative, yBase + yDir * yRelative); + } + }; + Relative rel = { surface, x0, xStraight ? 1 : -1, y0, 1 }; + + // arrow head + rel.MoveTo(xa, y); + rel.LineTo(xa + 2 * w / 3, y - dy); + rel.MoveTo(xa, y); + rel.LineTo(xa + 2 * w / 3, y + dy); + + // arrow body + rel.MoveTo(xa, y); + rel.LineTo(xa + w, y); + rel.LineTo(xa + w, y - 2 * dy); + rel.LineTo(xa - 1, // on windows lineto is exclusive endpoint, perhaps GTK not... + y - 2 * dy); +} + +MarginView::MarginView() { + pixmapSelMargin = 0; + pixmapSelPattern = 0; + pixmapSelPatternOffset1 = 0; +} + +void MarginView::DropGraphics(bool freeObjects) { + if (freeObjects) { + delete pixmapSelMargin; + pixmapSelMargin = 0; + delete pixmapSelPattern; + pixmapSelPattern = 0; + delete pixmapSelPatternOffset1; + pixmapSelPatternOffset1 = 0; + } else { + if (pixmapSelMargin) + pixmapSelMargin->Release(); + if (pixmapSelPattern) + pixmapSelPattern->Release(); + if (pixmapSelPatternOffset1) + pixmapSelPatternOffset1->Release(); + } +} + +void MarginView::AllocateGraphics(const ViewStyle &vsDraw) { + if (!pixmapSelMargin) + pixmapSelMargin = Surface::Allocate(vsDraw.technology); + if (!pixmapSelPattern) + pixmapSelPattern = Surface::Allocate(vsDraw.technology); + if (!pixmapSelPatternOffset1) + pixmapSelPatternOffset1 = Surface::Allocate(vsDraw.technology); +} + +void MarginView::RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw) { + if (!pixmapSelPattern->Initialised()) { + const int patternSize = 8; + pixmapSelPattern->InitPixMap(patternSize, patternSize, surfaceWindow, wid); + pixmapSelPatternOffset1->InitPixMap(patternSize, patternSize, surfaceWindow, wid); + // This complex procedure is to reproduce the checkerboard dithered pattern used by windows + // for scroll bars and Visual Studio for its selection margin. The colour of this pattern is half + // way between the chrome colour and the chrome highlight colour making a nice transition + // between the window chrome and the content area. And it works in low colour depths. + PRectangle rcPattern = PRectangle::FromInts(0, 0, patternSize, patternSize); + + // Initialize default colours based on the chrome colour scheme. Typically the highlight is white. + ColourDesired colourFMFill = vsDraw.selbar; + ColourDesired colourFMStripes = vsDraw.selbarlight; + + if (!(vsDraw.selbarlight == ColourDesired(0xff, 0xff, 0xff))) { + // User has chosen an unusual chrome colour scheme so just use the highlight edge colour. + // (Typically, the highlight colour is white.) + colourFMFill = vsDraw.selbarlight; + } + + if (vsDraw.foldmarginColour.isSet) { + // override default fold margin colour + colourFMFill = vsDraw.foldmarginColour; + } + if (vsDraw.foldmarginHighlightColour.isSet) { + // override default fold margin highlight colour + colourFMStripes = vsDraw.foldmarginHighlightColour; + } + + pixmapSelPattern->FillRectangle(rcPattern, colourFMFill); + pixmapSelPatternOffset1->FillRectangle(rcPattern, colourFMStripes); + for (int y = 0; y < patternSize; y++) { + for (int x = y % 2; x < patternSize; x += 2) { + PRectangle rcPixel = PRectangle::FromInts(x, y, x + 1, y + 1); + pixmapSelPattern->FillRectangle(rcPixel, colourFMStripes); + pixmapSelPatternOffset1->FillRectangle(rcPixel, colourFMFill); + } + } + } +} + +static int SubstituteMarkerIfEmpty(int markerCheck, int markerDefault, const ViewStyle &vs) { + if (vs.markers[markerCheck].markType == SC_MARK_EMPTY) + return markerDefault; + return markerCheck; +} + +void MarginView::PaintMargin(Surface *surface, int topLine, PRectangle rc, PRectangle rcMargin, + const EditModel &model, const ViewStyle &vs) { + + PRectangle rcSelMargin = rcMargin; + rcSelMargin.right = rcMargin.left; + if (rcSelMargin.bottom < rc.bottom) + rcSelMargin.bottom = rc.bottom; + + Point ptOrigin = model.GetVisibleOriginInMain(); + FontAlias fontLineNumber = vs.styles[STYLE_LINENUMBER].font; + for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) { + if (vs.ms[margin].width > 0) { + + rcSelMargin.left = rcSelMargin.right; + rcSelMargin.right = rcSelMargin.left + vs.ms[margin].width; + + if (vs.ms[margin].style != SC_MARGIN_NUMBER) { + if (vs.ms[margin].mask & SC_MASK_FOLDERS) { + // Required because of special way brush is created for selection margin + // Ensure patterns line up when scrolling with separate margin view + // by choosing correctly aligned variant. + bool invertPhase = static_cast(ptOrigin.y) & 1; + surface->FillRectangle(rcSelMargin, + invertPhase ? *pixmapSelPattern : *pixmapSelPatternOffset1); + } else { + ColourDesired colour; + switch (vs.ms[margin].style) { + case SC_MARGIN_BACK: + colour = vs.styles[STYLE_DEFAULT].back; + break; + case SC_MARGIN_FORE: + colour = vs.styles[STYLE_DEFAULT].fore; + break; + default: + colour = vs.styles[STYLE_LINENUMBER].back; + break; + } + surface->FillRectangle(rcSelMargin, colour); + } + } else { + surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back); + } + + const int lineStartPaint = static_cast(rcMargin.top + ptOrigin.y) / vs.lineHeight; + int visibleLine = model.TopLineOfMain() + lineStartPaint; + int yposScreen = lineStartPaint * vs.lineHeight - static_cast(ptOrigin.y); + // Work out whether the top line is whitespace located after a + // lessening of fold level which implies a 'fold tail' but which should not + // be displayed until the last of a sequence of whitespace. + bool needWhiteClosure = false; + if (vs.ms[margin].mask & SC_MASK_FOLDERS) { + int level = model.pdoc->GetLevel(model.cs.DocFromDisplay(visibleLine)); + if (level & SC_FOLDLEVELWHITEFLAG) { + int lineBack = model.cs.DocFromDisplay(visibleLine); + int levelPrev = level; + while ((lineBack > 0) && (levelPrev & SC_FOLDLEVELWHITEFLAG)) { + lineBack--; + levelPrev = model.pdoc->GetLevel(lineBack); + } + if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) { + if ((level & SC_FOLDLEVELNUMBERMASK) < (levelPrev & SC_FOLDLEVELNUMBERMASK)) + needWhiteClosure = true; + } + } + if (highlightDelimiter.isEnabled) { + int lastLine = model.cs.DocFromDisplay(topLine + model.LinesOnScreen()) + 1; + model.pdoc->GetHighlightDelimiters(highlightDelimiter, model.pdoc->LineFromPosition(model.sel.MainCaret()), lastLine); + } + } + + // Old code does not know about new markers needed to distinguish all cases + const int folderOpenMid = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEROPENMID, + SC_MARKNUM_FOLDEROPEN, vs); + const int folderEnd = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEREND, + SC_MARKNUM_FOLDER, vs); + + while ((visibleLine < model.cs.LinesDisplayed()) && yposScreen < rc.bottom) { + + PLATFORM_ASSERT(visibleLine < model.cs.LinesDisplayed()); + const int lineDoc = model.cs.DocFromDisplay(visibleLine); + PLATFORM_ASSERT(model.cs.GetVisible(lineDoc)); + const bool firstSubLine = visibleLine == model.cs.DisplayFromDoc(lineDoc); + const bool lastSubLine = visibleLine == model.cs.DisplayLastFromDoc(lineDoc); + + int marks = model.pdoc->GetMark(lineDoc); + if (!firstSubLine) + marks = 0; + + bool headWithTail = false; + + if (vs.ms[margin].mask & SC_MASK_FOLDERS) { + // Decide which fold indicator should be displayed + const int level = model.pdoc->GetLevel(lineDoc); + const int levelNext = model.pdoc->GetLevel(lineDoc + 1); + const int levelNum = level & SC_FOLDLEVELNUMBERMASK; + const int levelNextNum = levelNext & SC_FOLDLEVELNUMBERMASK; + if (level & SC_FOLDLEVELHEADERFLAG) { + if (firstSubLine) { + if (levelNum < levelNextNum) { + if (model.cs.GetExpanded(lineDoc)) { + if (levelNum == SC_FOLDLEVELBASE) + marks |= 1 << SC_MARKNUM_FOLDEROPEN; + else + marks |= 1 << folderOpenMid; + } else { + if (levelNum == SC_FOLDLEVELBASE) + marks |= 1 << SC_MARKNUM_FOLDER; + else + marks |= 1 << folderEnd; + } + } else if (levelNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + } else { + if (levelNum < levelNextNum) { + if (model.cs.GetExpanded(lineDoc)) { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } else if (levelNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + } else if (levelNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + } + needWhiteClosure = false; + const int firstFollowupLine = model.cs.DocFromDisplay(model.cs.DisplayFromDoc(lineDoc + 1)); + const int firstFollowupLineLevel = model.pdoc->GetLevel(firstFollowupLine); + const int secondFollowupLineLevelNum = model.pdoc->GetLevel(firstFollowupLine + 1) & SC_FOLDLEVELNUMBERMASK; + if (!model.cs.GetExpanded(lineDoc)) { + if ((firstFollowupLineLevel & SC_FOLDLEVELWHITEFLAG) && + (levelNum > secondFollowupLineLevelNum)) + needWhiteClosure = true; + + if (highlightDelimiter.IsFoldBlockHighlighted(firstFollowupLine)) + headWithTail = true; + } + } else if (level & SC_FOLDLEVELWHITEFLAG) { + if (needWhiteClosure) { + if (levelNext & SC_FOLDLEVELWHITEFLAG) { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } else if (levelNextNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; + needWhiteClosure = false; + } else { + marks |= 1 << SC_MARKNUM_FOLDERTAIL; + needWhiteClosure = false; + } + } else if (levelNum > SC_FOLDLEVELBASE) { + if (levelNextNum < levelNum) { + if (levelNextNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; + } else { + marks |= 1 << SC_MARKNUM_FOLDERTAIL; + } + } else { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + } + } else if (levelNum > SC_FOLDLEVELBASE) { + if (levelNextNum < levelNum) { + needWhiteClosure = false; + if (levelNext & SC_FOLDLEVELWHITEFLAG) { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + needWhiteClosure = true; + } else if (lastSubLine) { + if (levelNextNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; + } else { + marks |= 1 << SC_MARKNUM_FOLDERTAIL; + } + } else { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + } else { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + } + } + + marks &= vs.ms[margin].mask; + + PRectangle rcMarker = rcSelMargin; + rcMarker.top = static_cast(yposScreen); + rcMarker.bottom = static_cast(yposScreen + vs.lineHeight); + if (vs.ms[margin].style == SC_MARGIN_NUMBER) { + if (firstSubLine) { + char number[100] = ""; + if (lineDoc >= 0) + sprintf(number, "%d", lineDoc + 1); + if (model.foldFlags & (SC_FOLDFLAG_LEVELNUMBERS | SC_FOLDFLAG_LINESTATE)) { + if (model.foldFlags & SC_FOLDFLAG_LEVELNUMBERS) { + int lev = model.pdoc->GetLevel(lineDoc); + sprintf(number, "%c%c %03X %03X", + (lev & SC_FOLDLEVELHEADERFLAG) ? 'H' : '_', + (lev & SC_FOLDLEVELWHITEFLAG) ? 'W' : '_', + lev & SC_FOLDLEVELNUMBERMASK, + lev >> 16 + ); + } else { + int state = model.pdoc->GetLineState(lineDoc); + sprintf(number, "%0X", state); + } + } + PRectangle rcNumber = rcMarker; + // Right justify + XYPOSITION width = surface->WidthText(fontLineNumber, number, static_cast(strlen(number))); + XYPOSITION xpos = rcNumber.right - width - vs.marginNumberPadding; + rcNumber.left = xpos; + DrawTextNoClipPhase(surface, rcNumber, vs.styles[STYLE_LINENUMBER], + rcNumber.top + vs.maxAscent, number, static_cast(strlen(number)), drawAll); + } else if (vs.wrapVisualFlags & SC_WRAPVISUALFLAG_MARGIN) { + PRectangle rcWrapMarker = rcMarker; + rcWrapMarker.right -= 3; + rcWrapMarker.left = rcWrapMarker.right - vs.styles[STYLE_LINENUMBER].aveCharWidth; + DrawWrapMarker(surface, rcWrapMarker, false, vs.styles[STYLE_LINENUMBER].fore); + } + } else if (vs.ms[margin].style == SC_MARGIN_TEXT || vs.ms[margin].style == SC_MARGIN_RTEXT) { + if (firstSubLine) { + const StyledText stMargin = model.pdoc->MarginStyledText(lineDoc); + if (stMargin.text && ValidStyledText(vs, vs.marginStyleOffset, stMargin)) { + surface->FillRectangle(rcMarker, + vs.styles[stMargin.StyleAt(0) + vs.marginStyleOffset].back); + if (vs.ms[margin].style == SC_MARGIN_RTEXT) { + int width = WidestLineWidth(surface, vs, vs.marginStyleOffset, stMargin); + rcMarker.left = rcMarker.right - width - 3; + } + DrawStyledText(surface, vs, vs.marginStyleOffset, rcMarker, + stMargin, 0, stMargin.length, drawAll); + } + } + } + + if (marks) { + for (int markBit = 0; (markBit < 32) && marks; markBit++) { + if (marks & 1) { + LineMarker::typeOfFold tFold = LineMarker::undefined; + if ((vs.ms[margin].mask & SC_MASK_FOLDERS) && highlightDelimiter.IsFoldBlockHighlighted(lineDoc)) { + if (highlightDelimiter.IsBodyOfFoldBlock(lineDoc)) { + tFold = LineMarker::body; + } else if (highlightDelimiter.IsHeadOfFoldBlock(lineDoc)) { + if (firstSubLine) { + tFold = headWithTail ? LineMarker::headWithTail : LineMarker::head; + } else { + if (model.cs.GetExpanded(lineDoc) || headWithTail) { + tFold = LineMarker::body; + } else { + tFold = LineMarker::undefined; + } + } + } else if (highlightDelimiter.IsTailOfFoldBlock(lineDoc)) { + tFold = LineMarker::tail; + } + } + vs.markers[markBit].Draw(surface, rcMarker, fontLineNumber, tFold, vs.ms[margin].style); + } + marks >>= 1; + } + } + + visibleLine++; + yposScreen += vs.lineHeight; + } + } + } + + PRectangle rcBlankMargin = rcMargin; + rcBlankMargin.left = rcSelMargin.right; + surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back); +} + +#ifdef SCI_NAMESPACE +} +#endif + diff --git a/scintilla/src/MarginView.h b/scintilla/src/MarginView.h new file mode 100644 index 0000000000..465095f295 --- /dev/null +++ b/scintilla/src/MarginView.h @@ -0,0 +1,41 @@ +// Scintilla source code edit control +/** @file MarginView.h + ** Defines the appearance of the editor margin. + **/ +// Copyright 1998-2014 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef MARGINVIEW_H +#define MARGINVIEW_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour); + +/** +* MarginView draws the margins. +*/ +class MarginView { +public: + Surface *pixmapSelMargin; + Surface *pixmapSelPattern; + Surface *pixmapSelPatternOffset1; + // Highlight current folding block + HighlightDelimiter highlightDelimiter; + + MarginView(); + + void DropGraphics(bool freeObjects); + void AllocateGraphics(const ViewStyle &vsDraw); + void RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw); + void PaintMargin(Surface *surface, int topLine, PRectangle rc, PRectangle rcMargin, + const EditModel &model, const ViewStyle &vs); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/scintilla/src/PerLine.cxx b/scintilla/src/PerLine.cxx index 8b0dbc44b7..8fd96cbedf 100644 --- a/scintilla/src/PerLine.cxx +++ b/scintilla/src/PerLine.cxx @@ -7,6 +7,7 @@ #include +#include #include #include "Platform.h" @@ -484,3 +485,72 @@ int LineAnnotation::Lines(int line) const { else return 0; } + +LineTabstops::~LineTabstops() { + Init(); +} + +void LineTabstops::Init() { + for (int line = 0; line < tabstops.Length(); line++) { + delete tabstops[line]; + } + tabstops.DeleteAll(); +} + +void LineTabstops::InsertLine(int line) { + if (tabstops.Length()) { + tabstops.EnsureLength(line); + tabstops.Insert(line, 0); + } +} + +void LineTabstops::RemoveLine(int line) { + if (tabstops.Length() > line) { + delete tabstops[line]; + tabstops.Delete(line); + } +} + +bool LineTabstops::ClearTabstops(int line) { + if (line < tabstops.Length()) { + TabstopList *tl = tabstops[line]; + if (tl) { + tl->clear(); + return true; + } + } + return false; +} + +bool LineTabstops::AddTabstop(int line, int x) { + tabstops.EnsureLength(line + 1); + if (!tabstops[line]) { + tabstops[line] = new TabstopList(); + } + + TabstopList *tl = tabstops[line]; + if (tl) { + // tabstop positions are kept in order - insert in the right place + std::vector::iterator it = std::lower_bound(tl->begin(), tl->end(), x); + // don't insert duplicates + if (it == tl->end() || *it != x) { + tl->insert(it, x); + return true; + } + } + return false; +} + +int LineTabstops::GetNextTabstop(int line, int x) const { + if (line < tabstops.Length()) { + TabstopList *tl = tabstops[line]; + if (tl) { + for (size_t i = 0; i < tl->size(); i++) { + if ((*tl)[i] > x) { + return (*tl)[i]; + } + } + } + } + return 0; +} diff --git a/scintilla/src/PerLine.h b/scintilla/src/PerLine.h index 70d0023e40..4bf1c88fdd 100644 --- a/scintilla/src/PerLine.h +++ b/scintilla/src/PerLine.h @@ -112,6 +112,23 @@ class LineAnnotation : public PerLine { int Lines(int line) const; }; +typedef std::vector TabstopList; + +class LineTabstops : public PerLine { + SplitVector tabstops; +public: + LineTabstops() { + } + virtual ~LineTabstops(); + virtual void Init(); + virtual void InsertLine(int line); + virtual void RemoveLine(int line); + + bool ClearTabstops(int line); + bool AddTabstop(int line, int x); + int GetNextTabstop(int line, int x) const; +}; + #ifdef SCI_NAMESPACE } #endif diff --git a/scintilla/src/PositionCache.cxx b/scintilla/src/PositionCache.cxx index 9e55c1a82f..53767e0326 100644 --- a/scintilla/src/PositionCache.cxx +++ b/scintilla/src/PositionCache.cxx @@ -438,13 +438,12 @@ void BreakFinder::Insert(int val) { } } -BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, int lineStart_, int lineEnd_, int posLineStart_, +BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lineRange_, int posLineStart_, int xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_) : ll(ll_), - lineStart(lineStart_), - lineEnd(lineEnd_), + lineRange(lineRange_), posLineStart(posLineStart_), - nextBreak(lineStart_), + nextBreak(lineRange_.start), saeCurrentPos(0), saeNext(0), subBreak(-1), @@ -455,15 +454,15 @@ BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, int lineS // Search for first visible break // First find the first visible character if (xStart > 0.0f) - nextBreak = ll->FindBefore(static_cast(xStart), lineStart, lineEnd); + nextBreak = ll->FindBefore(static_cast(xStart), lineRange.start, lineRange.end); // Now back to a style break - while ((nextBreak > lineStart) && (ll->styles[nextBreak] == ll->styles[nextBreak - 1])) { + while ((nextBreak > lineRange.start) && (ll->styles[nextBreak] == ll->styles[nextBreak - 1])) { nextBreak--; } if (breakForSelection) { SelectionPosition posStart(posLineStart); - SelectionPosition posEnd(posLineStart + lineEnd); + SelectionPosition posEnd(posLineStart + lineRange.end); SelectionSegment segmentLine(posStart, posEnd); for (size_t r=0; rCount(); r++) { SelectionSegment portion = psel->Range(r).Intersect(segmentLine); @@ -477,7 +476,7 @@ BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, int lineS } Insert(ll->edgeColumn); - Insert(lineEnd); + Insert(lineRange.end); saeNext = (!selAndEdge.empty()) ? selAndEdge[0] : -1; } @@ -487,19 +486,19 @@ BreakFinder::~BreakFinder() { TextSegment BreakFinder::Next() { if (subBreak == -1) { int prev = nextBreak; - while (nextBreak < lineEnd) { + while (nextBreak < lineRange.end) { int charWidth = 1; if (encodingFamily == efUnicode) - charWidth = UTF8DrawBytes(reinterpret_cast(ll->chars) + nextBreak, lineEnd - nextBreak); + charWidth = UTF8DrawBytes(reinterpret_cast(ll->chars) + nextBreak, lineRange.end - nextBreak); else if (encodingFamily == efDBCS) charWidth = pdoc->IsDBCSLeadByte(ll->chars[nextBreak]) ? 2 : 1; const Representation *repr = preprs->RepresentationFromCharacter(ll->chars + nextBreak, charWidth); if (((nextBreak > 0) && (ll->styles[nextBreak] != ll->styles[nextBreak - 1])) || repr || (nextBreak == saeNext)) { - while ((nextBreak >= saeNext) && (saeNext < lineEnd)) { + while ((nextBreak >= saeNext) && (saeNext < lineRange.end)) { saeCurrentPos++; - saeNext = (saeCurrentPos < selAndEdge.size()) ? selAndEdge[saeCurrentPos] : lineEnd; + saeNext = (saeCurrentPos < selAndEdge.size()) ? selAndEdge[saeCurrentPos] : lineRange.end; } if ((nextBreak > prev) || repr) { // Have a segment to report @@ -540,7 +539,7 @@ TextSegment BreakFinder::Next() { } bool BreakFinder::More() const { - return (subBreak >= 0) || (nextBreak < lineEnd); + return (subBreak >= 0) || (nextBreak < lineRange.end); } PositionCacheEntry::PositionCacheEntry() : diff --git a/scintilla/src/PositionCache.h b/scintilla/src/PositionCache.h index 05005e9ac6..9d9821f8fa 100644 --- a/scintilla/src/PositionCache.h +++ b/scintilla/src/PositionCache.h @@ -104,7 +104,7 @@ class PositionCacheEntry { public: PositionCacheEntry(); ~PositionCacheEntry(); - void Set(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_, unsigned int clock); + void Set(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_, unsigned int clock_); void Clear(); bool Retrieve(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_) const; static unsigned int Hash(unsigned int styleNumber_, const char *s, unsigned int len); @@ -148,8 +148,7 @@ struct TextSegment { // Class to break a line of text into shorter runs at sensible places. class BreakFinder { const LineLayout *ll; - int lineStart; - int lineEnd; + Range lineRange; int posLineStart; int nextBreak; std::vector selAndEdge; @@ -168,7 +167,7 @@ class BreakFinder { enum { lengthStartSubdivision = 300 }; // Try to make each subdivided run lengthEachSubdivision or shorter. enum { lengthEachSubdivision = 100 }; - BreakFinder(const LineLayout *ll_, const Selection *psel, int lineStart_, int lineEnd_, int posLineStart_, + BreakFinder(const LineLayout *ll_, const Selection *psel, Range rangeLine_, int posLineStart_, int xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_); ~BreakFinder(); TextSegment Next(); diff --git a/scintilla/src/RESearch.cxx b/scintilla/src/RESearch.cxx index 74db013559..138469f0a2 100644 --- a/scintilla/src/RESearch.cxx +++ b/scintilla/src/RESearch.cxx @@ -203,6 +203,7 @@ #include #include +#include #include "CharClassify.h" #include "RESearch.h" @@ -251,22 +252,18 @@ const char bitarr[] = { 1, 2, 4, 8, 16, 32, 64, '\200' }; RESearch::RESearch(CharClassify *charClassTable) { failure = 0; charClass = charClassTable; - Init(); + sta = NOP; /* status of lastpat */ + bol = 0; + std::fill(bittab, bittab + BITBLK, 0); + std::fill(tagstk, tagstk + MAXTAG, 0); + std::fill(nfa, nfa + MAXNFA, 0); + Clear(); } RESearch::~RESearch() { Clear(); } -void RESearch::Init() { - sta = NOP; /* status of lastpat */ - bol = 0; - for (int i = 0; i < MAXTAG; i++) - pat[i].clear(); - for (int j = 0; j < BITBLK; j++) - bittab[j] = 0; -} - void RESearch::Clear() { for (int i = 0; i < MAXTAG; i++) { pat[i].clear(); diff --git a/scintilla/src/RESearch.h b/scintilla/src/RESearch.h index 48533a41c1..38875a3f46 100644 --- a/scintilla/src/RESearch.h +++ b/scintilla/src/RESearch.h @@ -46,7 +46,6 @@ class RESearch { std::string pat[MAXTAG]; private: - void Init(); void Clear(); void ChSet(unsigned char c); void ChSetWithCase(unsigned char c, bool caseSensitive); diff --git a/scintilla/src/ScintillaBase.cxx b/scintilla/src/ScintillaBase.cxx index d42dfc7ff6..ee7818ef24 100644 --- a/scintilla/src/ScintillaBase.cxx +++ b/scintilla/src/ScintillaBase.cxx @@ -50,6 +50,9 @@ #include "Document.h" #include "Selection.h" #include "PositionCache.h" +#include "EditModel.h" +#include "MarginView.h" +#include "EditView.h" #include "Editor.h" #include "AutoComplete.h" #include "ScintillaBase.h" @@ -73,7 +76,7 @@ void ScintillaBase::Finalise() { popup.Destroy(); } -void ScintillaBase::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { +void ScintillaBase::AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS) { bool isFillUp = ac.Active() && ac.IsFillUpChar(*s); if (!isFillUp) { Editor::AddCharUTF(s, len, treatAsDBCS); diff --git a/scintilla/src/ScintillaBase.h b/scintilla/src/ScintillaBase.h index 8440ebecc9..668abed3cd 100644 --- a/scintilla/src/ScintillaBase.h +++ b/scintilla/src/ScintillaBase.h @@ -38,6 +38,8 @@ class ScintillaBase : public Editor { idcmdSelectAll=16 }; + enum { maxLenInputIME = 200 }; + bool displayPopupMenu; Menu popup; AutoComplete ac; @@ -60,7 +62,7 @@ class ScintillaBase : public Editor { virtual void Initialise() = 0; virtual void Finalise(); - virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false); + virtual void AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS=false); void Command(int cmdId); virtual void CancelModes(); virtual int KeyCommand(unsigned int iMessage); diff --git a/scintilla/src/Selection.cxx b/scintilla/src/Selection.cxx index b46dca890d..52ed5774eb 100644 --- a/scintilla/src/Selection.cxx +++ b/scintilla/src/Selection.cxx @@ -81,6 +81,11 @@ int SelectionRange::Length() const { } } +void SelectionRange::MoveForInsertDelete(bool insertion, int startChange, int length) { + caret.MoveForInsertDelete(insertion, startChange, length); + anchor.MoveForInsertDelete(insertion, startChange, length); +} + bool SelectionRange::Contains(int pos) const { if (anchor > caret) return (pos >= caret.Position()) && (pos <= anchor.Position()); @@ -283,9 +288,11 @@ int Selection::Length() const { void Selection::MovePositions(bool insertion, int startChange, int length) { for (size_t i=0; i lineHeight) + lineOverlap = lineHeight; someStylesProtected = false; someStylesForceCase = false; @@ -470,6 +476,14 @@ ColourOptional ViewStyle::Background(int marksOfLine, bool caretActive, bool lin return background; } +bool ViewStyle::SelectionBackgroundDrawn() const { + return selColours.back.isSet && + ((selAlpha == SC_ALPHA_NOALPHA) || (selAdditionalAlpha == SC_ALPHA_NOALPHA)); +} + +bool ViewStyle::WhitespaceBackgroundDrawn() const { + return (viewWhitespace != wsInvisible) && (whitespaceColours.back.isSet); +} ColourDesired ViewStyle::WrapColour() const { if (whitespaceColours.fore.isSet) diff --git a/scintilla/src/ViewStyle.h b/scintilla/src/ViewStyle.h index 60bd9688ee..4a4ffcdf0e 100644 --- a/scintilla/src/ViewStyle.h +++ b/scintilla/src/ViewStyle.h @@ -85,6 +85,7 @@ class ViewStyle { Indicator indicators[INDIC_MAX + 1]; int technology; int lineHeight; + int lineOverlap; unsigned int maxAscent; unsigned int maxDescent; XYPOSITION aveCharWidth; @@ -170,7 +171,10 @@ class ViewStyle { bool ValidStyle(size_t styleIndex) const; void CalcLargestMarkerHeight(); ColourOptional Background(int marksOfLine, bool caretActive, bool lineContainsCaret) const; + bool SelectionBackgroundDrawn() const; + bool WhitespaceBackgroundDrawn() const; ColourDesired WrapColour() const; + bool SetWrapState(int wrapState_); bool SetWrapVisualFlags(int wrapVisualFlags_); bool SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation_); diff --git a/scintilla/version.txt b/scintilla/version.txt index 4772052f59..0fecf6533b 100644 --- a/scintilla/version.txt +++ b/scintilla/version.txt @@ -1 +1 @@ -344 +350 From 74ef1b8344a34810771f69ef7b82a8aeca57e894 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 10 Aug 2014 02:21:54 +0200 Subject: [PATCH 048/737] Update for new Scintilla styles --- data/filetypes.rust | 3 +++ src/highlighting.c | 3 +++ src/highlightingmappings.h | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/data/filetypes.rust b/data/filetypes.rust index 7f8d2bd64b..b6109c7815 100644 --- a/data/filetypes.rust +++ b/data/filetypes.rust @@ -14,6 +14,9 @@ word4=type string=string_1 stringraw=string_2 character=character +bytestring=string_1 +bytestringraw=string_2 +bytecharacter=character operator=operator identifier=identifier_1 lifetime=parameter diff --git a/src/highlighting.c b/src/highlighting.c index 6a79ebf854..5a46189aab 100644 --- a/src/highlighting.c +++ b/src/highlighting.c @@ -1550,8 +1550,11 @@ gboolean highlighting_is_string_style(gint lexer, gint style) case SCLEX_RUST: return (style == SCE_RUST_CHARACTER || + style == SCE_RUST_BYTECHARACTER || style == SCE_RUST_STRING || style == SCE_RUST_STRINGR || + style == SCE_RUST_BYTESTRING || + style == SCE_RUST_BYTESTRINGR || style == SCE_RUST_LEXERROR); } return FALSE; diff --git a/src/highlightingmappings.h b/src/highlightingmappings.h index 2b5652783d..d0042b2047 100644 --- a/src/highlightingmappings.h +++ b/src/highlightingmappings.h @@ -1326,7 +1326,10 @@ static const HLStyle highlighting_styles_RUST[] = { SCE_RUST_IDENTIFIER, "identifier", FALSE }, { SCE_RUST_LIFETIME, "lifetime", FALSE }, { SCE_RUST_MACRO, "macro", FALSE }, - { SCE_RUST_LEXERROR, "lexerror", FALSE } + { SCE_RUST_LEXERROR, "lexerror", FALSE }, + { SCE_RUST_BYTESTRING, "bytestring", FALSE }, + { SCE_RUST_BYTESTRINGR, "bytestringr", FALSE }, + { SCE_RUST_BYTECHARACTER, "bytecharacter", FALSE } }; static const HLKeyword highlighting_keywords_RUST[] = { From 852f3266507ccd06a894a797c67881cc21e5dca7 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 10 Aug 2014 14:57:33 +0200 Subject: [PATCH 049/737] prefs: Pack keybinding-related globals together and avoid much direct access This however doesn't get rid of any of the global data itself, it only pack it in a struct and passes pointer to this struct around instead of accessing the global whenever possible. --- src/prefs.c | 162 +++++++++++++++++++++++++--------------------------- 1 file changed, 79 insertions(+), 83 deletions(-) diff --git a/src/prefs.c b/src/prefs.c index d973526aab..2f76290396 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -68,20 +68,24 @@ GeanyPrefs prefs; GeanyToolPrefs tool_prefs; -/* keybinding globals, should be put in a struct */ -static GtkTreeIter g_iter; -static GtkTreeStore *store = NULL; -static GtkTreeView *tree = NULL; -static GtkWidget *dialog_label; -static gboolean edited = FALSE; +typedef struct +{ + GtkTreeIter iter; + GtkTreeStore *store; + GtkTreeView *tree; + GtkWidget *dialog_label; + gboolean edited; +} +KbData; +static KbData global_kb_data = { {0}, NULL, NULL, NULL, FALSE }; static GtkTreeView *various_treeview = NULL; static GeanyKeyBinding *kb_index(guint gidx, guint kid); -static void kb_cell_edited_cb(GtkCellRendererText *cellrenderertext, gchar *path, gchar *new_text, gpointer user_data); -static gboolean kb_grab_key_dialog_key_press_cb(GtkWidget *dialog, GdkEventKey *event, gpointer user_data); -static void kb_grab_key_dialog_response_cb(GtkWidget *dialog, gint response, gpointer user_data); -static gboolean kb_find_duplicate(GtkWidget *parent, GtkTreeIter *old_iter, +static void kb_cell_edited_cb(GtkCellRendererText *cellrenderertext, gchar *path, gchar *new_text, KbData *kbdata); +static gboolean kb_grab_key_dialog_key_press_cb(GtkWidget *dialog, GdkEventKey *event, KbData *kbdata); +static void kb_grab_key_dialog_response_cb(GtkWidget *dialog, gint response, KbData *kbdata); +static gboolean kb_find_duplicate(GtkTreeStore *store, GtkWidget *parent, GtkTreeIter *old_iter, guint key, GdkModifierType mods, const gchar *shortcut); static void on_toolbar_show_toggled(GtkToggleButton *togglebutton, gpointer user_data); static void on_show_notebook_tabs_toggled(GtkToggleButton *togglebutton, gpointer user_data); @@ -144,29 +148,29 @@ enum }; -static void kb_tree_view_change_button_clicked_cb(GtkWidget *button, gpointer data) +static void kb_tree_view_change_button_clicked_cb(GtkWidget *button, KbData *kbdata) { GtkTreeModel *model; GtkTreeSelection *selection; gchar *name; - selection = gtk_tree_view_get_selection(tree); - if (gtk_tree_selection_get_selected(selection, &model, &g_iter)) + selection = gtk_tree_view_get_selection(kbdata->tree); + if (gtk_tree_selection_get_selected(selection, &model, &kbdata->iter)) { - if (gtk_tree_model_iter_has_child(model, &g_iter)) + if (gtk_tree_model_iter_has_child(model, &kbdata->iter)) { /* double click on a section to expand or collapse it */ - GtkTreePath *path = gtk_tree_model_get_path(model, &g_iter); + GtkTreePath *path = gtk_tree_model_get_path(model, &kbdata->iter); - if (gtk_tree_view_row_expanded(tree, path)) - gtk_tree_view_collapse_row(tree, path); + if (gtk_tree_view_row_expanded(kbdata->tree, path)) + gtk_tree_view_collapse_row(kbdata->tree, path); else - gtk_tree_view_expand_row(tree, path, FALSE); + gtk_tree_view_expand_row(kbdata->tree, path, FALSE); gtk_tree_path_free(path); return; } - gtk_tree_model_get(model, &g_iter, KB_TREE_ACTION, &name, -1); + gtk_tree_model_get(model, &kbdata->iter, KB_TREE_ACTION, &name, -1); if (name != NULL) { GtkWidget *dialog; @@ -184,13 +188,13 @@ static void kb_tree_view_change_button_clicked_cb(GtkWidget *button, gpointer da gtk_misc_set_padding(GTK_MISC(label), 5, 10); gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), label); - dialog_label = gtk_label_new(""); - gtk_misc_set_padding(GTK_MISC(dialog_label), 5, 10); - gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), dialog_label); + kbdata->dialog_label = gtk_label_new(""); + gtk_misc_set_padding(GTK_MISC(kbdata->dialog_label), 5, 10); + gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), kbdata->dialog_label); g_signal_connect(dialog, "key-press-event", - G_CALLBACK(kb_grab_key_dialog_key_press_cb), NULL); - g_signal_connect(dialog, "response", G_CALLBACK(kb_grab_key_dialog_response_cb), NULL); + G_CALLBACK(kb_grab_key_dialog_key_press_cb), kbdata); + g_signal_connect(dialog, "response", G_CALLBACK(kb_grab_key_dialog_response_cb), kbdata); gtk_widget_show_all(dialog); g_free(str); @@ -200,16 +204,7 @@ static void kb_tree_view_change_button_clicked_cb(GtkWidget *button, gpointer da } -static void kb_expand_collapse_cb(GtkWidget *item, gpointer user_data) -{ - if (user_data != NULL) - gtk_tree_view_expand_all(tree); - else - gtk_tree_view_collapse_all(tree); -} - - -static void kb_show_popup_menu(GtkWidget *widget, GdkEventButton *event) +static void kb_show_popup_menu(KbData *kbdata, GtkWidget *widget, GdkEventButton *event) { GtkWidget *item; static GtkWidget *menu = NULL; @@ -223,12 +218,12 @@ static void kb_show_popup_menu(GtkWidget *widget, GdkEventButton *event) item = ui_image_menu_item_new(GTK_STOCK_ADD, _("_Expand All")); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); - g_signal_connect(item, "activate", G_CALLBACK(kb_expand_collapse_cb), GINT_TO_POINTER(TRUE)); + g_signal_connect_swapped(item, "activate", G_CALLBACK(gtk_tree_view_expand_all), kbdata->tree); item = ui_image_menu_item_new(GTK_STOCK_REMOVE, _("_Collapse All")); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); - g_signal_connect(item, "activate", G_CALLBACK(kb_expand_collapse_cb), NULL); + g_signal_connect_swapped(item, "activate", G_CALLBACK(gtk_tree_view_collapse_all), kbdata->tree); gtk_menu_attach_to_widget(GTK_MENU(menu), widget, NULL); } @@ -248,52 +243,52 @@ static void kb_show_popup_menu(GtkWidget *widget, GdkEventButton *event) } -static gboolean kb_popup_menu_cb(GtkWidget *widget, gpointer data) +static gboolean kb_popup_menu_cb(GtkWidget *widget, KbData *kbdata) { - kb_show_popup_menu(widget, NULL); + kb_show_popup_menu(kbdata, widget, NULL); return TRUE; } static gboolean kb_tree_view_button_press_event_cb(GtkWidget *widget, GdkEventButton *event, - gpointer user_data) + KbData *kbdata) { if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { - kb_show_popup_menu(widget, event); + kb_show_popup_menu(kbdata, widget, event); return TRUE; } else if (event->type == GDK_2BUTTON_PRESS) { - kb_tree_view_change_button_clicked_cb(NULL, NULL); + kb_tree_view_change_button_clicked_cb(NULL, kbdata); return TRUE; } return FALSE; } -static void kb_init_tree(void) +static void kb_init_tree(KbData *kbdata) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; - tree = GTK_TREE_VIEW(ui_lookup_widget(ui_widgets.prefs_dialog, "treeview7")); + kbdata->tree = GTK_TREE_VIEW(ui_lookup_widget(ui_widgets.prefs_dialog, "treeview7")); - store = gtk_tree_store_new(KB_TREE_COLUMNS, + kbdata->store = gtk_tree_store_new(KB_TREE_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_BOOLEAN, G_TYPE_INT); - gtk_tree_view_set_model(GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); - g_object_unref(store); + gtk_tree_view_set_model(GTK_TREE_VIEW(kbdata->tree), GTK_TREE_MODEL(kbdata->store)); + g_object_unref(kbdata->store); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Action"), renderer, "text", KB_TREE_ACTION, "weight", KB_TREE_WEIGHT, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); + gtk_tree_view_append_column(GTK_TREE_VIEW(kbdata->tree), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Shortcut"), renderer, "text", KB_TREE_SHORTCUT, "editable", KB_TREE_EDITABLE, "weight", KB_TREE_WEIGHT, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); + gtk_tree_view_append_column(GTK_TREE_VIEW(kbdata->tree), column); /* set policy settings for the scrolled window around the treeview again, because glade * doesn't keep the settings */ @@ -301,11 +296,11 @@ static void kb_init_tree(void) GTK_SCROLLED_WINDOW(ui_lookup_widget(ui_widgets.prefs_dialog, "scrolledwindow8")), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - g_signal_connect(renderer, "edited", G_CALLBACK(kb_cell_edited_cb), NULL); - g_signal_connect(tree, "button-press-event", G_CALLBACK(kb_tree_view_button_press_event_cb), NULL); - g_signal_connect(tree, "popup-menu", G_CALLBACK(kb_popup_menu_cb), NULL); + g_signal_connect(renderer, "edited", G_CALLBACK(kb_cell_edited_cb), kbdata); + g_signal_connect(kbdata->tree, "button-press-event", G_CALLBACK(kb_tree_view_button_press_event_cb), kbdata); + g_signal_connect(kbdata->tree, "popup-menu", G_CALLBACK(kb_popup_menu_cb), kbdata); g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button2"), "clicked", - G_CALLBACK(kb_tree_view_change_button_clicked_cb), NULL); + G_CALLBACK(kb_tree_view_change_button_clicked_cb), kbdata); } @@ -336,8 +331,9 @@ void prefs_kb_search_name(const gchar *search) GtkTreeIter iter; gboolean valid; GtkTreeModel *model; + KbData *kbdata = &global_kb_data; - model = gtk_tree_view_get_model(tree); + model = gtk_tree_view_get_model(kbdata->tree); valid = gtk_tree_model_get_iter_first(model, &iter); while (valid) { @@ -347,7 +343,7 @@ void prefs_kb_search_name(const gchar *search) if (g_strcmp0(name, search) == 0) { GtkTreePath *path = gtk_tree_model_get_path(model, &iter); - gtk_tree_view_scroll_to_cell(tree, path, NULL, TRUE, .0f, .0f); + gtk_tree_view_scroll_to_cell(kbdata->tree, path, NULL, TRUE, .0f, .0f); gtk_tree_path_free(path); g_free(name); break; @@ -358,7 +354,7 @@ void prefs_kb_search_name(const gchar *search) } -static void kb_init(void) +static void kb_init(KbData *kbdata) { GtkTreeIter parent, iter; gsize g, i; @@ -366,26 +362,26 @@ static void kb_init(void) GeanyKeyGroup *group; GeanyKeyBinding *kb; - if (store == NULL) - kb_init_tree(); + if (kbdata->store == NULL) + kb_init_tree(kbdata); foreach_ptr_array(group, g, keybinding_groups) { - gtk_tree_store_append(store, &parent, NULL); - gtk_tree_store_set(store, &parent, KB_TREE_ACTION, group->label, + gtk_tree_store_append(kbdata->store, &parent, NULL); + gtk_tree_store_set(kbdata->store, &parent, KB_TREE_ACTION, group->label, KB_TREE_INDEX, g, -1); foreach_ptr_array(kb, i, group->key_items) { label = keybindings_get_label(kb); - gtk_tree_store_append(store, &iter, &parent); - gtk_tree_store_set(store, &iter, KB_TREE_ACTION, label, + gtk_tree_store_append(kbdata->store, &iter, &parent); + gtk_tree_store_set(kbdata->store, &iter, KB_TREE_ACTION, label, KB_TREE_EDITABLE, TRUE, KB_TREE_INDEX, kb->id, -1); - kb_set_shortcut(store, &iter, kb->key, kb->mods); + kb_set_shortcut(kbdata->store, &iter, kb->key, kb->mods); g_free(label); } } - gtk_tree_view_expand_all(GTK_TREE_VIEW(tree)); + gtk_tree_view_expand_all(GTK_TREE_VIEW(kbdata->tree)); } @@ -704,7 +700,7 @@ static void prefs_init_dialog(void) /* Keybindings */ - kb_init(); + kb_init(&global_kb_data); /* Printing */ { @@ -813,9 +809,9 @@ static GeanyKeyBinding *kb_index(guint gidx, guint kid) /* read the treeview shortcut fields into keybindings */ -static void kb_update(void) +static void kb_update(KbData *kbdata) { - GtkTreeModel *model = GTK_TREE_MODEL(store); + GtkTreeModel *model = GTK_TREE_MODEL(kbdata->store); GtkTreeIter child, parent; guint gid = 0; @@ -1189,9 +1185,9 @@ on_prefs_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) /* Keybindings */ - if (edited) + if (global_kb_data.edited) { - kb_update(); + kb_update(&global_kb_data); tools_create_insert_custom_command_menu_items(); keybindings_write_to_file(); } @@ -1309,7 +1305,7 @@ on_prefs_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) } else if (response != GTK_RESPONSE_APPLY) { - gtk_tree_store_clear(store); + gtk_tree_store_clear(global_kb_data.store); gtk_widget_hide(GTK_WIDGET(dialog)); } } @@ -1370,41 +1366,41 @@ static void on_prefs_font_choosed(GtkFontButton *widget, gpointer user_data) } -static void kb_change_iter_shortcut(GtkTreeIter *iter, const gchar *new_text) +static void kb_change_iter_shortcut(KbData *kbdata, GtkTreeIter *iter, const gchar *new_text) { guint lkey; GdkModifierType lmods; gtk_accelerator_parse(new_text, &lkey, &lmods); - if (kb_find_duplicate(ui_widgets.prefs_dialog, iter, lkey, lmods, new_text)) + if (kb_find_duplicate(kbdata->store, ui_widgets.prefs_dialog, iter, lkey, lmods, new_text)) return; /* set the values here, because of the above check, setting it in * gtk_accelerator_parse would return a wrong key combination if it is duplicate */ - kb_set_shortcut(store, iter, lkey, lmods); + kb_set_shortcut(kbdata->store, iter, lkey, lmods); - edited = TRUE; + kbdata->edited = TRUE; } static void kb_cell_edited_cb(GtkCellRendererText *cellrenderertext, - gchar *path, gchar *new_text, gpointer user_data) + gchar *path, gchar *new_text, KbData *kbdata) { if (path != NULL && new_text != NULL) { GtkTreeIter iter; - gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(store), &iter, path); - if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(store), &iter)) + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(kbdata->store), &iter, path); + if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(kbdata->store), &iter)) return; /* ignore group items */ - kb_change_iter_shortcut(&iter, new_text); + kb_change_iter_shortcut(kbdata, &iter, new_text); } } -static gboolean kb_grab_key_dialog_key_press_cb(GtkWidget *dialog, GdkEventKey *event, gpointer user_data) +static gboolean kb_grab_key_dialog_key_press_cb(GtkWidget *dialog, GdkEventKey *event, KbData *kbdata) { gchar *str; guint state; @@ -1416,20 +1412,20 @@ static gboolean kb_grab_key_dialog_key_press_cb(GtkWidget *dialog, GdkEventKey * str = gtk_accelerator_name(event->keyval, state); - gtk_label_set_text(GTK_LABEL(dialog_label), str); + gtk_label_set_text(GTK_LABEL(kbdata->dialog_label), str); g_free(str); return TRUE; } -static void kb_grab_key_dialog_response_cb(GtkWidget *dialog, gint response, G_GNUC_UNUSED gpointer iter) +static void kb_grab_key_dialog_response_cb(GtkWidget *dialog, gint response, KbData *kbdata) { if (response == GTK_RESPONSE_ACCEPT) { - const gchar *new_text = gtk_label_get_text(GTK_LABEL(dialog_label)); + const gchar *new_text = gtk_label_get_text(GTK_LABEL(kbdata->dialog_label)); - kb_change_iter_shortcut(&g_iter, new_text); + kb_change_iter_shortcut(kbdata, &kbdata->iter, new_text); } gtk_widget_destroy(dialog); } @@ -1437,7 +1433,7 @@ static void kb_grab_key_dialog_response_cb(GtkWidget *dialog, gint response, G_G /* test if the entered key combination is already used * returns true if cancelling duplicate */ -static gboolean kb_find_duplicate(GtkWidget *parent, GtkTreeIter *old_iter, +static gboolean kb_find_duplicate(GtkTreeStore *store, GtkWidget *parent, GtkTreeIter *old_iter, guint key, GdkModifierType mods, const gchar *shortcut) { GtkTreeModel *model = GTK_TREE_MODEL(store); From 2559cda95408bd8b32a96baff1918a78ce649c75 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 10 Aug 2014 15:28:29 +0200 Subject: [PATCH 050/737] prefs: Remove some global state in keybinding-related code Use gtk_dialog_run() to run the key input dialog, which is modal anyway. This avoids having to pass the label and the iter around for the dialog response callback to have them, as they now only are used directly in the function setting them in the first place. --- src/prefs.c | 53 +++++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/src/prefs.c b/src/prefs.c index 2f76290396..ed2a3e1057 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -70,21 +70,19 @@ GeanyToolPrefs tool_prefs; typedef struct { - GtkTreeIter iter; GtkTreeStore *store; GtkTreeView *tree; - GtkWidget *dialog_label; gboolean edited; } KbData; -static KbData global_kb_data = { {0}, NULL, NULL, NULL, FALSE }; +static KbData global_kb_data = { NULL, NULL, FALSE }; static GtkTreeView *various_treeview = NULL; static GeanyKeyBinding *kb_index(guint gidx, guint kid); static void kb_cell_edited_cb(GtkCellRendererText *cellrenderertext, gchar *path, gchar *new_text, KbData *kbdata); -static gboolean kb_grab_key_dialog_key_press_cb(GtkWidget *dialog, GdkEventKey *event, KbData *kbdata); -static void kb_grab_key_dialog_response_cb(GtkWidget *dialog, gint response, KbData *kbdata); +static gboolean kb_grab_key_dialog_key_press_cb(GtkWidget *dialog, GdkEventKey *event, GtkLabel *label); +static void kb_change_iter_shortcut(KbData *kbdata, GtkTreeIter *iter, const gchar *new_text); static gboolean kb_find_duplicate(GtkTreeStore *store, GtkWidget *parent, GtkTreeIter *old_iter, guint key, GdkModifierType mods, const gchar *shortcut); static void on_toolbar_show_toggled(GtkToggleButton *togglebutton, gpointer user_data); @@ -151,15 +149,16 @@ enum static void kb_tree_view_change_button_clicked_cb(GtkWidget *button, KbData *kbdata) { GtkTreeModel *model; + GtkTreeIter iter; GtkTreeSelection *selection; gchar *name; selection = gtk_tree_view_get_selection(kbdata->tree); - if (gtk_tree_selection_get_selected(selection, &model, &kbdata->iter)) + if (gtk_tree_selection_get_selected(selection, &model, &iter)) { - if (gtk_tree_model_iter_has_child(model, &kbdata->iter)) + if (gtk_tree_model_iter_has_child(model, &iter)) { /* double click on a section to expand or collapse it */ - GtkTreePath *path = gtk_tree_model_get_path(model, &kbdata->iter); + GtkTreePath *path = gtk_tree_model_get_path(model, &iter); if (gtk_tree_view_row_expanded(kbdata->tree, path)) gtk_tree_view_collapse_row(kbdata->tree, path); @@ -170,11 +169,12 @@ static void kb_tree_view_change_button_clicked_cb(GtkWidget *button, KbData *kbd return; } - gtk_tree_model_get(model, &kbdata->iter, KB_TREE_ACTION, &name, -1); + gtk_tree_model_get(model, &iter, KB_TREE_ACTION, &name, -1); if (name != NULL) { GtkWidget *dialog; GtkWidget *label; + GtkWidget *accel_label; gchar *str; dialog = gtk_dialog_new_with_buttons(_("Grab Key"), GTK_WINDOW(ui_widgets.prefs_dialog), @@ -188,15 +188,22 @@ static void kb_tree_view_change_button_clicked_cb(GtkWidget *button, KbData *kbd gtk_misc_set_padding(GTK_MISC(label), 5, 10); gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), label); - kbdata->dialog_label = gtk_label_new(""); - gtk_misc_set_padding(GTK_MISC(kbdata->dialog_label), 5, 10); - gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), kbdata->dialog_label); + accel_label = gtk_label_new(""); + gtk_misc_set_padding(GTK_MISC(accel_label), 5, 10); + gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), accel_label); g_signal_connect(dialog, "key-press-event", - G_CALLBACK(kb_grab_key_dialog_key_press_cb), kbdata); - g_signal_connect(dialog, "response", G_CALLBACK(kb_grab_key_dialog_response_cb), kbdata); + G_CALLBACK(kb_grab_key_dialog_key_press_cb), accel_label); gtk_widget_show_all(dialog); + if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) + { + const gchar *new_text = gtk_label_get_text(GTK_LABEL(accel_label)); + + kb_change_iter_shortcut(kbdata, &iter, new_text); + } + gtk_widget_destroy(dialog); + g_free(str); g_free(name); } @@ -1400,11 +1407,13 @@ static void kb_cell_edited_cb(GtkCellRendererText *cellrenderertext, } -static gboolean kb_grab_key_dialog_key_press_cb(GtkWidget *dialog, GdkEventKey *event, KbData *kbdata) +static gboolean kb_grab_key_dialog_key_press_cb(GtkWidget *dialog, GdkEventKey *event, GtkLabel *label) { gchar *str; guint state; + g_return_val_if_fail(GTK_IS_LABEL(label), FALSE); + state = event->state & gtk_accelerator_get_default_mod_mask(); if (event->keyval == GDK_Escape) @@ -1412,25 +1421,13 @@ static gboolean kb_grab_key_dialog_key_press_cb(GtkWidget *dialog, GdkEventKey * str = gtk_accelerator_name(event->keyval, state); - gtk_label_set_text(GTK_LABEL(kbdata->dialog_label), str); + gtk_label_set_text(label, str); g_free(str); return TRUE; } -static void kb_grab_key_dialog_response_cb(GtkWidget *dialog, gint response, KbData *kbdata) -{ - if (response == GTK_RESPONSE_ACCEPT) - { - const gchar *new_text = gtk_label_get_text(GTK_LABEL(kbdata->dialog_label)); - - kb_change_iter_shortcut(kbdata, &kbdata->iter, new_text); - } - gtk_widget_destroy(dialog); -} - - /* test if the entered key combination is already used * returns true if cancelling duplicate */ static gboolean kb_find_duplicate(GtkTreeStore *store, GtkWidget *parent, GtkTreeIter *old_iter, From 5fcacf066d7150cdfa9408b82141230209bafe2e Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 11 Aug 2014 15:44:51 +0200 Subject: [PATCH 051/737] Add user data to GeanyInputCallback, avoiding global variable hacks --- src/build.c | 4 ++-- src/dialogs.c | 35 ++++++++++++++++++----------------- src/dialogs.h | 4 ++-- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/build.c b/src/build.c index b4f71be88c..eefdd72196 100644 --- a/src/build.c +++ b/src/build.c @@ -1361,7 +1361,7 @@ static void build_command(GeanyDocument *doc, GeanyBuildGroup grp, guint cmd, gc * Create build menu and handle callbacks (&toolbar callbacks) * *----------------------------------------------------------------*/ -static void on_make_custom_input_response(const gchar *input) +static void on_make_custom_input_response(const gchar *input, gpointer data) { GeanyDocument *doc = document_get_current(); @@ -1393,7 +1393,7 @@ static void on_build_menu_item(GtkWidget *w, gpointer user_data) { dialog = dialogs_show_input_persistent(_("Custom Text"), GTK_WINDOW(main_widgets.window), _("Enter custom text here, all entered text is appended to the command."), - build_info.custom_target, &on_make_custom_input_response); + build_info.custom_target, &on_make_custom_input_response, NULL); } else { diff --git a/src/dialogs.c b/src/dialogs.c index 279ff9f13b..2a52e4f99e 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -932,13 +932,14 @@ on_input_dialog_response(GtkDialog *dialog, gint response, GtkWidget *entry) const gchar *str = gtk_entry_get_text(GTK_ENTRY(entry)); GeanyInputCallback input_cb = (GeanyInputCallback) g_object_get_data(G_OBJECT(dialog), "input_cb"); + gpointer input_cb_data = g_object_get_data(G_OBJECT(dialog), "input_cb_data"); if (persistent) { GtkWidget *combo = (GtkWidget *) g_object_get_data(G_OBJECT(dialog), "combo"); ui_combo_box_add_to_history(GTK_COMBO_BOX_TEXT(combo), str, 0); } - input_cb(str); + input_cb(str, input_cb_data); } gtk_widget_hide(GTK_WIDGET(dialog)); } @@ -946,7 +947,7 @@ on_input_dialog_response(GtkDialog *dialog, gint response, GtkWidget *entry) static void add_input_widgets(GtkWidget *dialog, GtkWidget *vbox, const gchar *label_text, const gchar *default_text, gboolean persistent, - GCallback insert_text_cb) + GCallback insert_text_cb, gpointer insert_text_cb_data) { GtkWidget *entry; @@ -982,7 +983,7 @@ static void add_input_widgets(GtkWidget *dialog, GtkWidget *vbox, gtk_entry_set_width_chars(GTK_ENTRY(entry), 30); if (insert_text_cb != NULL) - g_signal_connect(entry, "insert-text", insert_text_cb, NULL); + g_signal_connect(entry, "insert-text", insert_text_cb, insert_text_cb_data); g_signal_connect(entry, "activate", G_CALLBACK(on_input_entry_activate), dialog); g_signal_connect(dialog, "show", G_CALLBACK(on_input_dialog_show), entry); g_signal_connect(dialog, "response", G_CALLBACK(on_input_dialog_response), entry); @@ -997,7 +998,8 @@ static void add_input_widgets(GtkWidget *dialog, GtkWidget *vbox, static GtkWidget * dialogs_show_input_full(const gchar *title, GtkWindow *parent, const gchar *label_text, const gchar *default_text, - gboolean persistent, GeanyInputCallback input_cb, GCallback insert_text_cb) + gboolean persistent, GeanyInputCallback input_cb, gpointer input_cb_data, + GCallback insert_text_cb, gpointer insert_text_cb_data) { GtkWidget *dialog, *vbox; @@ -1010,8 +1012,9 @@ dialogs_show_input_full(const gchar *title, GtkWindow *parent, g_object_set_data(G_OBJECT(dialog), "has_combo", GINT_TO_POINTER(persistent)); g_object_set_data(G_OBJECT(dialog), "input_cb", (gpointer) input_cb); + g_object_set_data(G_OBJECT(dialog), "input_cb_data", input_cb_data); - add_input_widgets(dialog, vbox, label_text, default_text, persistent, insert_text_cb); + add_input_widgets(dialog, vbox, label_text, default_text, persistent, insert_text_cb, insert_text_cb_data); if (persistent) { @@ -1032,18 +1035,16 @@ dialogs_show_input_full(const gchar *title, GtkWindow *parent, GtkWidget * dialogs_show_input_persistent(const gchar *title, GtkWindow *parent, const gchar *label_text, const gchar *default_text, - GeanyInputCallback input_cb) + GeanyInputCallback input_cb, gpointer input_cb_data) { - return dialogs_show_input_full(title, parent, label_text, default_text, TRUE, input_cb, NULL); + return dialogs_show_input_full(title, parent, label_text, default_text, TRUE, input_cb, input_cb_data, NULL, NULL); } -/* ugly hack - user_data not supported for callback */ -static gchar *dialog_input = NULL; - -static void on_dialog_input(const gchar *str) +static void on_dialog_input(const gchar *str, gpointer data) { - dialog_input = g_strdup(str); + gchar **dialog_input = data; + *dialog_input = g_strdup(str); } @@ -1058,8 +1059,8 @@ static void on_dialog_input(const gchar *str) gchar *dialogs_show_input(const gchar *title, GtkWindow *parent, const gchar *label_text, const gchar *default_text) { - dialog_input = NULL; - dialogs_show_input_full(title, parent, label_text, default_text, FALSE, on_dialog_input, NULL); + gchar *dialog_input = NULL; + dialogs_show_input_full(title, parent, label_text, default_text, FALSE, on_dialog_input, &dialog_input, NULL, NULL); return dialog_input; } @@ -1070,10 +1071,10 @@ gchar *dialogs_show_input(const gchar *title, GtkWindow *parent, const gchar *la gchar *dialogs_show_input_goto_line(const gchar *title, GtkWindow *parent, const gchar *label_text, const gchar *default_text) { - dialog_input = NULL; + gchar *dialog_input = NULL; dialogs_show_input_full( - title, parent, label_text, default_text, FALSE, on_dialog_input, - G_CALLBACK(ui_editable_insert_text_callback)); + title, parent, label_text, default_text, FALSE, on_dialog_input, &dialog_input, + G_CALLBACK(ui_editable_insert_text_callback), NULL); return dialog_input; } diff --git a/src/dialogs.h b/src/dialogs.h index 8d82cb895c..a3750133f6 100644 --- a/src/dialogs.h +++ b/src/dialogs.h @@ -34,7 +34,7 @@ G_BEGIN_DECLS -typedef void (*GeanyInputCallback)(const gchar *text); +typedef void (*GeanyInputCallback)(const gchar *text, gpointer data); void dialogs_show_open_file(void); @@ -56,7 +56,7 @@ gchar *dialogs_show_input_goto_line(const gchar *title, GtkWindow *parent, const gchar *label_text, const gchar *default_text); GtkWidget *dialogs_show_input_persistent(const gchar *title, GtkWindow *parent, - const gchar *label_text, const gchar *default_text, GeanyInputCallback input_cb); + const gchar *label_text, const gchar *default_text, GeanyInputCallback input_cb, gpointer input_cb_data); gboolean dialogs_show_input_numeric(const gchar *title, const gchar *label_text, gdouble *value, gdouble min, gdouble max, gdouble step); From 571239e0bf07752b2059376ca815f3b1efa115a9 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 11 Aug 2014 16:38:09 +0200 Subject: [PATCH 052/737] dialogs: Remove an unnecessary function indirection Having add_input_widgets() didn't really make the code any simpler, rather obfuscating it a little. --- src/dialogs.c | 54 +++++++++++++++++++++------------------------------ 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/src/dialogs.c b/src/dialogs.c index 2a52e4f99e..833bc0f209 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -945,11 +945,29 @@ on_input_dialog_response(GtkDialog *dialog, gint response, GtkWidget *entry) } -static void add_input_widgets(GtkWidget *dialog, GtkWidget *vbox, - const gchar *label_text, const gchar *default_text, gboolean persistent, - GCallback insert_text_cb, gpointer insert_text_cb_data) +/* Create and display an input dialog. + * persistent: whether to remember previous entry text in a combo box; + * in this case the dialog returned is not destroyed on a response, + * and can be reshown. + * Returns: the dialog widget. */ +static GtkWidget * +dialogs_show_input_full(const gchar *title, GtkWindow *parent, + const gchar *label_text, const gchar *default_text, + gboolean persistent, GeanyInputCallback input_cb, gpointer input_cb_data, + GCallback insert_text_cb, gpointer insert_text_cb_data) { - GtkWidget *entry; + GtkWidget *dialog, *vbox, *entry; + + dialog = gtk_dialog_new_with_buttons(title, parent, + GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); + vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); + gtk_widget_set_name(dialog, "GeanyDialog"); + gtk_box_set_spacing(GTK_BOX(vbox), 6); + + g_object_set_data(G_OBJECT(dialog), "has_combo", GINT_TO_POINTER(persistent)); + g_object_set_data(G_OBJECT(dialog), "input_cb", (gpointer) input_cb); + g_object_set_data(G_OBJECT(dialog), "input_cb_data", input_cb_data); if (label_text) { @@ -987,34 +1005,6 @@ static void add_input_widgets(GtkWidget *dialog, GtkWidget *vbox, g_signal_connect(entry, "activate", G_CALLBACK(on_input_entry_activate), dialog); g_signal_connect(dialog, "show", G_CALLBACK(on_input_dialog_show), entry); g_signal_connect(dialog, "response", G_CALLBACK(on_input_dialog_response), entry); -} - - -/* Create and display an input dialog. - * persistent: whether to remember previous entry text in a combo box; - * in this case the dialog returned is not destroyed on a response, - * and can be reshown. - * Returns: the dialog widget. */ -static GtkWidget * -dialogs_show_input_full(const gchar *title, GtkWindow *parent, - const gchar *label_text, const gchar *default_text, - gboolean persistent, GeanyInputCallback input_cb, gpointer input_cb_data, - GCallback insert_text_cb, gpointer insert_text_cb_data) -{ - GtkWidget *dialog, *vbox; - - dialog = gtk_dialog_new_with_buttons(title, parent, - GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); - vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); - gtk_widget_set_name(dialog, "GeanyDialog"); - gtk_box_set_spacing(GTK_BOX(vbox), 6); - - g_object_set_data(G_OBJECT(dialog), "has_combo", GINT_TO_POINTER(persistent)); - g_object_set_data(G_OBJECT(dialog), "input_cb", (gpointer) input_cb); - g_object_set_data(G_OBJECT(dialog), "input_cb_data", input_cb_data); - - add_input_widgets(dialog, vbox, label_text, default_text, persistent, insert_text_cb, insert_text_cb_data); if (persistent) { From 36a6dd2e2c1808adedcc1135ffc70a210c77350d Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 11 Aug 2014 16:52:26 +0200 Subject: [PATCH 053/737] dialogs: Don't abuse GObject data --- src/dialogs.c | 70 +++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/src/dialogs.c b/src/dialogs.c index 833bc0f209..86e0f9a5cf 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -922,24 +922,28 @@ on_input_numeric_activate(GtkEntry *entry, GtkDialog *dialog) } -static void -on_input_dialog_response(GtkDialog *dialog, gint response, GtkWidget *entry) +typedef struct { - gboolean persistent = (gboolean) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog), "has_combo")); + GtkWidget *entry; + GtkWidget *combo; + + GeanyInputCallback callback; + gpointer data; +} +InputDialogData; + +static void +on_input_dialog_response(GtkDialog *dialog, gint response, InputDialogData *data) +{ if (response == GTK_RESPONSE_ACCEPT) { - const gchar *str = gtk_entry_get_text(GTK_ENTRY(entry)); - GeanyInputCallback input_cb = - (GeanyInputCallback) g_object_get_data(G_OBJECT(dialog), "input_cb"); - gpointer input_cb_data = g_object_get_data(G_OBJECT(dialog), "input_cb_data"); + const gchar *str = gtk_entry_get_text(GTK_ENTRY(data->entry)); - if (persistent) - { - GtkWidget *combo = (GtkWidget *) g_object_get_data(G_OBJECT(dialog), "combo"); - ui_combo_box_add_to_history(GTK_COMBO_BOX_TEXT(combo), str, 0); - } - input_cb(str, input_cb_data); + if (data->combo != NULL) + ui_combo_box_add_to_history(GTK_COMBO_BOX_TEXT(data->combo), str, 0); + + data->callback(str, data->data); } gtk_widget_hide(GTK_WIDGET(dialog)); } @@ -956,7 +960,8 @@ dialogs_show_input_full(const gchar *title, GtkWindow *parent, gboolean persistent, GeanyInputCallback input_cb, gpointer input_cb_data, GCallback insert_text_cb, gpointer insert_text_cb_data) { - GtkWidget *dialog, *vbox, *entry; + GtkWidget *dialog, *vbox; + InputDialogData *data = g_malloc(sizeof *data); dialog = gtk_dialog_new_with_buttons(title, parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -965,9 +970,10 @@ dialogs_show_input_full(const gchar *title, GtkWindow *parent, gtk_widget_set_name(dialog, "GeanyDialog"); gtk_box_set_spacing(GTK_BOX(vbox), 6); - g_object_set_data(G_OBJECT(dialog), "has_combo", GINT_TO_POINTER(persistent)); - g_object_set_data(G_OBJECT(dialog), "input_cb", (gpointer) input_cb); - g_object_set_data(G_OBJECT(dialog), "input_cb_data", input_cb_data); + data->combo = NULL; + data->entry = NULL; + data->callback = input_cb; + data->data = input_cb_data; if (label_text) { @@ -979,32 +985,30 @@ dialogs_show_input_full(const gchar *title, GtkWindow *parent, if (persistent) /* remember previous entry text in a combo box */ { - GtkWidget *combo = gtk_combo_box_text_new_with_entry(); - - entry = gtk_bin_get_child(GTK_BIN(combo)); - ui_entry_add_clear_icon(GTK_ENTRY(entry)); - g_object_set_data(G_OBJECT(dialog), "combo", combo); - gtk_container_add(GTK_CONTAINER(vbox), combo); + data->combo = gtk_combo_box_text_new_with_entry(); + data->entry = gtk_bin_get_child(GTK_BIN(data->combo)); + ui_entry_add_clear_icon(GTK_ENTRY(data->entry)); + gtk_container_add(GTK_CONTAINER(vbox), data->combo); } else { - entry = gtk_entry_new(); - ui_entry_add_clear_icon(GTK_ENTRY(entry)); - gtk_container_add(GTK_CONTAINER(vbox), entry); + data->entry = gtk_entry_new(); + ui_entry_add_clear_icon(GTK_ENTRY(data->entry)); + gtk_container_add(GTK_CONTAINER(vbox), data->entry); } if (default_text != NULL) { - gtk_entry_set_text(GTK_ENTRY(entry), default_text); + gtk_entry_set_text(GTK_ENTRY(data->entry), default_text); } - gtk_entry_set_max_length(GTK_ENTRY(entry), 255); - gtk_entry_set_width_chars(GTK_ENTRY(entry), 30); + gtk_entry_set_max_length(GTK_ENTRY(data->entry), 255); + gtk_entry_set_width_chars(GTK_ENTRY(data->entry), 30); if (insert_text_cb != NULL) - g_signal_connect(entry, "insert-text", insert_text_cb, insert_text_cb_data); - g_signal_connect(entry, "activate", G_CALLBACK(on_input_entry_activate), dialog); - g_signal_connect(dialog, "show", G_CALLBACK(on_input_dialog_show), entry); - g_signal_connect(dialog, "response", G_CALLBACK(on_input_dialog_response), entry); + g_signal_connect(data->entry, "insert-text", insert_text_cb, insert_text_cb_data); + g_signal_connect(data->entry, "activate", G_CALLBACK(on_input_entry_activate), dialog); + g_signal_connect(dialog, "show", G_CALLBACK(on_input_dialog_show), data->entry); + g_signal_connect_data(dialog, "response", G_CALLBACK(on_input_dialog_response), data, (GClosureNotify)g_free, 0); if (persistent) { From 6ed6a995651dc8e239df3ba23dda2f3df3aa23ac Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 12 Aug 2014 14:38:48 +0200 Subject: [PATCH 054/737] about: Don't leak global variables to the program scope --- src/about.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/about.c b/src/about.c index a800d31abc..8bf37e7a6c 100644 --- a/src/about.c +++ b/src/about.c @@ -47,7 +47,7 @@ #define BUILDDATE "%s" #define COPYRIGHT _("Copyright (c) 2005-2014\nColomban Wendling\nNick Treleaven\nMatthew Brush\nEnrico Tr枚ger\nFrank Lanitz\nAll rights reserved.") -const gchar *translators[][2] = { +static const gchar *translators[][2] = { { "ar", "Fayssal Chamekh <chamfay@gmail.com>"}, { "ast", "Marcos Costales <marcoscostales@gmail.com>"}, { "be_BY", "Yura Siamashka <yurand2@gmail.com>" }, @@ -92,7 +92,7 @@ const gchar *translators[][2] = { }; static const guint translators_len = G_N_ELEMENTS(translators); -const gchar *prev_translators[][2] = { +static const gchar *prev_translators[][2] = { { "es", "Dami谩n Viano <debian@damianv.com.ar>\nNacho Cabanes <ncabanes@gmail.com>" }, { "pl", "Jacek Wolszczak <shutdownrunner@o2.pl>\nJaros艂aw Foksa <jfoksa@gmail.com>" }, { "nl", "Kurt De Bree <kdebree@telenet.be>" } From 0b2b647a6dfd76dd2e8ff4ff0b8e0eea84bad3c8 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 12 Aug 2014 14:39:53 +0200 Subject: [PATCH 055/737] Remove an unnecessary dynamic allocation --- src/project.c | 66 +++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/src/project.c b/src/project.c index ecd6ba7bd4..a1b7d5aed2 100644 --- a/src/project.c +++ b/src/project.c @@ -112,25 +112,24 @@ void project_new(void) GtkWidget *bbox; GtkWidget *label; gchar *tooltip; - PropertyDialogElements *e; + PropertyDialogElements e = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0 }; if (! project_ask_close()) return; g_return_if_fail(app->project == NULL); - e = g_new0(PropertyDialogElements, 1); - e->dialog = gtk_dialog_new_with_buttons(_("New Project"), GTK_WINDOW(main_widgets.window), + e.dialog = gtk_dialog_new_with_buttons(_("New Project"), GTK_WINDOW(main_widgets.window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); - gtk_widget_set_name(e->dialog, "GeanyDialogProject"); + gtk_widget_set_name(e.dialog, "GeanyDialogProject"); button = ui_button_new_with_image(GTK_STOCK_NEW, _("C_reate")); gtk_widget_set_can_default(button, TRUE); - gtk_window_set_default(GTK_WINDOW(e->dialog), button); - gtk_dialog_add_action_widget(GTK_DIALOG(e->dialog), button, GTK_RESPONSE_OK); + gtk_window_set_default(GTK_WINDOW(e.dialog), button); + gtk_dialog_add_action_widget(GTK_DIALOG(e.dialog), button, GTK_RESPONSE_OK); - vbox = ui_dialog_vbox_new(GTK_DIALOG(e->dialog)); + vbox = ui_dialog_vbox_new(GTK_DIALOG(e.dialog)); entries_modified = FALSE; @@ -141,32 +140,32 @@ void project_new(void) label = gtk_label_new(_("Name:")); gtk_misc_set_alignment(GTK_MISC(label), 1, 0); - e->name = gtk_entry_new(); - gtk_entry_set_activates_default(GTK_ENTRY(e->name), TRUE); - ui_entry_add_clear_icon(GTK_ENTRY(e->name)); - gtk_entry_set_max_length(GTK_ENTRY(e->name), MAX_NAME_LEN); - gtk_widget_set_tooltip_text(e->name, _("Project name")); + e.name = gtk_entry_new(); + gtk_entry_set_activates_default(GTK_ENTRY(e.name), TRUE); + ui_entry_add_clear_icon(GTK_ENTRY(e.name)); + gtk_entry_set_max_length(GTK_ENTRY(e.name), MAX_NAME_LEN); + gtk_widget_set_tooltip_text(e.name, _("Project name")); - ui_table_add_row(GTK_TABLE(table), 0, label, e->name, NULL); + ui_table_add_row(GTK_TABLE(table), 0, label, e.name, NULL); label = gtk_label_new(_("Filename:")); gtk_misc_set_alignment(GTK_MISC(label), 1, 0); - e->file_name = gtk_entry_new(); - gtk_entry_set_activates_default(GTK_ENTRY(e->file_name), TRUE); - ui_entry_add_clear_icon(GTK_ENTRY(e->file_name)); - gtk_entry_set_width_chars(GTK_ENTRY(e->file_name), 30); + e.file_name = gtk_entry_new(); + gtk_entry_set_activates_default(GTK_ENTRY(e.file_name), TRUE); + ui_entry_add_clear_icon(GTK_ENTRY(e.file_name)); + gtk_entry_set_width_chars(GTK_ENTRY(e.file_name), 30); tooltip = g_strdup_printf( _("Path of the file representing the project and storing its settings. " "It should normally have the \"%s\" extension."), "."GEANY_PROJECT_EXT); - gtk_widget_set_tooltip_text(e->file_name, tooltip); + gtk_widget_set_tooltip_text(e.file_name, tooltip); g_free(tooltip); button = gtk_button_new(); - g_signal_connect(button, "clicked", G_CALLBACK(on_file_save_button_clicked), e); + g_signal_connect(button, "clicked", G_CALLBACK(on_file_save_button_clicked), &e); image = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_BUTTON); gtk_container_add(GTK_CONTAINER(button), image); bbox = gtk_hbox_new(FALSE, 6); - gtk_box_pack_start(GTK_BOX(bbox), e->file_name, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(bbox), e.file_name, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); ui_table_add_row(GTK_TABLE(table), 1, label, bbox, NULL); @@ -174,33 +173,33 @@ void project_new(void) label = gtk_label_new(_("Base path:")); gtk_misc_set_alignment(GTK_MISC(label), 1, 0); - e->base_path = gtk_entry_new(); - gtk_entry_set_activates_default(GTK_ENTRY(e->base_path), TRUE); - ui_entry_add_clear_icon(GTK_ENTRY(e->base_path)); - gtk_widget_set_tooltip_text(e->base_path, + e.base_path = gtk_entry_new(); + gtk_entry_set_activates_default(GTK_ENTRY(e.base_path), TRUE); + ui_entry_add_clear_icon(GTK_ENTRY(e.base_path)); + gtk_widget_set_tooltip_text(e.base_path, _("Base directory of all files that make up the project. " "This can be a new path, or an existing directory tree. " "You can use paths relative to the project filename.")); bbox = ui_path_box_new(_("Choose Project Base Path"), - GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_ENTRY(e->base_path)); + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_ENTRY(e.base_path)); ui_table_add_row(GTK_TABLE(table), 2, label, bbox, NULL); gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); /* signals */ - g_signal_connect(e->name, "changed", G_CALLBACK(on_name_entry_changed), e); + g_signal_connect(e.name, "changed", G_CALLBACK(on_name_entry_changed), &e); /* run the callback manually to initialise the base_path and file_name fields */ - on_name_entry_changed(GTK_EDITABLE(e->name), e); + on_name_entry_changed(GTK_EDITABLE(e.name), &e); - g_signal_connect(e->file_name, "changed", G_CALLBACK(on_entries_changed), e); - g_signal_connect(e->base_path, "changed", G_CALLBACK(on_entries_changed), e); + g_signal_connect(e.file_name, "changed", G_CALLBACK(on_entries_changed), &e); + g_signal_connect(e.base_path, "changed", G_CALLBACK(on_entries_changed), &e); - gtk_widget_show_all(e->dialog); + gtk_widget_show_all(e.dialog); - while (gtk_dialog_run(GTK_DIALOG(e->dialog)) == GTK_RESPONSE_OK) + while (gtk_dialog_run(GTK_DIALOG(e.dialog)) == GTK_RESPONSE_OK) { - if (update_config(e, TRUE)) + if (update_config(&e, TRUE)) { if (!write_config(TRUE)) SHOW_ERR(_("Project file could not be written")); @@ -213,8 +212,7 @@ void project_new(void) } } } - gtk_widget_destroy(e->dialog); - g_free(e); + gtk_widget_destroy(e.dialog); } From 87c6cefc1940a8d8e4e02f842bdbfc4bf05e3e37 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 12 Aug 2014 16:17:39 +0200 Subject: [PATCH 056/737] Remove dead assignment `entries_modified` global is only used by on_name_entry_changed() and on_entries_changed(), both of which are only ever called from project_new() scope -- which already initializes this variable. --- src/project.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/project.c b/src/project.c index a1b7d5aed2..e43483c467 100644 --- a/src/project.c +++ b/src/project.c @@ -509,8 +509,6 @@ static void show_project_properties(gboolean show_build) g_return_if_fail(app->project != NULL); - entries_modified = FALSE; - if (e.dialog == NULL) create_properties_dialog(&e); From cc1c36d0093de8c2559dfeb65eb60cc957489239 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 12 Aug 2014 16:24:03 +0200 Subject: [PATCH 057/737] project: Sanitize entries_modified scope --- src/project.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/project.c b/src/project.c index e43483c467..547ac70ba0 100644 --- a/src/project.c +++ b/src/project.c @@ -64,8 +64,6 @@ static struct gchar *project_file_path; /* in UTF-8 */ } local_prefs = { NULL }; -static gboolean entries_modified; - /* simple struct to keep references to the elements of the properties dialog */ typedef struct _PropertyDialogElements { @@ -78,6 +76,7 @@ typedef struct _PropertyDialogElements GtkWidget *patterns; BuildTableData build_properties; gint build_page_num; + gboolean entries_modified; } PropertyDialogElements; @@ -112,7 +111,7 @@ void project_new(void) GtkWidget *bbox; GtkWidget *label; gchar *tooltip; - PropertyDialogElements e = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0 }; + PropertyDialogElements e = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, FALSE }; if (! project_ask_close()) return; @@ -131,8 +130,6 @@ void project_new(void) vbox = ui_dialog_vbox_new(GTK_DIALOG(e.dialog)); - entries_modified = FALSE; - table = gtk_table_new(3, 2, FALSE); gtk_table_set_row_spacings(GTK_TABLE(table), 5); gtk_table_set_col_spacings(GTK_TABLE(table), 10); @@ -903,7 +900,7 @@ static void on_name_entry_changed(GtkEditable *editable, PropertyDialogElements gchar *name; const gchar *project_dir = local_prefs.project_file_path; - if (entries_modified) + if (e->entries_modified) return; name = gtk_editable_get_chars(editable, 0, -1); @@ -928,7 +925,7 @@ static void on_name_entry_changed(GtkEditable *editable, PropertyDialogElements gtk_entry_set_text(GTK_ENTRY(e->base_path), base_path); gtk_entry_set_text(GTK_ENTRY(e->file_name), file_name); - entries_modified = FALSE; + e->entries_modified = FALSE; g_free(base_path); g_free(file_name); @@ -937,7 +934,7 @@ static void on_name_entry_changed(GtkEditable *editable, PropertyDialogElements static void on_entries_changed(GtkEditable *editable, PropertyDialogElements *e) { - entries_modified = TRUE; + e->entries_modified = TRUE; } From 8b0990e52a1c2bfaf8678d4e14fb18a256618ddb Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 12 Aug 2014 16:38:42 +0200 Subject: [PATCH 058/737] Fix relative project base path when creating a new project Closes #1062. --- src/project.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/project.c b/src/project.c index 547ac70ba0..5ae97edde3 100644 --- a/src/project.c +++ b/src/project.c @@ -680,7 +680,7 @@ static gboolean update_config(const PropertyDialogElements *e, gboolean new_proj if (! g_path_is_absolute(locale_path)) { /* relative base path, so add base dir of project file name */ gchar *dir = g_path_get_dirname(locale_filename); - SETPTR(locale_path, g_strconcat(dir, locale_path, NULL)); + SETPTR(locale_path, g_build_filename(dir, locale_path, NULL)); g_free(dir); } From df964312b2b2e27b28d127aa30e814d5d367a0c3 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 12 Aug 2014 20:38:59 +0200 Subject: [PATCH 059/737] Remove a global in colorscheme dialog code --- src/highlighting.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/highlighting.c b/src/highlighting.c index 5a46189aab..feef78160f 100644 --- a/src/highlighting.c +++ b/src/highlighting.c @@ -1184,8 +1184,6 @@ const GeanyLexerStyle *highlighting_get_style(gint ft_id, gint style_id) } -static GtkWidget *scheme_tree = NULL; - enum { SCHEME_MARKUP, @@ -1247,7 +1245,7 @@ static gchar *utils_get_setting_locale_string(GKeyFile *keyfile, static void add_color_scheme_item(GtkListStore *store, - gchar *name, gchar *desc, const gchar *fn) + gchar *name, gchar *desc, const gchar *fn, GtkTreeIter *current_iter) { GtkTreeIter iter; gchar *markup; @@ -1264,17 +1262,12 @@ static void add_color_scheme_item(GtkListStore *store, SCHEME_FILE, fn, -1); g_free(markup); - if (utils_str_equal(fn, editor_prefs.color_scheme)) - { - GtkTreeSelection *treesel = - gtk_tree_view_get_selection(GTK_TREE_VIEW(scheme_tree)); - - gtk_tree_selection_select_iter(treesel, &iter); - } + if (utils_str_equal(fn, editor_prefs.color_scheme) && current_iter) + *current_iter = iter; } -static void add_color_scheme_file(GtkListStore *store, const gchar *fname) +static void add_color_scheme_file(GtkListStore *store, const gchar *fname, GtkTreeIter *current_iter) { GKeyFile *hkeyfile, *skeyfile; gchar *path, *theme_name, *theme_desc; @@ -1287,7 +1280,7 @@ static void add_color_scheme_file(GtkListStore *store, const gchar *fname) theme_name = utils_get_setting(locale_string, hkeyfile, skeyfile, "theme_info", "name", theme_fn); theme_desc = utils_get_setting(locale_string, hkeyfile, skeyfile, "theme_info", "description", NULL); - add_color_scheme_item(store, theme_name, theme_desc, theme_fn); + add_color_scheme_item(store, theme_name, theme_desc, theme_fn, current_iter); g_free(path); g_free(theme_fn); @@ -1298,11 +1291,11 @@ static void add_color_scheme_file(GtkListStore *store, const gchar *fname) } -static gboolean add_color_scheme_items(GtkListStore *store) +static gboolean add_color_scheme_items(GtkListStore *store, GtkTreeIter *current_iter) { GSList *list, *node; - add_color_scheme_item(store, _("Default"), _("Default"), NULL); + add_color_scheme_item(store, _("Default"), _("Default"), NULL, current_iter); list = utils_get_config_files(GEANY_COLORSCHEMES_SUBDIR); foreach_slist(node, list) @@ -1310,7 +1303,7 @@ static gboolean add_color_scheme_items(GtkListStore *store) gchar *fname = node->data; if (g_str_has_suffix(fname, ".conf")) - add_color_scheme_file(store, fname); + add_color_scheme_file(store, fname, current_iter); g_free(fname); } @@ -1335,6 +1328,7 @@ void highlighting_show_color_scheme_dialog(void) GtkCellRenderer *text_renderer; GtkTreeViewColumn *column; GtkTreeSelection *treesel; + GtkTreeIter current_iter; GtkWidget *vbox, *swin, *tree; GeanyDocument *doc; @@ -1344,7 +1338,7 @@ void highlighting_show_color_scheme_dialog(void) _("The current filetype overrides the default style."), _("This may cause color schemes to display incorrectly.")); - scheme_tree = tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); + tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); g_object_unref(store); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tree), TRUE); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree), FALSE); @@ -1355,9 +1349,10 @@ void highlighting_show_color_scheme_dialog(void) NULL, text_renderer, "markup", SCHEME_MARKUP, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); - add_color_scheme_items(store); + add_color_scheme_items(store, ¤t_iter); treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); + gtk_tree_selection_select_iter(treesel, ¤t_iter); g_signal_connect(treesel, "changed", G_CALLBACK(on_color_scheme_changed), NULL); /* old dialog may still be showing */ From 521778ad311d076d1d423c4d9e4421fd66c57bf3 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 12 Aug 2014 20:40:21 +0200 Subject: [PATCH 060/737] Color scheme dialog: scroll to the initially selected item --- src/highlighting.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/highlighting.c b/src/highlighting.c index feef78160f..ee8b8aeb8c 100644 --- a/src/highlighting.c +++ b/src/highlighting.c @@ -1329,6 +1329,7 @@ void highlighting_show_color_scheme_dialog(void) GtkTreeViewColumn *column; GtkTreeSelection *treesel; GtkTreeIter current_iter; + GtkTreePath *path; GtkWidget *vbox, *swin, *tree; GeanyDocument *doc; @@ -1353,6 +1354,9 @@ void highlighting_show_color_scheme_dialog(void) treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); gtk_tree_selection_select_iter(treesel, ¤t_iter); + path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), ¤t_iter); + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(tree), path, NULL, FALSE, 0, 0); + gtk_tree_path_free(path); g_signal_connect(treesel, "changed", G_CALLBACK(on_color_scheme_changed), NULL); /* old dialog may still be showing */ From 328c22eaf6164b8e8cdc7e4ad4193d9122197903 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 13 Aug 2014 14:07:03 +0200 Subject: [PATCH 061/737] Update Scintilla to version 3.5.0 --- scintilla/gtk/ScintillaGTK.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scintilla/gtk/ScintillaGTK.cxx b/scintilla/gtk/ScintillaGTK.cxx index 9b0622a9b8..926457ba35 100644 --- a/scintilla/gtk/ScintillaGTK.cxx +++ b/scintilla/gtk/ScintillaGTK.cxx @@ -2402,7 +2402,7 @@ void ScintillaGTK::PreeditChangedThis() { PreEditString utfval(im_context); - if (strlen(utfval.str) > maxLenInputIME * 3) { + if ((strlen(utfval.str) == 0) || strlen(utfval.str) > maxLenInputIME * 3) { return; // Do not allow over 200 chars. } From 91d0ed218341e6e0c7c9eb47f2f8fa8846b0a806 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 14 Aug 2014 17:12:58 +0200 Subject: [PATCH 062/737] Find in Files: start search when pressing return in all field Patch partly from Yosef Or Boczko, thanks. Closes #959. --- src/search.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/search.c b/src/search.c index 9debcf0d99..97ef1131ac 100644 --- a/src/search.c +++ b/src/search.c @@ -926,6 +926,7 @@ static void create_fif_dialog(void) dir_combo = gtk_combo_box_text_new_with_entry(); entry = gtk_bin_get_child(GTK_BIN(dir_combo)); ui_entry_add_clear_icon(GTK_ENTRY(entry)); + gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); gtk_label_set_mnemonic_widget(GTK_LABEL(label1), entry); gtk_entry_set_width_chars(GTK_ENTRY(entry), 50); fif_dlg.dir_combo = dir_combo; @@ -1004,6 +1005,7 @@ static void create_fif_dialog(void) entry_extra = gtk_entry_new(); ui_entry_add_clear_icon(GTK_ENTRY(entry_extra)); + gtk_entry_set_activates_default(GTK_ENTRY(entry_extra), TRUE); gtk_widget_set_sensitive(entry_extra, FALSE); gtk_widget_set_tooltip_text(entry_extra, _("Other options to pass to Grep")); ui_hookup_widget(fif_dlg.dialog, entry_extra, "entry_extra"); From 768659b89fc8bc6727f5bce7605d417edc859f4a Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 16 Aug 2014 17:59:10 +0200 Subject: [PATCH 063/737] i18n: don't restrict LINGUAS at configure time Don't use the $LINGUAS at configure time to set ALL_LINGUAS, and let the translations Makefile properly honor the $LINGUAS itself, which it already does better than we do, cleanly ignoring translations it doesn't know. If we do set ALL_LINGUAS=$LINGUAS, it will result in a build failure if we do not have a translation for some of the language(s) specified in $LINGUAS, and would make it impossible to build other languages without re-configuring. So, just drop that part and let the build-time support kick in. Closes #507. --- m4/geany-i18n.m4 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/m4/geany-i18n.m4 b/m4/geany-i18n.m4 index 2a09ceea9b..71139dd6b3 100644 --- a/m4/geany-i18n.m4 +++ b/m4/geany-i18n.m4 @@ -10,11 +10,7 @@ AC_DEFUN([GEANY_I18N], AC_SUBST([GETTEXT_PACKAGE]) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package.]) - if test -n "${LINGUAS}"; then - ALL_LINGUAS="${LINGUAS}" - else - ALL_LINGUAS=`cd "$srcdir/po" 2>/dev/null && ls *.po 2>/dev/null | $AWK 'BEGIN { FS="."; ORS=" " } { print $[]1 }'` - fi + ALL_LINGUAS=`cd "$srcdir/po" 2>/dev/null && ls *.po 2>/dev/null | $AWK 'BEGIN { FS="."; ORS=" " } { print $[]1 }'` AM_GLIB_GNU_GETTEXT # workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845) From 7435a81d83707302ce83a833b8f32263a4b82cc9 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 17 Aug 2014 01:31:40 +0200 Subject: [PATCH 064/737] Fix a named style misspelling in the Lua filetype --- data/filetypes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/filetypes.lua b/data/filetypes.lua index 370e1c0613..c639cafe90 100644 --- a/data/filetypes.lua +++ b/data/filetypes.lua @@ -10,7 +10,7 @@ word=keyword_1 string=string_1 character=character literalstring=string_2 -preprocessor=preprocess +preprocessor=preprocessor operator=operator identifier=identifier_1 stringeol=string_eol From 874b019e4ed9ec4013317cb724da367681662128 Mon Sep 17 00:00:00 2001 From: James Lownie Date: Sun, 17 Aug 2014 14:13:13 +1000 Subject: [PATCH 065/737] Clarified the location of the "Use project-based session files" option --- doc/geany.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/geany.txt b/doc/geany.txt index 7534d50d82..72882c3353 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -2769,7 +2769,8 @@ Project management is optional in Geany. Currently it can be used for: A list of session files can be stored and opened with the project when the *Use project-based session files* preference is enabled, -in the *Project* group of the `Preferences`_ dialog. +in the `Projects`_ group of the `General Miscellaneous preferences`_ tab +of the `Preferences`_ dialog. As long as a project is open, the Build menu will use the items defined in project's settings, instead of the defaults. From cf6724240a176fa48f3facaedf98c5389d14d4f4 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 18 Aug 2014 00:07:43 +0200 Subject: [PATCH 066/737] Fix "Contributing to this document" for new HTML/PDF generation process --- doc/geany.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/geany.txt b/doc/geany.txt index 72882c3353..399b1f134d 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -5160,12 +5160,16 @@ Contributing to this document This document (``geany.txt``) is written in `reStructuredText`__ (or "reST"). The source file for it is located in Geany's ``doc`` subdirectory. If you intend on making changes, you should grab the -source right from Git to make sure you've got the newest version. After -editing the file, to build the HTML document to see how your changes -look, run "``make doc``" in the subdirectory ``doc`` of Geany's source -directory. This regenerates the ``geany.html`` file. To generate a PDF -file, use the command "``make pdf``" which should generate a file called -geany-|(version)|.pdf. +source right from Git to make sure you've got the newest version. +First, you need to configure the build system to generate the HTML +documentation passing the *--enable-html-docs* option to the *configure* +script. Then after editing the file, run ``make`` (from the root build +directory or from the *doc* subdirectory) to build the HTML documentation +and see how your changes look. This regenerates the ``geany.html`` file +inside the *doc* subdirectory. To generate a PDF file, configure with +*--enable-pdf-docs* and run ``make`` as for the HTML version. The generated +PDF file is named geany-|(version)|.pdf and is located inside the *doc* +subdirectory. __ http://docutils.sourceforge.net/rst.html From 1f8d2de53b0bb3c5856278ba817e7b236caa984d Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Mon, 18 Aug 2014 13:21:07 +0100 Subject: [PATCH 067/737] Remove doc, hacking-doc targets (Windows) --- doc/makefile.win32 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/makefile.win32 b/doc/makefile.win32 index 5a77be9398..11b0ade5ed 100644 --- a/doc/makefile.win32 +++ b/doc/makefile.win32 @@ -14,11 +14,16 @@ ifdef MSYS CP = cp endif -doc: geany.txt - $(RST2HTML) -stg --stylesheet=geany.css $^ geany.html +# no PDF rule yet +all: html api-doc -hacking-doc: ../HACKING - $(RST2HTML) -stg --stylesheet=geany.css $^ hacking.html +html: geany.html hacking.html + +geany.html: geany.txt geany.css + $(RST2HTML) -stg --stylesheet=geany.css $< $@ + +hacking.html: ../HACKING geany.css + $(RST2HTML) -stg --stylesheet=geany.css $< $@ # FIXME: we should also replace @VERSION@ Doxyfile: Doxyfile.in From 7276c49949ae6762ec4978ef7532784362582f23 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 18 Aug 2014 23:55:03 +0200 Subject: [PATCH 068/737] Sort FreeBasic keywords alphabetically --- data/filetypes.freebasic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/filetypes.freebasic b/data/filetypes.freebasic index ac51ef821d..f55d9d2e6c 100644 --- a/data/filetypes.freebasic +++ b/data/filetypes.freebasic @@ -27,8 +27,8 @@ binnumber=number_1 [keywords] # all items must be in one line -keywords=abs access acos alias allocate alpha and any append as assert assertwarn asc asin asm atan2 atn base beep bin binary bit bitreset bitset bload bsave byref byte byval call callocate case cast cbyte cdbl cdecl chain chdir chr cint circle class clear clng clngint close cls color com cons command common condbroadcast condcreate conddestroy condsignal condwait const constructor continue cos cptr cshort csign csng csrlin cubyte cuint culng culngint cunsg curdir cushort custom cvd cvi cvl cvlongint cvs cvshort data date dateadd datediff datepart dateserial datevalue day deallocate declare defbyte defdbl defint deflng deflngint defshort defsng defstr defubyte defuint defulngint defushort delete destructor dim dir do double draw dynamic dylibfree dylibload dylibsymbol else elseif encoding end enum environ escape eof eqv erase erfn erl ermn err error exec exepath exit exp explicit export extern false fboolean field fileattr filecopy filedatetime fileexists filelen fix flip for format frac fre freefile function get getjoystick getkey getmouse gosub goto hex hibyte hiword hour if iif imageconvertrow imagecreate imagedestroy imp import inkey inp input input$ instr int integer is isdate kill lbound lcase left len let lib lpt line lobyte loc local locate lock lof log long longint loop loword lpos lprint lset ltrim mid minute mkd mkdir mki mkl mklongint mks mkshort mod month monthname multikey mutexcreate mutexdestroy mutexlock mutexunlock name namespace nokeyword next new not now oct offsetof on once open option operator or out output overload paint palette pascal pcopy peek pipe pmap point pointer poke pos preserve preset print private procptr property protected pset ptr public put random randomize read reallocate redim rem reset restore resume return rgb rgba right rmdir rnd rset rtrim run sadd scope scrn screen screencopy screencontrol screenevent screeninfo screenglproc screenlist screenlock screenptr screenres screenset screensync screenunlock second seek select setdate setenviron setmouse settime sgn shared shell short sin single sizeof sleep space spc sqr static stdcall step stop str string strptr sub swap system shr shl tab tan then this threadcreate threadwait time timeserial timevalue timer to trans trim true type ubound ubyte ucase uinteger ulong ulongint union unlock unsigned until ushort using va_arg va_first va_next val vallng valint valuint valulng var varptr view wait wbin wchr weekday weekdayname wend while whex width window windowtitle winput with woct write wspace wstr wstring xor year zstring -preprocessor=#define defined typeof #dynamic #else #endif #error #if #ifdef #ifndef #inclib #include #print #static #undef #macro #endmacro #elseif #libpath #pragma +keywords=abs access acos alias allocate alpha and any append as asc asin asm assert assertwarn atan2 atn base beep bin binary bit bitreset bitset bload bsave byref byte byval call callocate case cast cbyte cdbl cdecl chain chdir chr cint circle class clear clng clngint close cls color com command common condbroadcast condcreate conddestroy condsignal condwait cons const constructor continue cos cptr cshort csign csng csrlin cubyte cuint culng culngint cunsg curdir cushort custom cvd cvi cvl cvlongint cvs cvshort data date dateadd datediff datepart dateserial datevalue day deallocate declare defbyte defdbl defint deflng deflngint defshort defsng defstr defubyte defuint defulngint defushort delete destructor dim dir do double draw dylibfree dylibload dylibsymbol dynamic else elseif encoding end enum environ eof eqv erase erfn erl ermn err error escape exec exepath exit exp explicit export extern false fboolean field fileattr filecopy filedatetime fileexists filelen fix flip for format frac fre freefile function get getjoystick getkey getmouse gosub goto hex hibyte hiword hour if iif imageconvertrow imagecreate imagedestroy imp import inkey inp input input$ instr int integer is isdate kill lbound lcase left len let lib line lobyte loc local locate lock lof log long longint loop loword lpos lprint lpt lset ltrim mid minute mkd mkdir mki mkl mklongint mks mkshort mod month monthname multikey mutexcreate mutexdestroy mutexlock mutexunlock name namespace new next nokeyword not now oct offsetof on once open operator option or out output overload paint palette pascal pcopy peek pipe pmap point pointer poke pos preserve preset print private procptr property protected pset ptr public put random randomize read reallocate redim rem reset restore resume return rgb rgba right rmdir rnd rset rtrim run sadd scope screen screencontrol screencopy screenevent screenglproc screeninfo screenlist screenlock screenptr screenres screenset screensync screenunlock scrn second seek select setdate setenviron setmouse settime sgn shared shell shl short shr sin single sizeof sleep space spc sqr static stdcall step stop str string strptr sub swap system tab tan then this threadcreate threadwait time timer timeserial timevalue to trans trim true type ubound ubyte ucase uinteger ulong ulongint union unlock unsigned until ushort using va_arg va_first val valint vallng valuint valulng va_next var varptr view wait wbin wchr weekday weekdayname wend whex while width window windowtitle winput with woct write wspace wstr wstring xor year zstring +preprocessor=#define defined #dynamic #else #elseif #endif #endmacro #error #if #ifdef #ifndef #inclib #include #libpath #macro #pragma #print #static typeof #undef # user definable keywords user1= user2= From 8278d7f9f0c3adc1c69eddd880eb28a600a862cd Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 18 Aug 2014 23:57:49 +0200 Subject: [PATCH 069/737] FreeBasic: Fix preprocessor keywords list See http://www.freebasic.net/wiki/wikka.php?wakka=CatPgFunctIndex Part of [feature-requests:#691] --- data/filetypes.freebasic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/filetypes.freebasic b/data/filetypes.freebasic index f55d9d2e6c..fc600ebefc 100644 --- a/data/filetypes.freebasic +++ b/data/filetypes.freebasic @@ -28,7 +28,7 @@ binnumber=number_1 [keywords] # all items must be in one line keywords=abs access acos alias allocate alpha and any append as asc asin asm assert assertwarn atan2 atn base beep bin binary bit bitreset bitset bload bsave byref byte byval call callocate case cast cbyte cdbl cdecl chain chdir chr cint circle class clear clng clngint close cls color com command common condbroadcast condcreate conddestroy condsignal condwait cons const constructor continue cos cptr cshort csign csng csrlin cubyte cuint culng culngint cunsg curdir cushort custom cvd cvi cvl cvlongint cvs cvshort data date dateadd datediff datepart dateserial datevalue day deallocate declare defbyte defdbl defint deflng deflngint defshort defsng defstr defubyte defuint defulngint defushort delete destructor dim dir do double draw dylibfree dylibload dylibsymbol dynamic else elseif encoding end enum environ eof eqv erase erfn erl ermn err error escape exec exepath exit exp explicit export extern false fboolean field fileattr filecopy filedatetime fileexists filelen fix flip for format frac fre freefile function get getjoystick getkey getmouse gosub goto hex hibyte hiword hour if iif imageconvertrow imagecreate imagedestroy imp import inkey inp input input$ instr int integer is isdate kill lbound lcase left len let lib line lobyte loc local locate lock lof log long longint loop loword lpos lprint lpt lset ltrim mid minute mkd mkdir mki mkl mklongint mks mkshort mod month monthname multikey mutexcreate mutexdestroy mutexlock mutexunlock name namespace new next nokeyword not now oct offsetof on once open operator option or out output overload paint palette pascal pcopy peek pipe pmap point pointer poke pos preserve preset print private procptr property protected pset ptr public put random randomize read reallocate redim rem reset restore resume return rgb rgba right rmdir rnd rset rtrim run sadd scope screen screencontrol screencopy screenevent screenglproc screeninfo screenlist screenlock screenptr screenres screenset screensync screenunlock scrn second seek select setdate setenviron setmouse settime sgn shared shell shl short shr sin single sizeof sleep space spc sqr static stdcall step stop str string strptr sub swap system tab tan then this threadcreate threadwait time timer timeserial timevalue to trans trim true type ubound ubyte ucase uinteger ulong ulongint union unlock unsigned until ushort using va_arg va_first val valint vallng valuint valulng va_next var varptr view wait wbin wchr weekday weekdayname wend whex while width window windowtitle winput with woct write wspace wstr wstring xor year zstring -preprocessor=#define defined #dynamic #else #elseif #endif #endmacro #error #if #ifdef #ifndef #inclib #include #libpath #macro #pragma #print #static typeof #undef +preprocessor=#assert #define defined #else #elseif #endif #endmacro #error #if #ifdef #ifndef #inclib #include #lang #libpath #line #macro once #pragma #print typeof #undef # user definable keywords user1= user2= From bb25ba6ed2aca71ac63e2398bb5b5dc8fb4004a8 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 19 Aug 2014 00:10:40 +0200 Subject: [PATCH 070/737] FreeBasic: Update keywords Patch from TJF. Part of [feature-requests:#691] --- data/filetypes.freebasic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/filetypes.freebasic b/data/filetypes.freebasic index fc600ebefc..1a1486ca6e 100644 --- a/data/filetypes.freebasic +++ b/data/filetypes.freebasic @@ -27,7 +27,7 @@ binnumber=number_1 [keywords] # all items must be in one line -keywords=abs access acos alias allocate alpha and any append as asc asin asm assert assertwarn atan2 atn base beep bin binary bit bitreset bitset bload bsave byref byte byval call callocate case cast cbyte cdbl cdecl chain chdir chr cint circle class clear clng clngint close cls color com command common condbroadcast condcreate conddestroy condsignal condwait cons const constructor continue cos cptr cshort csign csng csrlin cubyte cuint culng culngint cunsg curdir cushort custom cvd cvi cvl cvlongint cvs cvshort data date dateadd datediff datepart dateserial datevalue day deallocate declare defbyte defdbl defint deflng deflngint defshort defsng defstr defubyte defuint defulngint defushort delete destructor dim dir do double draw dylibfree dylibload dylibsymbol dynamic else elseif encoding end enum environ eof eqv erase erfn erl ermn err error escape exec exepath exit exp explicit export extern false fboolean field fileattr filecopy filedatetime fileexists filelen fix flip for format frac fre freefile function get getjoystick getkey getmouse gosub goto hex hibyte hiword hour if iif imageconvertrow imagecreate imagedestroy imp import inkey inp input input$ instr int integer is isdate kill lbound lcase left len let lib line lobyte loc local locate lock lof log long longint loop loword lpos lprint lpt lset ltrim mid minute mkd mkdir mki mkl mklongint mks mkshort mod month monthname multikey mutexcreate mutexdestroy mutexlock mutexunlock name namespace new next nokeyword not now oct offsetof on once open operator option or out output overload paint palette pascal pcopy peek pipe pmap point pointer poke pos preserve preset print private procptr property protected pset ptr public put random randomize read reallocate redim rem reset restore resume return rgb rgba right rmdir rnd rset rtrim run sadd scope screen screencontrol screencopy screenevent screenglproc screeninfo screenlist screenlock screenptr screenres screenset screensync screenunlock scrn second seek select setdate setenviron setmouse settime sgn shared shell shl short shr sin single sizeof sleep space spc sqr static stdcall step stop str string strptr sub swap system tab tan then this threadcreate threadwait time timer timeserial timevalue to trans trim true type ubound ubyte ucase uinteger ulong ulongint union unlock unsigned until ushort using va_arg va_first val valint vallng valuint valulng va_next var varptr view wait wbin wchr weekday weekdayname wend whex while width window windowtitle winput with woct write wspace wstr wstring xor year zstring +keywords=abs access acos alias allocate alpha and andalso any append as asc asin asm assert assertwarn atan2 atn base beep bin binary bit bitreset bitset bload bsave byref byte byval call callocate case cast cbyte cdbl cdecl chain chdir chr cint circle class clear clng clngint close cls color com command common condbroadcast condcreate conddestroy condsignal condwait cons const constructor continue cos cptr cshort csign csng csrlin cubyte cuint culng culngint cunsg curdir cushort custom cvd cvi cvl cvlongint cvs cvshort data date dateadd datediff datepart dateserial datevalue day deallocate declare defbyte defdbl defint deflng deflngint defshort defsng defstr defubyte defuint defulngint defushort delete destructor dim dir do double draw dylibfree dylibload dylibsymbol dynamic else elseif encoding end enum environ eof eqv erase erfn erl ermn err error escape exec exepath exit exp explicit export extends extern false fboolean field fileattr filecopy filedatetime fileexists filelen fix flip for format frac fre freefile function get getjoystick getkey getmouse gosub goto hex hibyte hiword hour if iif imageconvertrow imagecreate imagedestroy imp import inkey inp input input$ instr instrrev int integer interface is isdate kill lbound lcase left len let lib line lobyte loc local locate lock lof log long longint loop loword lpos lprint lpt lset ltrim mid minute mkd mkdir mki mkl mklongint mks mkshort mod month monthname multikey mutexcreate mutexdestroy mutexlock mutexunlock name namespace new next nokeyword not now object oct offsetof on once open operator option or orelse out output overload paint palette pascal pcopy peek pipe pmap point pointer poke pos preserve preset print private procptr property protected pset ptr public put random randomize read reallocate redim rem reset restore resume return rgb rgba right rmdir rnd rset rtrim run sadd scope screen screencontrol screencopy screenevent screenglproc screeninfo screenlist screenlock screenptr screenres screenset screensync screenunlock scrn second seek select setdate setenviron setmouse settime sgn shared shell shl short shr sin single sizeof sleep space spc sqr static stdcall step stop str string strptr sub swap system tab tan then this threadcreate threadwait time timer timeserial timevalue to trans trim true type ubound ubyte ucase uinteger ulong ulongint union unlock unsigned until ushort using va_arg va_first val valint vallng valuint valulng va_next var varptr view virtual wait wbin wchr weekday weekdayname wend whex while width window windowtitle winput with woct write wspace wstr wstring xor year zstring preprocessor=#assert #define defined #else #elseif #endif #endmacro #error #if #ifdef #ifndef #inclib #include #lang #libpath #line #macro once #pragma #print typeof #undef # user definable keywords user1= From 0a063c1a7268117dbe59308967d4fc2ec058d993 Mon Sep 17 00:00:00 2001 From: asmblur Date: Mon, 18 Aug 2014 19:06:27 -0500 Subject: [PATCH 071/737] Fix regexp search & replace. --- src/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.c b/src/search.c index 97ef1131ac..0b9cab1915 100644 --- a/src/search.c +++ b/src/search.c @@ -2103,7 +2103,7 @@ gint search_replace_match(ScintillaObject *sci, const GeanyMatchInfo *match, con sci_set_target_start(sci, match->start); sci_set_target_end(sci, match->end); - if (! (match->flags & SCFIND_REGEXP)) + if (! (match->flags & GEANY_FIND_REGEXP)) return sci_replace_target(sci, replace_text, FALSE); str = g_string_new(replace_text); From 8812e39e2e937d1e7cfee1526af23e6ba3a45938 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 19 Aug 2014 03:31:34 +0200 Subject: [PATCH 072/737] Fix searching backwards from the Find dialog search_find_prev() wasn't properly updated to work on GeanyFindFlags leading to incorrect flags handling. --- src/search.c | 24 ++++++++++++------------ src/symbols.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/search.c b/src/search.c index 0b9cab1915..0c2439ce2b 100644 --- a/src/search.c +++ b/src/search.c @@ -2031,30 +2031,30 @@ static gint find_regex(ScintillaObject *sci, guint pos, GRegex *regex, GeanyMatc } +static gint geany_find_flags_to_sci_flags(GeanyFindFlags flags) +{ + g_warn_if_fail(! (flags & GEANY_FIND_MULTILINE)); + + return ((flags & GEANY_FIND_MATCHCASE) ? SCFIND_MATCHCASE : 0) | + ((flags & GEANY_FIND_WHOLEWORD) ? SCFIND_WHOLEWORD : 0) | + ((flags & GEANY_FIND_REGEXP) ? SCFIND_REGEXP | SCFIND_POSIX : 0) | + ((flags & GEANY_FIND_WORDSTART) ? SCFIND_WORDSTART : 0); +} + + gint search_find_prev(ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_) { gint ret; g_return_val_if_fail(! (flags & GEANY_FIND_REGEXP), -1); - ret = sci_search_prev(sci, flags, str); + ret = sci_search_prev(sci, geany_find_flags_to_sci_flags(flags), str); if (ret != -1 && match_) *match_ = match_info_new(flags, ret, ret + strlen(str)); return ret; } -static gint geany_find_flags_to_sci_flags(gint flags) -{ - g_warn_if_fail(! (flags & GEANY_FIND_MULTILINE)); - - return ((flags & GEANY_FIND_MATCHCASE) ? SCFIND_MATCHCASE : 0) | - ((flags & GEANY_FIND_WHOLEWORD) ? SCFIND_WHOLEWORD : 0) | - ((flags & GEANY_FIND_REGEXP) ? SCFIND_REGEXP | SCFIND_POSIX : 0) | - ((flags & GEANY_FIND_WORDSTART) ? SCFIND_WORDSTART : 0); -} - - gint search_find_next(ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_) { GeanyMatchInfo *match; diff --git a/src/symbols.c b/src/symbols.c index 6d9933ec2b..c0a1cf67e1 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -2332,7 +2332,7 @@ static void on_find_usage(GtkWidget *widget, G_GNUC_UNUSED gpointer unused) if (widget == symbol_menu.find_in_files) search_show_find_in_files_dialog_full(tag->name, NULL); else - search_find_usage(tag->name, tag->name, SCFIND_WHOLEWORD | SCFIND_MATCHCASE, + search_find_usage(tag->name, tag->name, GEANY_FIND_WHOLEWORD | GEANY_FIND_MATCHCASE, widget == symbol_menu.find_usage); tm_tag_unref(tag); From bdc0f720e7509ca3fcd65b0c3dab051f1efc9a53 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 19 Aug 2014 03:40:52 +0200 Subject: [PATCH 073/737] Remove unused flags from document_search_bar_find() Passed-in flags was always 0, so the argument is not useful. Also, this function expected Scintilla search flags rather than Geany ones, making the API confusing for no good reason. --- src/callbacks.c | 4 ++-- src/document.c | 6 +++--- src/document.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/callbacks.c b/src/callbacks.c index 85617486be..3eab3633b1 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -442,7 +442,7 @@ static void do_toolbar_search(const gchar *text, gboolean incremental, gboolean gboolean result; setup_find(text, backwards); - result = document_search_bar_find(doc, search_data.text, 0, incremental, backwards); + result = document_search_bar_find(doc, search_data.text, incremental, backwards); if (search_data.search_bar) ui_set_search_entry_background(toolbar_get_widget_child_by_name("SearchEntry"), result); } @@ -474,7 +474,7 @@ void on_toolbutton_search_clicked(GtkAction *action, gpointer user_data) const gchar *text = gtk_entry_get_text(GTK_ENTRY(entry)); setup_find(text, FALSE); - result = document_search_bar_find(doc, search_data.text, 0, FALSE, FALSE); + result = document_search_bar_find(doc, search_data.text, FALSE, FALSE); if (search_data.search_bar) ui_set_search_entry_background(entry, result); } diff --git a/src/document.c b/src/document.c index 317d52a1b2..b2e7c8e208 100644 --- a/src/document.c +++ b/src/document.c @@ -1956,7 +1956,7 @@ gboolean document_save_file(GeanyDocument *doc, gboolean force) /* special search function, used from the find entry in the toolbar * return TRUE if text was found otherwise FALSE * return also TRUE if text is empty */ -gboolean document_search_bar_find(GeanyDocument *doc, const gchar *text, gint flags, gboolean inc, +gboolean document_search_bar_find(GeanyDocument *doc, const gchar *text, gboolean inc, gboolean backwards) { gint start_pos, search_pos; @@ -1974,7 +1974,7 @@ gboolean document_search_bar_find(GeanyDocument *doc, const gchar *text, gint fl ttf.chrg.cpMin = start_pos; ttf.chrg.cpMax = backwards ? 0 : sci_get_length(doc->editor->sci); ttf.lpstrText = (gchar *)text; - search_pos = sci_find_text(doc->editor->sci, flags, &ttf); + search_pos = sci_find_text(doc->editor->sci, 0, &ttf); /* if no match, search start (or end) to cursor */ if (search_pos == -1) @@ -1989,7 +1989,7 @@ gboolean document_search_bar_find(GeanyDocument *doc, const gchar *text, gint fl ttf.chrg.cpMin = 0; ttf.chrg.cpMax = start_pos + strlen(text); } - search_pos = sci_find_text(doc->editor->sci, flags, &ttf); + search_pos = sci_find_text(doc->editor->sci, 0, &ttf); } if (search_pos != -1) diff --git a/src/document.h b/src/document.h index 0749c770fd..85f1c6b533 100644 --- a/src/document.h +++ b/src/document.h @@ -238,7 +238,7 @@ void document_open_file_list(const gchar *data, gsize length); void document_open_files(const GSList *filenames, gboolean readonly, GeanyFiletype *ft, const gchar *forced_enc); -gboolean document_search_bar_find(GeanyDocument *doc, const gchar *text, gint flags, gboolean inc, +gboolean document_search_bar_find(GeanyDocument *doc, const gchar *text, gboolean inc, gboolean backwards); gint document_find_text(GeanyDocument *doc, const gchar *text, const gchar *original_text, From dc140165ae1022d518984a1e7a3bc7862e528cc4 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 19 Aug 2014 03:42:58 +0200 Subject: [PATCH 074/737] Use GeanyFindFlags instead of plain integer when expecting Geany find flags This makes the API more obvious on what argument is expected, and avoid confusion between Geany and Scintilla find flags. --- src/callbacks.c | 2 +- src/document.c | 10 +++++----- src/document.h | 8 ++++---- src/search.c | 28 ++++++++++++++-------------- src/search.h | 45 +++++++++++++++++++++++---------------------- 5 files changed, 47 insertions(+), 46 deletions(-) diff --git a/src/callbacks.c b/src/callbacks.c index 3eab3633b1..734ea2a732 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -828,7 +828,7 @@ G_MODULE_EXPORT void on_use_auto_indentation1_toggled(GtkCheckMenuItem *checkmen static void find_usage(gboolean in_session) { - gint flags; + GeanyFindFlags flags; gchar *search_text; GeanyDocument *doc = document_get_current(); diff --git a/src/document.c b/src/document.c index b2e7c8e208..ac6079a788 100644 --- a/src/document.c +++ b/src/document.c @@ -2033,7 +2033,7 @@ gboolean document_search_bar_find(GeanyDocument *doc, const gchar *text, gboolea * @param original_text Text as it was entered by user, or @c NULL to use @c text */ gint document_find_text(GeanyDocument *doc, const gchar *text, const gchar *original_text, - gint flags, gboolean search_backwards, GeanyMatchInfo **match_, + GeanyFindFlags flags, gboolean search_backwards, GeanyMatchInfo **match_, gboolean scroll, GtkWidget *parent) { gint selection_end, selection_start, search_pos; @@ -2113,7 +2113,7 @@ gint document_find_text(GeanyDocument *doc, const gchar *text, const gchar *orig * @param original_find_text Text to find as it was entered by user, or @c NULL to use @c find_text */ gint document_replace_text(GeanyDocument *doc, const gchar *find_text, const gchar *original_find_text, - const gchar *replace_text, gint flags, gboolean search_backwards) + const gchar *replace_text, GeanyFindFlags flags, gboolean search_backwards) { gint selection_end, selection_start, search_pos; GeanyMatchInfo *match = NULL; @@ -2199,7 +2199,7 @@ static void show_replace_summary(GeanyDocument *doc, gint count, const gchar *or * Returns: the number of replacements made. */ static guint document_replace_range(GeanyDocument *doc, const gchar *find_text, const gchar *replace_text, - gint flags, gint start, gint end, gboolean scroll_to_match, gint *new_range_end) + GeanyFindFlags flags, gint start, gint end, gboolean scroll_to_match, gint *new_range_end) { gint count = 0; struct Sci_TextToFind ttf; @@ -2236,7 +2236,7 @@ document_replace_range(GeanyDocument *doc, const gchar *find_text, const gchar * void document_replace_sel(GeanyDocument *doc, const gchar *find_text, const gchar *replace_text, - const gchar *original_find_text, const gchar *original_replace_text, gint flags) + const gchar *original_find_text, const gchar *original_replace_text, GeanyFindFlags flags) { gint selection_end, selection_start, selection_mode, selected_lines, last_line = 0; gint max_column = 0, count = 0; @@ -2339,7 +2339,7 @@ void document_replace_sel(GeanyDocument *doc, const gchar *find_text, const gcha /* returns number of replacements made. */ gint document_replace_all(GeanyDocument *doc, const gchar *find_text, const gchar *replace_text, - const gchar *original_find_text, const gchar *original_replace_text, gint flags) + const gchar *original_find_text, const gchar *original_replace_text, GeanyFindFlags flags) { gint len, count; g_return_val_if_fail(doc != NULL && find_text != NULL && replace_text != NULL, FALSE); diff --git a/src/document.h b/src/document.h index 85f1c6b533..620857d81e 100644 --- a/src/document.h +++ b/src/document.h @@ -242,17 +242,17 @@ gboolean document_search_bar_find(GeanyDocument *doc, const gchar *text, gboolea gboolean backwards); gint document_find_text(GeanyDocument *doc, const gchar *text, const gchar *original_text, - gint flags, gboolean search_backwards, GeanyMatchInfo **match_, + GeanyFindFlags flags, gboolean search_backwards, GeanyMatchInfo **match_, gboolean scroll, GtkWidget *parent); gint document_replace_text(GeanyDocument *doc, const gchar *find_text, const gchar *original_find_text, - const gchar *replace_text, gint flags, gboolean search_backwards); + const gchar *replace_text, GeanyFindFlags flags, gboolean search_backwards); gint document_replace_all(GeanyDocument *doc, const gchar *find_text, const gchar *replace_text, - const gchar *original_find_text, const gchar *original_replace_text, gint flags); + const gchar *original_find_text, const gchar *original_replace_text, GeanyFindFlags flags); void document_replace_sel(GeanyDocument *doc, const gchar *find_text, const gchar *replace_text, - const gchar *original_find_text, const gchar *original_replace_text, gint flags); + const gchar *original_find_text, const gchar *original_replace_text, GeanyFindFlags flags); void document_update_tags(GeanyDocument *doc); diff --git a/src/search.c b/src/search.c index 0c2439ce2b..78ff16bd0d 100644 --- a/src/search.c +++ b/src/search.c @@ -156,7 +156,7 @@ static void search_close_pid(GPid child_pid, gint status, gpointer user_data); static gchar **search_get_argv(const gchar **argv_prefix, const gchar *dir); -static GRegex *compile_regex(const gchar *str, gint sflags); +static GRegex *compile_regex(const gchar *str, GeanyFindFlags sflags); static void @@ -1167,7 +1167,7 @@ on_find_replace_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user } -static GeanyMatchInfo *match_info_new(gint flags, gint start, gint end) +static GeanyMatchInfo *match_info_new(GeanyFindFlags flags, gint start, gint end) { GeanyMatchInfo *info = g_slice_alloc(sizeof *info); @@ -1192,7 +1192,7 @@ void geany_match_info_free(GeanyMatchInfo *info) * foreach_slist(node, matches) * geany_match_info_free(node->data); * g_slist_free(matches); */ -static GSList *find_range(ScintillaObject *sci, gint flags, struct Sci_TextToFind *ttf) +static GSList *find_range(ScintillaObject *sci, GeanyFindFlags flags, struct Sci_TextToFind *ttf) { GSList *matches = NULL; GeanyMatchInfo *info; @@ -1226,7 +1226,7 @@ static GSList *find_range(ScintillaObject *sci, gint flags, struct Sci_TextToFin /* Clears markers if text is null/empty. * @return Number of matches marked. */ -gint search_mark_all(GeanyDocument *doc, const gchar *search_text, gint flags) +gint search_mark_all(GeanyDocument *doc, const gchar *search_text, GeanyFindFlags flags) { gint count = 0; struct Sci_TextToFind ttf; @@ -1279,7 +1279,7 @@ on_find_entry_activate_backward(GtkEntry *entry, gpointer user_data) } -static gboolean int_search_flags(gint match_case, gint whole_word, gint regexp, gint multiline, gint word_start) +static GeanyFindFlags int_search_flags(gint match_case, gint whole_word, gint regexp, gint multiline, gint word_start) { return (match_case ? GEANY_FIND_MATCHCASE : 0) | (regexp ? GEANY_FIND_REGEXP : 0) | @@ -1395,7 +1395,7 @@ on_replace_entry_activate(GtkEntry *entry, gpointer user_data) static void replace_in_session(GeanyDocument *doc, - gint search_flags_re, gboolean search_replace_escape_re, + GeanyFindFlags search_flags_re, gboolean search_replace_escape_re, const gchar *find, const gchar *replace, const gchar *original_find, const gchar *original_replace) { @@ -1436,7 +1436,7 @@ static void on_replace_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) { GeanyDocument *doc = document_get_current(); - gint search_flags_re; + GeanyFindFlags search_flags_re; gboolean search_backwards_re, search_replace_escape_re; gchar *find, *replace, *original_find = NULL, *original_replace = NULL; @@ -1930,7 +1930,7 @@ static void search_close_pid(GPid child_pid, gint status, gpointer user_data) } -static GRegex *compile_regex(const gchar *str, gint sflags) +static GRegex *compile_regex(const gchar *str, GeanyFindFlags sflags) { GRegex *regex; GError *error = NULL; @@ -2042,7 +2042,7 @@ static gint geany_find_flags_to_sci_flags(GeanyFindFlags flags) } -gint search_find_prev(ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_) +gint search_find_prev(ScintillaObject *sci, const gchar *str, GeanyFindFlags flags, GeanyMatchInfo **match_) { gint ret; @@ -2055,7 +2055,7 @@ gint search_find_prev(ScintillaObject *sci, const gchar *str, gint flags, GeanyM } -gint search_find_next(ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_) +gint search_find_next(ScintillaObject *sci, const gchar *str, GeanyFindFlags flags, GeanyMatchInfo **match_) { GeanyMatchInfo *match; GRegex *regex; @@ -2140,7 +2140,7 @@ gint search_replace_match(ScintillaObject *sci, const GeanyMatchInfo *match, con } -gint search_find_text(ScintillaObject *sci, gint flags, struct Sci_TextToFind *ttf, GeanyMatchInfo **match_) +gint search_find_text(ScintillaObject *sci, GeanyFindFlags flags, struct Sci_TextToFind *ttf, GeanyMatchInfo **match_) { GeanyMatchInfo *match = NULL; GRegex *regex; @@ -2179,7 +2179,7 @@ gint search_find_text(ScintillaObject *sci, gint flags, struct Sci_TextToFind *t } -static gint find_document_usage(GeanyDocument *doc, const gchar *search_text, gint flags) +static gint find_document_usage(GeanyDocument *doc, const gchar *search_text, GeanyFindFlags flags) { gchar *buffer, *short_file_name; struct Sci_TextToFind ttf; @@ -2220,7 +2220,7 @@ static gint find_document_usage(GeanyDocument *doc, const gchar *search_text, gi void search_find_usage(const gchar *search_text, const gchar *original_search_text, - gint flags, gboolean in_session) + GeanyFindFlags flags, gboolean in_session) { GeanyDocument *doc; gint count = 0; @@ -2274,7 +2274,7 @@ void search_find_usage(const gchar *search_text, const gchar *original_search_te * the new search range end (ttf->chrg.cpMax). * Note: Normally you would call sci_start/end_undo_action() around this call. */ guint search_replace_range(ScintillaObject *sci, struct Sci_TextToFind *ttf, - gint flags, const gchar *replace_text) + GeanyFindFlags flags, const gchar *replace_text) { gint count = 0; gint offset = 0; /* difference between search pos and replace pos */ diff --git a/src/search.h b/src/search.h index e732697ce6..e6726fea91 100644 --- a/src/search.h +++ b/src/search.h @@ -37,17 +37,27 @@ struct GeanyDocument; /* document.h includes this header */ struct _ScintillaObject; struct Sci_TextToFind; +typedef enum GeanyFindFlags +{ + GEANY_FIND_MATCHCASE = 1 << 0, + GEANY_FIND_WHOLEWORD = 1 << 1, + GEANY_FIND_WORDSTART = 1 << 2, + GEANY_FIND_REGEXP = 1 << 3, + GEANY_FIND_MULTILINE = 1 << 4 +} +GeanyFindFlags; + /* the flags given in the search dialog for "find next", also used by the search bar */ typedef struct GeanySearchData { - gchar *text; - gint flags; - gboolean backwards; + gchar *text; + GeanyFindFlags flags; + gboolean backwards; /* set to TRUE when text was set by a search bar callback to keep track of * search bar background colour */ - gboolean search_bar; + gboolean search_bar; /* text as it was entered by user */ - gchar *original_text; + gchar *original_text; } GeanySearchData; @@ -61,15 +71,6 @@ enum GeanyFindSelOptions GEANY_FIND_SEL_AGAIN }; -enum GeanyFindFlags -{ - GEANY_FIND_MATCHCASE = 1 << 0, - GEANY_FIND_WHOLEWORD = 1 << 1, - GEANY_FIND_WORDSTART = 1 << 2, - GEANY_FIND_REGEXP = 1 << 3, - GEANY_FIND_MULTILINE = 1 << 4 -}; - /** Search preferences */ typedef struct GeanySearchPrefs { @@ -86,10 +87,10 @@ extern GeanySearchPrefs search_prefs; typedef struct GeanyMatchInfo { - gint flags; + GeanyFindFlags flags; /* range */ gint start, end; - /* only valid if (flags & SCFIND_REGEX) */ + /* only valid if (flags & GEANY_FIND_REGEX) */ gchar *match_text; /* text actually matched */ struct { @@ -114,24 +115,24 @@ void search_show_find_in_files_dialog_full(const gchar *text, const gchar *dir); void geany_match_info_free(GeanyMatchInfo *info); -gint search_find_prev(struct _ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_); +gint search_find_prev(struct _ScintillaObject *sci, const gchar *str, GeanyFindFlags flags, GeanyMatchInfo **match_); -gint search_find_next(struct _ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_); +gint search_find_next(struct _ScintillaObject *sci, const gchar *str, GeanyFindFlags flags, GeanyMatchInfo **match_); -gint search_find_text(struct _ScintillaObject *sci, gint flags, struct Sci_TextToFind *ttf, GeanyMatchInfo **match_); +gint search_find_text(struct _ScintillaObject *sci, GeanyFindFlags flags, struct Sci_TextToFind *ttf, GeanyMatchInfo **match_); void search_find_again(gboolean change_direction); -void search_find_usage(const gchar *search_text, const gchar *original_search_text, gint flags, gboolean in_session); +void search_find_usage(const gchar *search_text, const gchar *original_search_text, GeanyFindFlags flags, gboolean in_session); void search_find_selection(struct GeanyDocument *doc, gboolean search_backwards); -gint search_mark_all(struct GeanyDocument *doc, const gchar *search_text, gint flags); +gint search_mark_all(struct GeanyDocument *doc, const gchar *search_text, GeanyFindFlags flags); gint search_replace_match(struct _ScintillaObject *sci, const GeanyMatchInfo *match, const gchar *replace_text); guint search_replace_range(struct _ScintillaObject *sci, struct Sci_TextToFind *ttf, - gint flags, const gchar *replace_text); + GeanyFindFlags flags, const gchar *replace_text); G_END_DECLS From 0817dddc855a062521e64172810b3ede913eb004 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 19 Aug 2014 13:44:52 +0200 Subject: [PATCH 075/737] FreeBasic: Add missing `endif` keyword From a patch by TJF. Part of [feature-requests:#691]. --- data/filetypes.freebasic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/filetypes.freebasic b/data/filetypes.freebasic index 1a1486ca6e..a6f6f0a29b 100644 --- a/data/filetypes.freebasic +++ b/data/filetypes.freebasic @@ -27,7 +27,7 @@ binnumber=number_1 [keywords] # all items must be in one line -keywords=abs access acos alias allocate alpha and andalso any append as asc asin asm assert assertwarn atan2 atn base beep bin binary bit bitreset bitset bload bsave byref byte byval call callocate case cast cbyte cdbl cdecl chain chdir chr cint circle class clear clng clngint close cls color com command common condbroadcast condcreate conddestroy condsignal condwait cons const constructor continue cos cptr cshort csign csng csrlin cubyte cuint culng culngint cunsg curdir cushort custom cvd cvi cvl cvlongint cvs cvshort data date dateadd datediff datepart dateserial datevalue day deallocate declare defbyte defdbl defint deflng deflngint defshort defsng defstr defubyte defuint defulngint defushort delete destructor dim dir do double draw dylibfree dylibload dylibsymbol dynamic else elseif encoding end enum environ eof eqv erase erfn erl ermn err error escape exec exepath exit exp explicit export extends extern false fboolean field fileattr filecopy filedatetime fileexists filelen fix flip for format frac fre freefile function get getjoystick getkey getmouse gosub goto hex hibyte hiword hour if iif imageconvertrow imagecreate imagedestroy imp import inkey inp input input$ instr instrrev int integer interface is isdate kill lbound lcase left len let lib line lobyte loc local locate lock lof log long longint loop loword lpos lprint lpt lset ltrim mid minute mkd mkdir mki mkl mklongint mks mkshort mod month monthname multikey mutexcreate mutexdestroy mutexlock mutexunlock name namespace new next nokeyword not now object oct offsetof on once open operator option or orelse out output overload paint palette pascal pcopy peek pipe pmap point pointer poke pos preserve preset print private procptr property protected pset ptr public put random randomize read reallocate redim rem reset restore resume return rgb rgba right rmdir rnd rset rtrim run sadd scope screen screencontrol screencopy screenevent screenglproc screeninfo screenlist screenlock screenptr screenres screenset screensync screenunlock scrn second seek select setdate setenviron setmouse settime sgn shared shell shl short shr sin single sizeof sleep space spc sqr static stdcall step stop str string strptr sub swap system tab tan then this threadcreate threadwait time timer timeserial timevalue to trans trim true type ubound ubyte ucase uinteger ulong ulongint union unlock unsigned until ushort using va_arg va_first val valint vallng valuint valulng va_next var varptr view virtual wait wbin wchr weekday weekdayname wend whex while width window windowtitle winput with woct write wspace wstr wstring xor year zstring +keywords=abs access acos alias allocate alpha and andalso any append as asc asin asm assert assertwarn atan2 atn base beep bin binary bit bitreset bitset bload bsave byref byte byval call callocate case cast cbyte cdbl cdecl chain chdir chr cint circle class clear clng clngint close cls color com command common condbroadcast condcreate conddestroy condsignal condwait cons const constructor continue cos cptr cshort csign csng csrlin cubyte cuint culng culngint cunsg curdir cushort custom cvd cvi cvl cvlongint cvs cvshort data date dateadd datediff datepart dateserial datevalue day deallocate declare defbyte defdbl defint deflng deflngint defshort defsng defstr defubyte defuint defulngint defushort delete destructor dim dir do double draw dylibfree dylibload dylibsymbol dynamic else elseif encoding end endif enum environ eof eqv erase erfn erl ermn err error escape exec exepath exit exp explicit export extends extern false fboolean field fileattr filecopy filedatetime fileexists filelen fix flip for format frac fre freefile function get getjoystick getkey getmouse gosub goto hex hibyte hiword hour if iif imageconvertrow imagecreate imagedestroy imp import inkey inp input input$ instr instrrev int integer interface is isdate kill lbound lcase left len let lib line lobyte loc local locate lock lof log long longint loop loword lpos lprint lpt lset ltrim mid minute mkd mkdir mki mkl mklongint mks mkshort mod month monthname multikey mutexcreate mutexdestroy mutexlock mutexunlock name namespace new next nokeyword not now object oct offsetof on once open operator option or orelse out output overload paint palette pascal pcopy peek pipe pmap point pointer poke pos preserve preset print private procptr property protected pset ptr public put random randomize read reallocate redim rem reset restore resume return rgb rgba right rmdir rnd rset rtrim run sadd scope screen screencontrol screencopy screenevent screenglproc screeninfo screenlist screenlock screenptr screenres screenset screensync screenunlock scrn second seek select setdate setenviron setmouse settime sgn shared shell shl short shr sin single sizeof sleep space spc sqr static stdcall step stop str string strptr sub swap system tab tan then this threadcreate threadwait time timer timeserial timevalue to trans trim true type ubound ubyte ucase uinteger ulong ulongint union unlock unsigned until ushort using va_arg va_first val valint vallng valuint valulng va_next var varptr view virtual wait wbin wchr weekday weekdayname wend whex while width window windowtitle winput with woct write wspace wstr wstring xor year zstring preprocessor=#assert #define defined #else #elseif #endif #endmacro #error #if #ifdef #ifndef #inclib #include #lang #libpath #line #macro once #pragma #print typeof #undef # user definable keywords user1= From d78c8fb5d91da58bf5ee8bde918d8db7d65dc89c Mon Sep 17 00:00:00 2001 From: Frank Lanitz Date: Tue, 19 Aug 2014 14:32:29 +0200 Subject: [PATCH 076/737] SQL: Adding keyword hold Adding new keyword hold, used e.g. on SQLAnywhere to open a cursor 'with hold' --- data/filetypes.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/filetypes.sql b/data/filetypes.sql index 59dfb49fb9..d42a8ee0e3 100644 --- a/data/filetypes.sql +++ b/data/filetypes.sql @@ -22,7 +22,7 @@ quotedidentifier=identifier_2 [keywords] # all items must be in one line -keywords=absolute action add admin after aggregate alias all allocate alter and any are array as asc assertion at authorization auto_increment before begin bfile bigint binary bit blob bool boolean both breadth by call cascade cascaded case cast catalog char charset character check class client clob close cluster collate collation column comment commit completion connect connection constraint constraints constructor continue corresponding create cross cube current current_date current_path current_role current_time current_timestamp current_user cursor cycle data date day deallocate dec decimal declare default deferrable deferred delete depth deref desc describe descriptor destroy destructor deterministic diagnostics dictionary dimension disconnect diskgroup distinct domain double drop dynamic each else elsif end end-exec engine equals escape every except exception exec execute exists explain external false fetch first fixed flashback float for foreign found from free full function general get global go goto grant group grouping having host hour identity if ignore immediate in index indextype indicator initialize initially inner inout input insert int integer intersect interval into is isolation iterate join key language large last lateral leading left less level like limit local localtime localtimestamp locator log long loop map match materialized mediumblob mediumint mediumtext merge message middleint minus minute modifies modify module month names national natural nchar nclob new next no noaudit none not null numeric nvarchar2 object of off old on only open operation option or order ordinality out outer output owner package pad parameter parameters partial path postfix precision prefix preorder prepare preserve primary prior privileges procedure profile public purge raise read reads real recursive ref references referencing regexp regexp_like relative rename replace restrict result return returning returns revoke right role rollback rollup routine row rows savepoint schema scroll scope search second section select sequence session session_user serial set sets size smallint some space specific specifictype sql sqlexception sqlstate sqlwarning start state statement static structure synonym system_user table tablespace temporary terminate text than then time timestamp timezone_hour timezone_minute tinyint to trailing transaction translation treat trigger true truncate type under union unique uniqueidentifier unknown unnest unsigned update usage user using value values varchar varchar2 variable varying view when whenever where while with without work write year zone +keywords=absolute action add admin after aggregate alias all allocate alter and any are array as asc assertion at authorization auto_increment before begin bfile bigint binary bit blob bool boolean both breadth by call cascade cascaded case cast catalog char charset character check class client clob close cluster collate collation column comment commit completion connect connection constraint constraints constructor continue corresponding create cross cube current current_date current_path current_role current_time current_timestamp current_user cursor cycle data date day deallocate dec decimal declare default deferrable deferred delete depth deref desc describe descriptor destroy destructor deterministic diagnostics dictionary dimension disconnect diskgroup distinct domain double drop dynamic each else elsif end end-exec engine equals escape every except exception exec execute exists explain external false fetch first fixed flashback float for foreign found from free full function general get global go goto grant group grouping having hold host hour identity if ignore immediate in index indextype indicator initialize initially inner inout input insert int integer intersect interval into is isolation iterate join key language large last lateral leading left less level like limit local localtime localtimestamp locator log long loop map match materialized mediumblob mediumint mediumtext merge message middleint minus minute modifies modify module month names national natural nchar nclob new next no noaudit none not null numeric nvarchar2 object of off old on only open operation option or order ordinality out outer output owner package pad parameter parameters partial path postfix precision prefix preorder prepare preserve primary prior privileges procedure profile public purge raise read reads real recursive ref references referencing regexp regexp_like relative rename replace restrict result return returning returns revoke right role rollback rollup routine row rows savepoint schema scroll scope search second section select sequence session session_user serial set sets size smallint some space specific specifictype sql sqlexception sqlstate sqlwarning start state statement static structure synonym system_user table tablespace temporary terminate text than then time timestamp timezone_hour timezone_minute tinyint to trailing transaction translation treat trigger true truncate type under union unique uniqueidentifier unknown unnest unsigned update usage user using value values varchar varchar2 variable varying view when whenever where while with without work write year zone [settings] # default extension used when saving files From b7b34ec451c70927520f57ed773bd1b0736af2c0 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 19 Aug 2014 16:11:23 +0200 Subject: [PATCH 077/737] Rewrite the Txt2tags parser for better conformance and features This fixes parsing indented titles and titles with embedded delimiter characters, and adds support for title nesting information. Syntax: http://txt2tags.org/rules.html Closes [feature-requests:#690]. --- src/symbols.c | 1 + tagmanager/ctags/txt2tags.c | 176 ++++++++++++++++++++++++------------ 2 files changed, 121 insertions(+), 56 deletions(-) diff --git a/src/symbols.c b/src/symbols.c index c0a1cf67e1..dd65c329f0 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -315,6 +315,7 @@ const gchar *symbols_get_context_separator(gint ft_id) /* no context separator */ case GEANY_FILETYPES_ASCIIDOC: + case GEANY_FILETYPES_TXT2TAGS: return "\x03"; default: diff --git a/tagmanager/ctags/txt2tags.c b/tagmanager/ctags/txt2tags.c index 83991f15e4..f3092ab05d 100644 --- a/tagmanager/ctags/txt2tags.c +++ b/tagmanager/ctags/txt2tags.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2009, Eric Forgeot +* Copyright (c) 2014, Colomban Wendling * * Based on work by Jon Strait * @@ -19,102 +20,165 @@ #include "parse.h" #include "read.h" +#include "nestlevel.h" #include "vstring.h" + +/* as any character may happen in an input, use something highly unlikely */ +#define SCOPE_SEPARATOR '\x3' /* ASCII ETX */ + /* * DATA DEFINITIONS */ typedef enum { - K_SECTION = 0, K_HEADER + K_SECTION = 0 } Txt2tagsKind; static kindOption Txt2tagsKinds[] = { - { TRUE, 'm', "member", "sections" }, - { TRUE, 's', "struct", "header1"} + { TRUE, 'm', "member", "sections" } }; /* * FUNCTION DEFINITIONS */ -static void parse_title (vString* const name, const char control_char) -{ - char *text = vStringValue(name); - char *p = text; - int offset_start = 0; - boolean in_or_after_title = FALSE; - - while (p != NULL && *p != '\0') - { - if (*p == control_char) - { - if (in_or_after_title) - break; - else - offset_start++; - } - else - in_or_after_title = TRUE; - p++; - } - *p = '\0'; - vStringCopyS(name, text + offset_start); - vStringStripLeading(name); - vStringStripTrailing(name); -} - -static void makeTxt2tagsTag (const vString* const name, boolean name_before, Txt2tagsKind type) +static void makeTxt2tagsTag (const vString* const name, + const NestingLevels *const nls, + Txt2tagsKind type) { tagEntryInfo e; + vString *scope = NULL; kindOption *kind = &Txt2tagsKinds[type]; initTagEntry (&e, vStringValue(name)); - if (name_before) - e.lineNumber--; /* we want the line before the underline chars */ e.kindName = kind->name; e.kind = kind->letter; + if (nls->n > 0) { + int i; + kindOption *parentKind; + + scope = vStringNew(); + for (i = 0; i < nls->n; i++) { + if (vStringLength(scope) > 0) + vStringPut(scope, SCOPE_SEPARATOR); + vStringCat(scope, nls->levels[i].name); + } + parentKind = &Txt2tagsKinds[nls->levels[nls->n - 1].type]; + + e.extensionFields.scope[0] = parentKind->name; + e.extensionFields.scope[1] = vStringValue(scope); + } + makeTagEntry(&e); + + vStringDelete(scope); +} + +/* matches: ^ *[=_-]{20,} *$ */ +static boolean isTxt2tagsLine (const unsigned char *line) +{ + unsigned int len; + + while (isspace(*line)) line++; + for (len = 0; *line == '=' || *line == '-' || *line == '_'; len++) + line++; + while (isspace(*line)) line++; + + return len >= 20 && *line == 0; +} + +static boolean parseTxt2tagsTitle (const unsigned char *line, + vString *const title, + int *const depth_) +{ + const int MAX_TITLE_DEPTH = 5; /* maximum length of a title delimiter */ + unsigned char delim; + int delim_delta = 0; + const unsigned char *end; + + /* skip leading spaces, but no tabs (probably because they create quotes) */ + while (*line == ' ') line++; + + /* normal/numbered titles */ + if (*line != '=' && *line != '+') + return FALSE; + + delim = *line; + + /* find the start delimiter length */ + while (*line == delim && delim_delta < MAX_TITLE_DEPTH+1) + { + line++; + delim_delta++; + } + while (isspace(*line)) + line++; + + if (delim_delta > MAX_TITLE_DEPTH) /* invalid */ + return FALSE; + + *depth_ = delim_delta; + + /* find the end delimiter */ + end = line + strlen((const char *) line) - 1; + while (end > line && isspace(*end)) end--; + /* skip a possible label: \[[A-Za-z0-9_-]+\] */ + if (*end == ']') + { + end--; + while (end > line && (isalnum(*end) || *end == '_' || *end == '-')) + end--; + if (*end != '[') /* invalid */ + return FALSE; + end--; + } + while (end > line && *end == delim && delim_delta >= 0) + { + delim_delta--; + end--; + } + while (end > line && isspace(*end)) end--; + end++; + + /* if start and end delimiters are not identical, or the the name is empty */ + if (delim_delta != 0 || (end - line) <= 0) + return FALSE; + + vStringNCopyS(title, (const char *) line, end - line); + return TRUE; } static void findTxt2tagsTags (void) { + NestingLevels *nls = nestingLevelsNew(); vString *name = vStringNew(); const unsigned char *line; while ((line = fileReadLine()) != NULL) { - /*int name_len = vStringLength(name);*/ + int depth; - /* underlines must be the same length or more */ - /*if (name_len > 0 && (line[0] == '=' || line[0] == '-') && issame((const char*) line)) + if (isTxt2tagsLine(line)) + ; /* skip not to improperly match titles */ + else if (parseTxt2tagsTitle(line, name, &depth)) { - makeTxt2tagsTag(name, TRUE); - }*/ - if (line[0] == '=' || line[0] == '+') { - /*vStringClear(name);*/ - vStringCatS(name, (const char *) line); - vStringTerminate(name); - parse_title(name, line[0]); - makeTxt2tagsTag(name, FALSE, K_SECTION); - } - /* TODO what exactly should this match? - * K_HEADER ('struct') isn't matched in src/symbols.c */ - else if (strcmp((char*)line, "掳") == 0) { - /*vStringClear(name);*/ - vStringCatS(name, (const char *) line); - vStringTerminate(name); - makeTxt2tagsTag(name, FALSE, K_HEADER); - } - else { - vStringClear (name); - if (! isspace(*line)) - vStringCatS(name, (const char*) line); + NestingLevel *nl = nestingLevelsGetCurrent(nls); + while (nl && nl->indentation >= depth) + { + nestingLevelsPop(nls); + nl = nestingLevelsGetCurrent(nls); + } + vStringTerminate(name); + makeTxt2tagsTag(name, nls, K_SECTION); + nestingLevelsPush(nls, name, K_SECTION); + nestingLevelsGetCurrent(nls)->indentation = depth; } } vStringDelete (name); + nestingLevelsFree(nls); } extern parserDefinition* Txt2tagsParser (void) From 92e34baa4f02b0fda3c878434e4fac88e39835fb Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Tue, 19 Aug 2014 15:14:03 +0100 Subject: [PATCH 078/737] Update HACKING for changed doc generation instructions --- HACKING | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/HACKING b/HACKING index 9a5759be6b..4be5a79fb8 100644 --- a/HACKING +++ b/HACKING @@ -11,8 +11,12 @@ About this file This file contains information for anyone wanting to work on the Geany codebase. You should be aware of the open source licenses used - see the README file or the documentation. It is reStructuredText; the -source file is HACKING. You can generate hacking.html by running ``make -hacking-doc`` from the doc/ subdirectory. +source file is HACKING. + +You can generate this file by: + +* Passing the *--enable-html-docs* option to ``configure``. +* Running ``make`` from the doc/ subdirectory. Writing plugins --------------- @@ -28,8 +32,12 @@ You should generate and read the plugin API documentation, see below. Plugin API documentation ^^^^^^^^^^^^^^^^^^^^^^^^ You can generate documentation for the plugin API using the doxygen -tool. Run ``make api-doc`` in the doc subdirectory. The documentation -will be output to doc/reference/index.html. +tool: + +* Pass the *--enable-api-docs* option to ``configure``. +* Run ``make`` from the doc/ subdirectory. + +The documentation will be output to doc/reference/index.html. Alternatively you can view the API documentation online at http://www.geany.org/manual/reference/. From e587038dea5215cb2db1b6c61ed0a287e5ed1fd1 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 19 Aug 2014 16:24:48 +0200 Subject: [PATCH 079/737] Add a Txt2tags test case From the official docs: https://txt2tags.googlecode.com/svn/trunk/doc/English/rules.t2t --- tests/ctags/Makefile.am | 1 + tests/ctags/rules.t2t | 782 +++++++++++++++++++++++++++++++++++++ tests/ctags/rules.t2t.tags | 22 ++ 3 files changed, 805 insertions(+) create mode 100644 tests/ctags/rules.t2t create mode 100644 tests/ctags/rules.t2t.tags diff --git a/tests/ctags/Makefile.am b/tests/ctags/Makefile.am index 009d671614..6454e69629 100644 --- a/tests/ctags/Makefile.am +++ b/tests/ctags/Makefile.am @@ -215,6 +215,7 @@ test_sources = \ recursive.f95 \ refcurs.sql \ regexp.js \ + rules.t2t \ secondary_fcn_name.js \ semicolon.f90 \ shebang.js \ diff --git a/tests/ctags/rules.t2t b/tests/ctags/rules.t2t new file mode 100644 index 0000000000..93852fea48 --- /dev/null +++ b/tests/ctags/rules.t2t @@ -0,0 +1,782 @@ +Txt2tags Markup Rules + + +%!includeconf: rules.conf + +This document describes all the details about each txt2tags mark. +The target audience are **experienced** users. You may find it +useful if you want to master the marks or solve a specific problem +about a mark. + +If you are new to txt2tags or just want to know which are the +available marks, please read the [Markup Demo MARKUPDEMO]. + +Note 1: This document is generated directly from the txt2tags +test-suite. All the rules mentioned here are 100% in sync with the +current program code. + +Note 2: A good practice is to consult [the sources rules.t2t] when +reading, to see how the texts were made. + +Table of Contents: + +%%TOC + +------------------------------------------------------------- + += Paragraph =[paragraph] + +%INCLUDED(t2t) starts here: ../../../test/marks/paragraph.t2t +BODYINIT + +%%% Syntax: Lines grouped together +A paragraph is composed by one or more lines. +A blank line (or a table, or a list) ends the +current paragraph. + +%%% Syntax: Leading and trailing spaces are ignored + Leading and trailing spaces are ignored. + +%%% Syntax: A comment don't close a paragraph +A comment line can be placed inside a paragraph. +% this comment will be ignored +It will not affect it. + +%%% Closing: EOF closes the open paragraph +The end of the file (EOF) closes the +currently open paragraph. + += Comment =[comment] + +%INCLUDED(t2t) starts here: ../../../test/marks/comment.t2t +BODYINIT + +%%% Syntax: The % character at the line beginning (column 1) +%glued with the % mark +% separated from the % mark +% very distant from the % mark +%%%%%%% lots of % marks +% a blank comment, used for vertical spacing: +% +% NOTE: what matters is the first % being at the line beginning, +% the rest of the line is just ignored. + +%%% Syntax: Area (block) +%%% +You're not seeing this. +%%% + +%%% Syntax: Area (block) with trailing spaces +%%% +You're not seeing this. +%%% + +%%% Invalid: The % in any other position + % not on the line beginning (at column 2) + +some text % half line comments are not allowed + + += Line =[line] + +%INCLUDED(t2t) starts here: ../../../test/marks/line.t2t +BODYINIT + +%%% Syntax: At least 20 chars of - = _ +-------------------- +==================== +____________________ +%%% Syntax: Any kind of mixing is allowed +%% Free mixing is allowed to make the line, +%% but the first char is the identifier for +%% the difference between separator ( - _ ) +%% and strong ( = ) lines. +=========----------- +-_-_-_-_-_-_-_-_-_-_ +=-=-=-=-=-=-=-=-=-=- +=------------------= +--------====-------- +%%% Syntax: Leading and/or trailing spaces are allowed + -------------------- +-------------------- + -------------------- +%%% Invalid: Less than 20 chars (but strike matches) +--------- +%%% Invalid: Strange chars (but strike matches) +--------- ---------- + +---------+---------- + +( -------------------- ) + += Inline =[inline] + +%INCLUDED(t2t) starts here: ../../../test/marks/inline.t2t +BODYINIT + +%%% Syntax: Marks are greedy and must be "glued" with contents +%% GLUED: The contents must be glued with the marks, no spaces +%% between them. Right after the opening mark there must be a +%% non-blank character, as well as right before the closing mark. +%% +%% GREEDY: If the contents boundary character is the same as +%% the mark character, it is considered contents, not mark. +%% So ""****bold****"" turns to ""**bold**"" in HTML. + +i) **b** //i// __u__ --s-- ``m`` ""r"" ''t'' +i) **bo** //it// __un__ --st-- ``mo`` ""ra"" ''tg'' +i) **bold** //ital// __undr__ --strk-- ``mono`` ""raw"" ''tggd'' +i) **bo ld** //it al// __un dr__ --st rk-- ``mo no`` ""r aw"" ''tg gd'' +i) **bo * ld** //it / al// __un _ dr__ --st - rk-- ``mo ` no`` ""r " aw"" ''tg ' gd'' +i) **bo **ld** //it //al// __un __dr__ --st --rk-- ``mo ``no`` ""r ""aw"" ''tg ''gd'' +i) **bo ** ld** //it // al// __un __ dr__ --st -- rk-- ``mo `` no`` ""r "" aw"" ''tg '' gd'' +i) ****bold**** ////ital//// ____undr____ ----strk---- ````mono```` """"raw"""" ''''tggd'''' +i) ***bold*** ///ital/// ___undr___ ---strk--- ```mono``` """raw""" '''tggd''' + +%%% Syntax: Repetition is greedy +%% When the mark character is repeated many times, +%% the contents are expanded to the largest possible. +%% Thats why they are greedy, the outer marks are +%% the ones used. + +i) ***** ///// _____ ----- ````` """"" ''''' +i) ****** ////// ______ ------ `````` """""" '''''' +i) ******* /////// _______ ------- ``````` """"""" ''''''' +i) ******** //////// ________ -------- ```````` """""""" '''''''' +i) ********* ///////// _________ --------- ````````` """"""""" ''''''''' +i) ********** ////////// __________ ---------- `````````` """""""""" '''''''''' + +%%% Invalid: No contents + +i) **** //// ____ ---- ```` """" '''' +i) ** ** // // __ __ -- -- `` `` "" "" '' '' + +%%% Invalid: Contents not "glued" with marks +%% Spaces between the marks and the contents in any side +%% invalidate the mark. + +i) ** bold** // ital// __ undr__ -- strk-- `` mono`` "" raw"" '' tggd'' +i) **bold ** //ital // __undr __ --strk -- ``mono `` ""raw "" ''tggd '' +i) ** bold ** // ital // __ undr __ -- strk -- `` mono `` "" raw "" '' tggd '' + += Link =[link] + +%INCLUDED(t2t) starts here: ../../../test/marks/link.t2t +BODYINIT + +%%% Syntax: E-mail +user@domain.com +user@domain.com. +user@domain.com. any text. +any text: user@domain.com. any text. +[label user@domain.com] +%%% Syntax: E-mail with form data +user@domain.com?subject=bla +user@domain.com?subject=bla. +user@domain.com?subject=bla, +user@domain.com?subject=bla&cc=otheruser@domain.com +user@domain.com?subject=bla&cc=otheruser@domain.com. +user@domain.com?subject=bla&cc=otheruser@domain.com, +[label user@domain.com?subject=bla&cc=otheruser@domain.com]. +[label user@domain.com?subject=bla&cc=otheruser@domain.com.]. +%%% Syntax: URL +http://www.domain.com +http://www.domain.com/dir/ +http://www.domain.com/dir/// +http://www.domain.com. +http://www.domain.com, +http://www.domain.com. any text. +http://www.domain.com, any text. +http://www.domain.com/dir/. any text. +any text: http://www.domain.com. any text. +any text: http://www.domain.com/dir/. any text. +any text: http://www.domain.com/dir/index.html. any text. +any text: http://www.domain.com/dir/index.html, any text. +%%% Syntax: URL with anchor +http://www.domain.com/dir/#anchor +http://www.domain.com/dir/index.html#anchor +http://www.domain.com/dir/index.html#anchor. +http://www.domain.com/dir/#anchor. any text. +http://www.domain.com/dir/index.html#anchor. any text. +any text: http://www.domain.com/dir/#anchor. any text. +any text: http://www.domain.com/dir/index.html#anchor. any text. +%%% Syntax: URL with form data +http://domain.com?a=a@a.a&b=a+b+c. +http://domain.com?a=a@a.a&b=a+b+c, +http://domain.com/bla.cgi?a=a@a.a&b=a+b+c. +http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@. +%%% Syntax: URL with form data and anchor +http://domain.com?a=a@a.a&b=a+b+c.#anchor +http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor +http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor +%%% Syntax: URL with login data +http://user:password@domain.com/bla.html. +http://user:password@domain.com/dir/. +http://user:password@domain.com. +http://user:@domain.com. +http://user@domain.com. +%%% Syntax: URL with login, form and anchor +http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor +http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor +%%% Syntax: URL with label +[label www.domain.com] +%%% Syntax: URL with label (trailing spaces are discarded, leading are maintained) +%TODO normalize this behavior +[ label www.domain.com] +[label www.domain.com] +%%% Syntax: URL with label, stressing +[anchor http://www.domain.com/dir/index.html#anchor.] +[login http://user:password@domain.com/bla.html] +[form http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.] +[form & anchor http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor] +[login & form http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.] +%%% Syntax: Link with label for local files +[local link up ..] +[local link file bla.html] +[local link anchor #anchor] +[local link file/anchor bla.html#anchor] +[local link file/anchor bla.html#anchor.] +[local link img abc.gif] +%%% Syntax: Another link as a label +[www.fake.com www.domain.com] +%%% Syntax: URL with funny chars +http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm +http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_- +http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_-1%. +http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_-1%. +%%% Test: Various per line +http://L1.com ! L2@www.com ! [L3 www.com] ! [L4 w@ww.com] ! www.L5.com +%%% Feature: Guessed link, adding protocol automatically +www.domain.com +www2.domain.com +ftp.domain.com +WWW.DOMAIN.COM +FTP.DOMAIN.COM +[label www.domain.com] +[label ftp.domain.com] +[label WWW.DOMAIN.COM] +[label FTP.DOMAIN.COM] +%%% Invalid: Trailing space on link +[label www.domain.com ] +%%% Invalid: Label with ] char (use postproc) +[label] www.domain.com] + += Image =[image] + +%INCLUDED(t2t) starts here: ../../../test/marks/image.t2t +BODYINIT + +%%% Syntax: Image name inside brackets: [img] +[img.png] + +%%% Syntax: Image pointing to a link: [[img] link] +[[img.png] http://txt2tags.org] + +%%% Align: Image position is preserved when inside paragraph +[img.png] Image at the line beginning. + +Image in the middle [img.png] of the line. + +Image at the line end. [img.png] + +%%% Align: Image alone with spaces around is aligned +[img.png] + [img.png] + [img.png] + +%%% Test: Two glued images with no spaces (left & right) +[img.png][img.png] + +%%% Test: Various per line +Images [img.png] mixed [img.png] with [img.png] text. + +Images glued together: [img.png][img.png][img.png]. + +%%% Invalid: Spaces inside are not allowed +[img.png ] + +[ img.png] + +[ img.png ] + += Macro =[macro] + +%INCLUDED(t2t) starts here: ../../../test/marks/macro.t2t +BODYINIT + +%%% Syntax: Macro without formatting string +Date : %%date - %%date() +Mtime : %%mtime - %%mtime() +Infile : %%infile - %%infile() +Outfile : %%outfile - %%outfile() + +%%% Syntax: Macro name is case insensitive +Date : %%dAtE +Mtime : %%mTiMe +Infile : %%iNfIlE +Outfile : %%oUtFiLe + +%%% Syntax: Macro with formatting string +Date : %%date(txt %C txt) +Mtime : %%mtime(txt %C txt) +Infile : %%infile(txt %e txt) +Outfile : %%outfile(txt %e txt) + +%%% Syntax: Leading and trailing spaces are preserved +Date : (%%date( txt )) - (%%date( %C )) +Mtime : (%%mtime( txt )) - (%%mtime( %C )) +Infile : (%%infile( txt )) - (%%infile( %e )) +Outfile : (%%outfile( txt )) - (%%outfile( %e )) + +%%% Test: Expansion of the percent char +Date : %%date(%) - %%date(%%) - %%date(%%%) - %%date(%%%) +Mtime : %%mtime(%) - %%mtime(%%) - %%mtime(%%%) - %%mtime(%%%) +Infile : %%infile(%) - %%infile(%%) - %%infile(%%%) - %%infile(%%%) +Outfile : %%outfile(%) - %%outfile(%%) - %%outfile(%%%) - %%outfile(%%%) + +%%% Test: Various per line, glued +Date : %%date(%C)%%date%%date +Mtime : %%mtime(%C)%%mtime%%mtime +Infile : %%infile(%e)%%infile%%infile +Outfile : %%outfile(%e)%%outfile%%outfile + +%%% Test: Path formatters +Path : %%infile(%p) +Path : %%outfile(%p) +Dirname : %%infile(%d, %D) +Dirname : %%outfile(%d, %D) +File : %%infile(%F + %e = %f) +File : %%outfile(%F + %e = %f) + += Numbered Title =[numtitle] + +See [Title #title], the same rules apply. + += Title =[title] + +%INCLUDED(t2t) starts here: ../../../test/marks/title.t2t +BODYINIT + +%%% Syntax: Balanced equal signs (from 1 to 5) += Title Level 1 = +== Title Level 2 == +=== Title Level 3 === +==== Title Level 4 ==== +===== Title Level 5 ===== +%%% Label: Between brackets, alphanumeric [A-Za-z0-9_-] += Title Level 1 =[lab_el-1] +== Title Level 2 ==[lab_el-2] +=== Title Level 3 ===[lab_el-3] +==== Title Level 4 ====[lab_el-4] +===== Title Level 5 =====[lab_el-5] +%%% Syntax: Spaces around and/or inside are allowed (and ignored) + ===Title Level 3=== + === Title Level 3 === + === Title Level 3 === +=== Title Level 3 === +=== Title Level 3 === + === Title Level 3 ===[lab_el-9] +%%% Invalid: Unbalanced equal signs + =Not Title + + ==Not Title= + + ===Not Title==== +%%% Invalid: Level deeper than 5 + ======Not Title 6====== + +=======Not Title 7======= +%%% Invalid: Space between title and label +=Not Title= [label1] +%%% Invalid: Space inside label +=Not Title=[ label ] +%%% Invalid: Strange chars inside label +=Not Title=[la/bel] + += Quote =[quote] + +%INCLUDED(t2t) starts here: ../../../test/marks/quote.t2t +BODYINIT + +%%% Syntax: TAB defines quote + To quote a paragraph, just prefix it by a TAB + character. All the lines of the paragraph must + begin with a TAB. +Any non-tabbed line closes the quote block. + +%%% Nesting: Creating deeper quotes + The number of leading TABs identifies the quote + block depth. This is quote level 1. + With two TABs, we are on the quote + level 2. + The more TABs, more deep is + the quote level. + There isn't a limit. + +%%% Nesting: Reverse nesting works + This quote starts at + level 4. + Then its depth is decreased. + Counting down, one by one. + Until the level 1. + +%%% Nesting: Random count + Unlike lists, any quote block is + independent, not part of a tree. + The TAB count don't need to be incremental + by one. + The nesting don't need + to follow any rule. + Quotes can be opened and closed + in any way. + You choose. + +%%% Nesting: When not supported + Some targets (as sgml) don't support the + nesting of quotes. There is only one quote + level. + In this case, no matter how much + TABs are used to define the quote + block, it always will be level 1. + +%%% Syntax: Spaces after TAB + Spaces AFTER the TAB character are allowed. + But be careful, it can be confusing. + +%%% Invalid: Spaces before TAB + Spaces BEFORE the TAB character + invalidate the mark. It's not quote. + +%%% Invalid: Paragraphs inside + Paragraph breaks inside a quote aren't + possible. + + This sample are two separated quoted + paragraphs, not a quote block with + two paragraphs inside. + +%%% Closing: EOF closes the open block + The end of the file (EOF) closes the + currently open quote block. + += Raw =[raw] + +See [Verbatim #verbatim], the same rules apply. + += Verbatim =[verbatim] + +%INCLUDED(t2t) starts here: ../../../test/marks/verbatim.t2t +BODYINIT + +%%% Syntax: A single line +``` A verbatim line. + +%%% Syntax: A single line with leading spaces +``` Another verbatim line, with leading spaces. + +%%% Syntax: Area (block) +``` +A verbatim area delimited + by lines with marks. +``` + +%%% Syntax: Area (block) with trailing spaces +``` +Trailing spaces and TABs after the area marks +are allowed, but not encouraged nor documented. +``` + +%%% Invalid: No space between mark and contents +```Not a verbatim line, need one space after mark. + +%%% Invalid: Leading spaces on block marks + ``` + Not a verbatim area. + The marks must be at the line beginning, + no leading spaces. + ``` + +%%% Closing: EOF closes the open block +``` +The end of the file (EOF) closes +the currently open verbatim area. +``` + += Definition List =[deflist] + +See [List #list], the same rules apply. + += Numbered List =[numlist] + +See [List #list], the same rules apply. + += List =[list] + +%INCLUDED(t2t) starts here: ../../../test/marks/list.t2t +BODYINIT + +%%% Items: Prefixed by hyphen +- Use the hyphen to prefix list items. +- There must be one space after the hyphen. +- The list is closed by two consecutive blank lines. + + +%%% Items: Free leading spacing (indentation) + - The list can be indented on the source document. + - You can use any number of spaces. + - The result will be the same. + + +%%% Items: Vertical spacing between items +- Let one blank line between the list items. + +- It will be maintained on the conversion. + +- Some targets don't support this behavior. + +- This one was separated by a line with blanks. + You can also put a blank line inside + + the item contents and it will be preserved. + + +%%% Items: Exactly ONE space after the hyphen +-This is not a list (no space) + +- This is not a list (more than one space) + +- This is not a list (a TAB instead the space) + + +%%% Items: Catchy cases +- - This is a list +- + This is a list +- : This is a list + + +%%% Nesting: Creating sublists +- This is the "mother" list first item. +- Here is the second, but inside this item, + - there is a sublist, with its own items. + - Note that the items of the same sublist + - must have the same indentation. + - And this can go on, opening sublists. + - Just add leading spaces before the + - hyphen and sublists will be opened. + - The two blank lines closes them all. + + +%%% Nesting: Free leading spacing (indentation) +- When nesting lists, the additional spaces are free. + - You can add just one, + - or many. + - What matters is to put more than the previous. + - But remember that the other items of the same list + - must use the same indentation. + + +%%% Nesting: Maximum depth +- There is not a depth limit, + - you can go deeper and deeper. + - But some targets may have restrictions. + - The LaTeX maximum is here, 4 levels. + - This one and the following sublists + - are moved up to the level 4 + - when converting to LaTeX. + - On the other targets, + - it is just fine + - to have a very deep list. + + +%%% Nesting: Reverse doesn't work + - Reverse nesting doesn't work. + - Because a sublist *must* have a mother list. + - It's the list concept, not a txt2tags limitation. + - All this sublists will be bumped to mother lists. +- At level 1, like this one. + + +%%% Nesting: Going deeper and back + +%% When nesting back to an upper level, the previous sublist +%% is automatically closed. +- Level 1 + - Level 2 + - Level 3 + - Level 4 + - Level 3 -- (closed Level 4) + - Level 2 -- (closed Level 3) +- Level 1 -- (closed Level 2) + + +%% More than one list can be closed when nesting back. +- Level 1 + - Level 2 + - Level 3 + - Level 4 +- Level 1 -- (closed Level 4, Level 3 and Level 2) + + +%%% Nesting: Vertical spacing between lists +- Level 1 + + - Level 2 -- blank BEFORE and AFTER (in) + + - Level 3 +% comment lines are NOT considered blank lines + - Level 4 +% comment lines are NOT considered blank lines + - Level 3 + + - Level 2 -- blank BEFORE and AFTER (out) + +- Level 1 + + - Level 2 -- blank BEFORE (spaces) and AFTER (TAB) + + - Level 3 + + +%%% Nesting: Messing up +%% Be careful when going back on the nesting, +%% it must be on a valid level! If not, it will +%% be bumped up to the previous valid level. +- Level 1 + - Level 2 + - Level 3 + - Level 4 + - Level 3.5 ??? + - Level 3 + - Level 2.5 ??? + - Level 2 + - Level 1.5 ??? +- Level 1 + + +%%% Closing: Two (not so) empty lines +- This list is closed by a line with spaces and other with TABs + + +- This list is NOT closed by two comment lines +% comment lines are NOT considered blank lines +% comment lines are NOT considered blank lines +- This list is closed by a line with spaces and TAB, +- then a comment line, then an empty line. + +% comment lines are NOT considered blank lines + +%%% Closing: Empty item closes current (sub)list + +%% The two blank lines closes ALL the lists. +%% To close just the current, use an empty item. +- Level 1 + - Level 2 + - Level 3 + - + Level 2 + - + Level 1 +- + +%% The empty item can have trailing blanks. +- Empty item with trailing spaces. +- + +- Empty item with trailing TAB. +- + +%%% Closing: EOF closes the lists +- If the end of the file (EOF) is hit, + - all the currently opened list are closed, + - just like when using the two blank lines. + + += Table =[table] + +%INCLUDED(t2t) starts here: ../../../test/marks/table.t2t +BODYINIT + +%%% Syntax: Lines starting with a pipe | +| Cell 1 + +%%% Syntax: Extra pipes separate cells +| Cell 1 | Cell 2 | Cell 3 + +%%% Syntax: With a trailing pipe, make border +| Cell 1 | Cell 2 | Cell 3 | + +%%% Syntax: Table lines starting with double pipe are heading +|| Cell 1 | Cell 2 | Cell 3 | + +%%% Align: Spaces before the leading pipe centralize the table + | Cell 1 | Cell 2 | Cell 3 | + +%%% Align: Spaces inside the cell denote its alignment + || Heading | Heading | Heading | +% comments don't close an opened table + | <- | -- | -> | + | -- | -- | -- | + | -> | -- | <- | + +%%% Span: Column span is defined by extra pipes at cell closing + || 1 | 2 | 3+4 || + | 1 | 2 | 3 | 4 | + | 1+2+3 ||| 4 | + | 1 | 2+3 || 4 | + | 1+2+3+4 |||| + +%%% Test: Empty cells are placed as expected + | 0 | 1 | 2 | | + | 4 | 5 | | 7 | + | 8 | | A | B | + | | D | E | F | + +%%% Test: Lines with different number of cells + | 1 | + | 1 | 2 | + | 1 | 2 | 3 | + | 1 | 2 | 3 | 4 | + | 1 | 2 | 3 | 4 | 5 | + +%%% Test: Empty cells + Span + Messy cell number = Fun! + | Jan | + | Fev || + | Mar ||| + | Apr |||| + | May ||||| + | 20% | 40% | 60% | 80% | 100% | + + | | | / | | | + | | / / / / / ||| | + | / / / / / / / / / ||||| + | | o | | o | | + | | | . | | | + | | = = = = ||| | + + | 01 | 02 | | | 05 | | 07 | | + | | | 11 | | 13 | | | 16 | + | 17 | | 19 | 20 | | | 23 | | + | 25 | 26 | | | 29 | 30 | | 32 | + | | | 35 | | 37 | | 39 | 40 | + +%%% Test: Lots of cells at the same line +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | + +%%% Test: Empty lines +| | +| | +| | + +%%% Invalid: There must be at least one space around the pipe +|this|is|not|a|table| + +|this| is| not| a| table| + +|this |is |not |a |table | + +%%% Invalid: You must use spaces, not TABs +| this | is | not | a | table | + +------------------------------------------------------------ + +The End. diff --git a/tests/ctags/rules.t2t.tags b/tests/ctags/rules.t2t.tags new file mode 100644 index 0000000000..b512b19f15 --- /dev/null +++ b/tests/ctags/rules.t2t.tags @@ -0,0 +1,22 @@ +# format=tagmanager +Comment640 +Definition List640 +Image640 +Inline640 +Line640 +Link640 +List640 +Macro640 +Numbered List640 +Numbered Title640 +Paragraph640 +Quote640 +Raw640 +Table640 +Title640 +Title Level 1640 +Title Level 264蜹itle Level 10 +Title Level 364蜹itle Level 1Title Level 20 +Title Level 464蜹itle Level 1Title Level 2Title Level 30 +Title Level 564蜹itle Level 1Title Level 2Title Level 3Title Level 40 +Verbatim640 From a1466f656fd260739f48e2d0e162ac7805ffb4ac Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 19 Aug 2014 16:34:21 +0200 Subject: [PATCH 080/737] Add a Txt2tags test case From the official docs: https://txt2tags.googlecode.com/svn/trunk/samples/sample.t2t --- tests/ctags/Makefile.am | 1 + tests/ctags/sample.t2t | 225 ++++++++++++++++++++++++++++++++++++ tests/ctags/sample.t2t.tags | 14 +++ 3 files changed, 240 insertions(+) create mode 100644 tests/ctags/sample.t2t create mode 100644 tests/ctags/sample.t2t.tags diff --git a/tests/ctags/Makefile.am b/tests/ctags/Makefile.am index 6454e69629..3f4bca226b 100644 --- a/tests/ctags/Makefile.am +++ b/tests/ctags/Makefile.am @@ -216,6 +216,7 @@ test_sources = \ refcurs.sql \ regexp.js \ rules.t2t \ + sample.t2t \ secondary_fcn_name.js \ semicolon.f90 \ shebang.js \ diff --git a/tests/ctags/sample.t2t b/tests/ctags/sample.t2t new file mode 100644 index 0000000000..55e0217f16 --- /dev/null +++ b/tests/ctags/sample.t2t @@ -0,0 +1,225 @@ +TXT2TAGS SAMPLE +Aurelio Jargas +%%mtime(%m/%d/%Y) + +%!encoding: UTF-8 + +This text is before the introduction. + +But it's OK. + + = Introduction = + +Welcome to the txt2tags sample file. + +Here you have examples and a brief explanation of all +marks. + +The first 3 lines of this file are used as headers, +on the following format: +``` +line1: document title +line2: author name, email +line3: date, version +``` + +Lines with balanced equal signs = around are titles. + +% a secret comment! +%TODO link to program site http://txt2tags.org + + + = Fonts and Beautifiers = + +We have two sets of fonts: + +The NORMAL type that can be improved with beautifiers. + +The TYPEWRITER type that uses monospaced font for +pre-formatted text. + +We will now enter on a subtitle... + + + == Beautifiers == + +The text marks for beautifiers are simple, just as you +type on a plain text email message. + +We use double *, /, - and _ to represent **bold**, +//italic//, --strike-- and __underline__. + +The **//bold italic//** style is also supported as a +combination. + + + == Pre-Formatted Text == + +We can put a code sample or other pre-formatted text: +``` + here is pre-formatted +//marks// are **not** ``interpreted`` +``` + +And also, it's easy to put a one line pre-formatted +text: +``` prompt$ ls /etc + +Or use ``pre-formatted`` inside sentences. + + + == More Cosmetics == + +Special entities like email (duh@somewhere.com) and +URL (http://www.duh.com) are detected automagically, +as long as the horizontal line: + +-------------------------------------------------------- +^ thin or large v +======================================================== + +You can also specify an [explicit link http://duh.org] +or an [explicit email duh@somewhere.com] with label. + +And remember, + A TAB in front of the line does a quotation. + More TABs, more depth (if allowed). +Nice. + + + = Lists = + +A list of items is natural, just putting a **dash** or +a **plus** at the beginning of the line. + + + == Plain List == + +The dash is the default list identifier. For sublists, +just add **spaces** at the beginning of the line. More +spaces, more sublists. + +- Earth + - America + - South America + - Brazil + - How deep can I go? + - Europe + - Lots of countries +- Mars + - Who knows? + + +The list ends with **two** consecutive blank lines. + + + == Numbered List == + +The same rules as the plain list, just a different +identifier (plus). + ++ one ++ two ++ three + - mixed lists! + - what a mess + + counting again + + ... ++ four + + + == Definition List == + +The definition list identifier is a colon, followed by +the term. The term contents is placed on the next line. + +: orange + a yellow fruit +: apple + a green or red fruit +: other fruits + - wee! + - mixing lists + + again! + + and again! + + + = Tables = + +Use pipes to compose table rows and cells. +Double pipe at the line beginning starts a heading row. +Natural spaces specify each cell alignment. + + | cell 1.1 | cell 1.2 | cell 1.3 | + | cell 2.1 | cell 2.2 | cell 2.3 | + | cell 3.1 | cell 3.2 | cell 3.3 | + +|| heading 1 | heading 2 | heading 3 | + | cell 1.1 | cell 1.2 | cell 1.3 | + | cell 2.1 | cell 2.2 | cell 2.3 | + + |_ heading 1 | cell 1.1 | cell 1.2 | + | heading 2 | cell 2.1 | cell 2.2 | + | heading 3 | cell 3.1 | cell 3.2 | + +|/ heading | heading 1 | heading 2 | + | heading 1 | cell 1.1 | cell 1.2 | + | heading 2 | cell 2.1 | cell 2.2 | + +Without the last pipe, no border: + + | cell 1.1 | cell 1.2 | cell 1.3 + | cell 2.1 | cell 2.2 | cell 2.3 + | cell 3.1 | cell 3.2 | cell 3.3 + +|| heading 1 | heading 2 | heading 3 + | cell 1.1 | cell 1.2 | cell 1.3 + | cell 2.1 | cell 2.2 | cell 2.3 + + |_ heading 1 | cell 1.1 | cell 1.2 + | heading 2 | cell 2.1 | cell 2.2 + | heading 3 | cell 3.1 | cell 3.2 + +|/ heading | heading 1 | heading 2 + | heading 1 | cell 1.1 | cell 1.2 + | heading 2 | cell 2.1 | cell 2.2 + + = Special Entities = + +Because things were too simple. + + + == Images == + +The image mark is as simple as it can be: ``[filename]``. + + [img/photo.jpg] + +And with some targets the image is linkable : + + [[img/photo.jpg] http://www.txt2tags.org] + +- The filename must end in PNG, JPG, GIF, or similar. +- No spaces inside the brackets! + + + == Other == +When the target needs, special chars like <, > and & +are escaped. + +The handy ``%%date`` macro expands to the current date. + +So today is %%date on the ISO ``YYYYMMDD`` format. + +You can also specify the date format with the %? flags, +as ``%%date(%m-%d-%Y)`` which gives: %%date(%m-%d-%Y). + +That's all for now. + +------------------------------------------------------- +%%% TRANSLATOR: Uncomment and translate the next two lines +%Translated by John Smith. +%------------------------------------------------------- +[img/t2tpowered.png] ([%%infile %%infile]) + +% vim: tw=55 diff --git a/tests/ctags/sample.t2t.tags b/tests/ctags/sample.t2t.tags new file mode 100644 index 0000000000..7dc8fb34d7 --- /dev/null +++ b/tests/ctags/sample.t2t.tags @@ -0,0 +1,14 @@ +# format=tagmanager +Beautifiers64蜦onts and Beautifiers0 +Definition List64蜭ists0 +Fonts and Beautifiers640 +Images64蜸pecial Entities0 +Introduction640 +Lists640 +More Cosmetics64蜦onts and Beautifiers0 +Numbered List64蜭ists0 +Other64蜸pecial Entities0 +Plain List64蜭ists0 +Pre-Formatted Text64蜦onts and Beautifiers0 +Special Entities640 +Tables640 From ff0fde30cbad0bf7597783c827235c29489c020c Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Wed, 30 Apr 2014 16:11:48 +0100 Subject: [PATCH 081/737] Use enum for Messages list store IDs --- src/msgwindow.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/msgwindow.c b/src/msgwindow.c index ebe7354b54..74ac6cc420 100644 --- a/src/msgwindow.c +++ b/src/msgwindow.c @@ -66,6 +66,15 @@ ParseData; MessageWindow msgwindow; +enum +{ + MSG_COL_LINE = 0, + MSG_COL_DOC, + MSG_COL_COLOR, + MSG_COL_STRING, + MSG_COL_COUNT +}; + static void prepare_msg_tree_view(void); static void prepare_status_tree_view(void); @@ -178,7 +187,7 @@ static void prepare_msg_tree_view(void) GtkTreeSelection *selection; /* line, doc, fg, str */ - msgwindow.store_msg = gtk_list_store_new(4, G_TYPE_INT, G_TYPE_POINTER, + msgwindow.store_msg = gtk_list_store_new(MSG_COL_COUNT, G_TYPE_INT, G_TYPE_POINTER, GDK_TYPE_COLOR, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(msgwindow.tree_msg), GTK_TREE_MODEL(msgwindow.store_msg)); g_object_unref(msgwindow.store_msg); @@ -382,7 +391,8 @@ void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const utf8_msg = tmp; gtk_list_store_append(msgwindow.store_msg, &iter); - gtk_list_store_set(msgwindow.store_msg, &iter, 0, line, 1, doc, 2, color, 3, utf8_msg, -1); + gtk_list_store_set(msgwindow.store_msg, &iter, + MSG_COL_LINE, line, MSG_COL_DOC, doc, MSG_COL_COLOR, color, MSG_COL_STRING, utf8_msg, -1); g_free(tmp); if (utf8_msg != tmp) @@ -1073,8 +1083,9 @@ gboolean msgwin_goto_messages_file_line(gboolean focus_editor) GeanyDocument *doc; GeanyDocument *old_doc = document_get_current(); - gtk_tree_model_get(model, &iter, 0, &line, 1, &doc, 3, &string, -1); - /* doc may have been closed, so check doc->index: */ + gtk_tree_model_get(model, &iter, + MSG_COL_LINE, &line, MSG_COL_DOC, &doc, MSG_COL_STRING, &string, -1); + /* doc may have been closed, so check doc is valid: */ if (line >= 0 && DOC_VALID(doc)) { ret = navqueue_goto_line(old_doc, doc, line); From 18181c2e9043add8b13c1fc94c66db2ca5b885be Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Fri, 2 May 2014 15:33:44 +0100 Subject: [PATCH 082/737] Support pseudo-unique IDs for documents Add GeanyDocument::id, document_find_by_id() to plugin API. This also fixes clicking on a Messages item whose document has been closed and reused. Now the click will be ignored instead of jumping to an unexpected line in the new document. --- plugins/geanyfunctions.h | 2 ++ src/document.c | 45 +++++++++++++++++++++++++++++++++++++--- src/document.h | 6 ++++++ src/msgwindow.c | 31 ++++++++++++++++++--------- src/plugindata.h | 3 ++- src/plugins.c | 3 ++- 6 files changed, 75 insertions(+), 15 deletions(-) diff --git a/plugins/geanyfunctions.h b/plugins/geanyfunctions.h index 6f70e92515..9b157a7254 100644 --- a/plugins/geanyfunctions.h +++ b/plugins/geanyfunctions.h @@ -80,6 +80,8 @@ geany_functions->p_document->document_compare_by_tab_order #define document_compare_by_tab_order_reverse \ geany_functions->p_document->document_compare_by_tab_order_reverse +#define document_find_by_id \ + geany_functions->p_document->document_find_by_id #define editor_get_indent_prefs \ geany_functions->p_editor->editor_get_indent_prefs #define editor_create_widget \ diff --git a/src/document.c b/src/document.c index ac6079a788..92175baf0d 100644 --- a/src/document.c +++ b/src/document.c @@ -84,9 +84,11 @@ GeanyFilePrefs file_prefs; /** Dynamic array of GeanyDocument pointers. - * Once a pointer is added to this, it is never freed. This means you can keep a pointer - * to a document over time, but it may represent a different - * document later on, or may have been closed and become invalid. + * Once a pointer is added to this, it is never freed. This means the same document pointer + * can represent a different document later on, or it may have been closed and become invalid. + * For this reason, you should use document_find_by_id() instead of storing + * document pointers over time if there is a chance the user can close the + * document. * * @warning You must check @c GeanyDocument::is_valid when iterating over this array. * This is done automatically if you use the foreach_document() macro. @@ -110,6 +112,9 @@ typedef struct } undo_action; +static guint doc_id_counter = 0; + + static void document_undo_clear(GeanyDocument *doc); static void document_redo_add(GeanyDocument *doc, guint type, gpointer data); static gboolean remove_page(guint page_num); @@ -225,6 +230,38 @@ GeanyDocument *document_find_by_sci(ScintillaObject *sci) } +/** Lookup an old document by its ID. + * Useful when the corresponding document may have been closed since the + * ID was retrieved. + * @return @c NULL if the document is no longer open. + * + * Example: + * @code + * static guint id; + * GeanyDocument *doc = ...; + * id = doc->id; // store ID + * ... + * // time passes - the document may have been closed by now + * GeanyDocument *doc = document_find_by_id(id); + * gboolean still_open = (doc != NULL); + * @endcode + * @since 1.25. */ +GeanyDocument *document_find_by_id(guint id) +{ + guint i; + + if (!id) + return NULL; + + foreach_document(i) + { + if (documents[i]->id == id) + return documents[i]; + } + return NULL; +} + + /** Gets the notebook page index for a document. * @param doc The document. * @return The index. @@ -586,6 +623,7 @@ static GeanyDocument *document_create(const gchar *utf8_filename) /* initialize default document settings */ doc->priv = g_new0(GeanyDocumentPrivate, 1); + doc->id = ++doc_id_counter; doc->index = new_idx; doc->file_name = g_strdup(utf8_filename); doc->editor = editor_create(doc); @@ -648,6 +686,7 @@ static gboolean remove_page(guint page_num) ui_add_recent_document(doc); doc->is_valid = FALSE; + doc->id = 0; if (main_status.quitting) { diff --git a/src/document.h b/src/document.h index 620857d81e..8859195e96 100644 --- a/src/document.h +++ b/src/document.h @@ -118,6 +118,10 @@ typedef struct GeanyDocument * not be set elsewhere. * @see file_name. */ gchar *real_path; + /** A pseudo-unique ID for this document. + * @c 0 is reserved as an unused value. + * @see document_find_by_id(). */ + guint id; struct GeanyDocumentPrivate *priv; /* should be last, append fields before this item */ } @@ -208,6 +212,8 @@ GeanyDocument *document_index(gint idx); GeanyDocument *document_find_by_sci(ScintillaObject *sci); +GeanyDocument *document_find_by_id(guint id); + gint document_get_notebook_page(GeanyDocument *doc); GeanyDocument* document_get_from_page(guint page_num); diff --git a/src/msgwindow.c b/src/msgwindow.c index 74ac6cc420..22a1a480bc 100644 --- a/src/msgwindow.c +++ b/src/msgwindow.c @@ -69,7 +69,7 @@ MessageWindow msgwindow; enum { MSG_COL_LINE = 0, - MSG_COL_DOC, + MSG_COL_DOC_ID, MSG_COL_COLOR, MSG_COL_STRING, MSG_COL_COUNT @@ -186,8 +186,8 @@ static void prepare_msg_tree_view(void) GtkTreeViewColumn *column; GtkTreeSelection *selection; - /* line, doc, fg, str */ - msgwindow.store_msg = gtk_list_store_new(MSG_COL_COUNT, G_TYPE_INT, G_TYPE_POINTER, + /* line, doc id, fg, str */ + msgwindow.store_msg = gtk_list_store_new(MSG_COL_COUNT, G_TYPE_INT, G_TYPE_UINT, GDK_TYPE_COLOR, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(msgwindow.tree_msg), GTK_TREE_MODEL(msgwindow.store_msg)); g_object_unref(msgwindow.store_msg); @@ -392,7 +392,8 @@ void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const gtk_list_store_append(msgwindow.store_msg, &iter); gtk_list_store_set(msgwindow.store_msg, &iter, - MSG_COL_LINE, line, MSG_COL_DOC, doc, MSG_COL_COLOR, color, MSG_COL_STRING, utf8_msg, -1); + MSG_COL_LINE, line, MSG_COL_DOC_ID, doc ? doc->id : 0, MSG_COL_COLOR, + color, MSG_COL_STRING, utf8_msg, -1); g_free(tmp); if (utf8_msg != tmp) @@ -1079,18 +1080,28 @@ gboolean msgwin_goto_messages_file_line(gboolean focus_editor) if (gtk_tree_selection_get_selected(selection, &model, &iter)) { gint line; + guint id; gchar *string; GeanyDocument *doc; GeanyDocument *old_doc = document_get_current(); gtk_tree_model_get(model, &iter, - MSG_COL_LINE, &line, MSG_COL_DOC, &doc, MSG_COL_STRING, &string, -1); - /* doc may have been closed, so check doc is valid: */ - if (line >= 0 && DOC_VALID(doc)) + MSG_COL_LINE, &line, MSG_COL_DOC_ID, &id, MSG_COL_STRING, &string, -1); + if (line >= 0 && id > 0) { - ret = navqueue_goto_line(old_doc, doc, line); - if (ret && focus_editor) - gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci)); + /* check doc is still open */ + doc = document_find_by_id(id); + if (!doc) + { + ui_set_statusbar(FALSE, _("The document has been closed.")); + utils_beep(); + } + else + { + ret = navqueue_goto_line(old_doc, doc, line); + if (ret && focus_editor) + gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci)); + } } else if (line < 0 && string != NULL) { diff --git a/src/plugindata.h b/src/plugindata.h index ec6bc80f9d..23daf87598 100644 --- a/src/plugindata.h +++ b/src/plugindata.h @@ -58,7 +58,7 @@ G_BEGIN_DECLS * @warning You should not test for values below 200 as previously * @c GEANY_API_VERSION was defined as an enum value, not a macro. */ -#define GEANY_API_VERSION 218 +#define GEANY_API_VERSION 219 /* hack to have a different ABI when built with GTK3 because loading GTK2-linked plugins * with GTK3-linked Geany leads to crash */ @@ -324,6 +324,7 @@ typedef struct DocumentFuncs gint (*document_compare_by_display_name) (gconstpointer a, gconstpointer b); gint (*document_compare_by_tab_order) (gconstpointer a, gconstpointer b); gint (*document_compare_by_tab_order_reverse) (gconstpointer a, gconstpointer b); + GeanyDocument* (*document_find_by_id)(guint id); } DocumentFuncs; diff --git a/src/plugins.c b/src/plugins.c index ffa5357ea5..1a98f89a91 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -111,7 +111,8 @@ static DocumentFuncs doc_funcs = { &document_get_notebook_page, &document_compare_by_display_name, &document_compare_by_tab_order, - &document_compare_by_tab_order_reverse + &document_compare_by_tab_order_reverse, + &document_find_by_id }; static EditorFuncs editor_funcs = { From 72897bac7d5475170eeefab82060c1ffffe3cc0f Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 19 Aug 2014 16:44:40 +0200 Subject: [PATCH 083/737] Add a Txt2tags test case for titles This is simply extracted from the rules.t2t test, but with unique title content as the tagmanager removes duplicate tags in tags files. --- tests/ctags/Makefile.am | 1 + tests/ctags/titles.t2t | 40 +++++++++++++++++++++++++++++++++++++ tests/ctags/titles.t2t.tags | 17 ++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 tests/ctags/titles.t2t create mode 100644 tests/ctags/titles.t2t.tags diff --git a/tests/ctags/Makefile.am b/tests/ctags/Makefile.am index 3f4bca226b..0bc1c604d5 100644 --- a/tests/ctags/Makefile.am +++ b/tests/ctags/Makefile.am @@ -248,6 +248,7 @@ test_sources = \ test.vhd \ test_input.rs \ test_input2.rs \ + titles.t2t \ traffic_signal.v \ traits.php \ union.f \ diff --git a/tests/ctags/titles.t2t b/tests/ctags/titles.t2t new file mode 100644 index 0000000000..79cfb11060 --- /dev/null +++ b/tests/ctags/titles.t2t @@ -0,0 +1,40 @@ + +% from rules.t2t, with unique title content as our output removed +% duplicate tags (even with different scopes) + + +%%% Syntax: Balanced equal signs (from 1 to 5) += First Title Level 1 = +== First Title Level 2 == +=== First Title Level 3 === +==== First Title Level 4 ==== +===== First Title Level 5 ===== +%%% Label: Between brackets, alphanumeric [A-Za-z0-9_-] += Second Title Level 1 =[lab_el-1] +== Second Title Level 2 ==[lab_el-2] +=== Second Title Level 3 ===[lab_el-3] +==== Second Title Level 4 ====[lab_el-4] +===== Second Title Level 5 =====[lab_el-5] +%%% Syntax: Spaces around and/or inside are allowed (and ignored) + ===Third Title Level 3=== + === Fourth Title Level 3 === + === Fifth Title Level 3 === +=== Sixth Title Level 3 === +=== Seventh Title Level 3 === + === Eighth Title Level 3 ===[lab_el-9] +%%% Invalid: Unbalanced equal signs + =First Not Title + + ==Second Not Title= + + ===Third Not Title==== +%%% Invalid: Level deeper than 5 + ======First Not Title 6====== + +=======First Not Title 7======= +%%% Invalid: Space between title and label +=Fourth Not Title= [label1] +%%% Invalid: Space inside label +=Fifth Not Title=[ label ] +%%% Invalid: Strange chars inside label +=Sixth Not Title=[la/bel] diff --git a/tests/ctags/titles.t2t.tags b/tests/ctags/titles.t2t.tags new file mode 100644 index 0000000000..185bb6141d --- /dev/null +++ b/tests/ctags/titles.t2t.tags @@ -0,0 +1,17 @@ +# format=tagmanager +Eighth Title Level 364蜸econd Title Level 1Second Title Level 20 +Fifth Title Level 364蜸econd Title Level 1Second Title Level 20 +First Title Level 1640 +First Title Level 264蜦irst Title Level 10 +First Title Level 364蜦irst Title Level 1First Title Level 20 +First Title Level 464蜦irst Title Level 1First Title Level 2First Title Level 30 +First Title Level 564蜦irst Title Level 1First Title Level 2First Title Level 3First Title Level 40 +Fourth Title Level 364蜸econd Title Level 1Second Title Level 20 +Second Title Level 1640 +Second Title Level 264蜸econd Title Level 10 +Second Title Level 364蜸econd Title Level 1Second Title Level 20 +Second Title Level 464蜸econd Title Level 1Second Title Level 2Second Title Level 30 +Second Title Level 564蜸econd Title Level 1Second Title Level 2Second Title Level 3Second Title Level 40 +Seventh Title Level 364蜸econd Title Level 1Second Title Level 20 +Sixth Title Level 364蜸econd Title Level 1Second Title Level 20 +Third Title Level 364蜸econd Title Level 1Second Title Level 20 From 80c648e7f3731a36ef7213be7e4a42cfb4d470ab Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 20 Aug 2014 15:44:07 +0200 Subject: [PATCH 084/737] Remove generated HTML documentation from version control As it is generated by the build system it doesn't have to be checked in, and having it in became a whole lot more annoying since it started being generated automatically on `make all` instead of specific (and weird) `make doc`, as it means whenever the documentation changes the HTML is re-generated on any make run. This is particularly problematic if using a different Docutils version than the one used to generate the checked-in version as it would create local noise that should not be committed, yet keep being annoying. This situation probably leads to most people disabling (or at least, not enabling) the documentation generation on normal builds, itself leading to more hassle updating of the documentation. --- .gitignore | 1 + doc/geany.html | 6970 ------------------------------------------------ 2 files changed, 1 insertion(+), 6970 deletions(-) delete mode 100644 doc/geany.html diff --git a/.gitignore b/.gitignore index 91fffe471d..0ae55162ec 100644 --- a/.gitignore +++ b/.gitignore @@ -99,6 +99,7 @@ Makefile.in /doc/Doxyfile /doc/Doxyfile.stamp /doc/geany.1 +/doc/geany.html /doc/hacking.html /doc/*.pdf /doc/*.aux diff --git a/doc/geany.html b/doc/geany.html deleted file mode 100644 index 3d77bcce21..0000000000 --- a/doc/geany.html +++ /dev/null @@ -1,6970 +0,0 @@ - - - - - - -Geany - - - - - -
-

Geany

-

A fast, light, GTK+ IDE

- --- - - - - - - - -
Authors:Enrico Tr枚ger -
Nick Treleaven -
Frank Lanitz -
Colomban Wendling -
Matthew Brush
Date:2014-04-16
Version:1.24.1
- -

Copyright 漏 2005-2014

-

This document is distributed under the terms of the GNU General Public -License as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. A copy of this -license can be found in the file COPYING included with the source code -of this program, and also in the chapter GNU General Public License.

-
-

Contents

- -
-
-

Introduction

-
-

About Geany

-

Geany is a small and lightweight Integrated Development Environment. It -was developed to provide a small and fast IDE, which has only a few -dependencies on other packages. Another goal was to be as independent -as possible from a particular Desktop Environment like KDE or GNOME - -Geany only requires the GTK2 runtime libraries.

-

Some basic features of Geany:

-
    -
  • Syntax highlighting
  • -
  • Code folding
  • -
  • Autocompletion of symbols/words
  • -
  • Construct completion/snippets
  • -
  • Auto-closing of XML and HTML tags
  • -
  • Calltips
  • -
  • Many supported filetypes including C, Java, PHP, HTML, Python, Perl, -Pascal, and others
  • -
  • Symbol lists
  • -
  • Code navigation
  • -
  • Build system to compile and execute your code
  • -
  • Simple project management
  • -
  • Plugin interface
  • -
-
-
-

Where to get it

-

You can obtain Geany from http://www.geany.org/ or perhaps also from -your distribution. For a list of available packages, please see -http://www.geany.org/Download/ThirdPartyPackages.

-
-
-

License

-

Geany is distributed under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 of -the License, or (at your option) any later version. A copy of this -license can be found in the file COPYING included with the source -code of this program and in the chapter, GNU General Public License.

-

The included Scintilla library (found in the subdirectory -scintilla/) has its own license, which can be found in the chapter, -License for Scintilla and SciTE.

-
-
-

About this document

-

This documentation is available in HTML and text formats. -The latest version can always be found at http://www.geany.org/.

-

If you want to contribute to it, see Contributing to this document.

-
-
-
-

Installation

-
-

Requirements

-

You will need the GTK (>= 2.16.0) libraries and their dependencies -(Pango, GLib and ATK). Your distro should provide packages for these, -usually installed by default. For Windows, you can download an installer -from the website which bundles these libraries.

-
-
-

Binary packages

-

There are many binary packages available. For an up-to-date but maybe -incomplete list see http://www.geany.org/Download/ThirdPartyPackages.

-
-
-

Source compilation

-

Compiling Geany is quite easy. -To do so, you need the GTK (>= 2.16.0) libraries and header files. -You also need the Pango, GLib and ATK libraries and header files. -All these files are available at http://www.gtk.org, but very often -your distro will provide development packages to save the trouble of -building these yourself.

-

Furthermore you need, of course, a C and C++ compiler. The GNU versions -of these tools are recommended.

-
-

Autotools based build system

-

The Autotools based build system is very mature and has been well tested. -To use it, you just need the Make tool, preferably GNU Make.

-

Then run the following commands:

-
-$ ./configure
-$ make
-
-

Then as root:

-
-% make install
-
-

Or via sudo:

-
-% sudo make install
-
-
-
-

Waf based build system

-

The Waf build system is still quite young and under heavy development but already in a -usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need -to install Python on your system. -The advantage of the Waf build system over the Autotools based build system is that the whole -build process might be a bit faster. Especially when you use the Waf -cache feature for repetitive builds (e.g. when changing only a few source files -to test something) will become much faster since Waf will cache and re-use the -unchanged built files and only compile the changed code again. See Waf Cache for details. -To build Geany with Waf as run:

-
-$ ./waf configure
-$ ./waf build
-
-

Then as root:

-
-% ./waf install
-
-
-

Waf cache

-

The Waf build system has a nice and interesting feature which can help to avoid -a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features -or trying to debug something in Geany. -Waf is able to store and retrieve the object files from a cache. This cache is declared -using the environment variable WAFCACHE. -A possible location of the cache directory could be ~/.cache/waf. In order to make use of -this, you first need to create this directory:

-
-$ mkdir -p ~/.cache/waf
-
-

then add the environment variable to your shell configuration (the following example is for -Bash and should be adjusted to your used shell):

-
-export WAFCACHE=/home/username/.cache/waf
-
-

Remember to replace username with your actual username.

-

More information about the Waf cache feature are available at -http://code.google.com/p/waf/wiki/CacheObjectFiles.

-
-
Cleaning the cache
-

You should be careful about the size of the cache directory as it may -grow rapidly over time. -Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it -clean by yourself. -An easy way to keep it clean is to run the following command regularly to remove old -cached files:

-
-$ find /home/username/.cache/waf -mtime +14 -exec rm {} \;
-
-

This will delete all files in the cache directory which are older than 14 days.

-

For details about the find command and its options, check its manual page.

-
-
-
-
-

Custom installation

-

The configure script supports several common options, for a detailed -list, type:

-
-$ ./configure --help
-
-

or:

-
-$ ./waf --help
-
-

(depending on which build system you use).

-

You may also want to read the INSTALL file for advanced installation -options.

- -
-
-

Dynamic linking loader support and VTE

-

In the case that your system lacks dynamic linking loader support, you -probably want to pass the option --disable-vte to the configure -script. This prevents compiling Geany with dynamic linking loader -support for automatically loading libvte.so.4 if available.

-
-
-

Build problems

-

If there are any errors during compilation, check your build -environment and try to find the error, otherwise contact the mailing -list or one the authors. Sometimes you might need to ask for specific -help from your distribution.

-
-
-
-

Installation prefix

-

If you want to find Geany's system files after installation you may -want to know the installation prefix.

-

Pass the --print-prefix option to Geany to check this - see -Command line options. The first path is the prefix.

-

On Unix-like systems this is commonly /usr if you installed from -a binary package, or /usr/local if you build from source.

-
-

Note

-

Editing system files is not necessary as you should use the -per-user configuration files instead, which don't need root -permissions. See Configuration files.

-
-
-
-
-

Usage

-
-

Getting started

-

You can start Geany in the following ways:

-
    -
  • From the Desktop Environment menu:

    -

    Choose in your application menu of your used Desktop Environment: -Development --> Geany.

    -

    At Windows-systems you will find Geany after installation inside -the application menu within its special folder.

    -
  • -
  • From the command line:

    -

    To start Geany from a command line, type the following and press -Return:

    -
    -% geany
    -
    -
  • -
-
-
-

The Geany workspace

-

The Geany window is shown in the following figure:

-./images/main_window.png -

The workspace has the following parts:

-
    -
  • The menu.
  • -
  • An optional toolbar.
  • -
  • An optional sidebar that can show the following tabs:
      -
    • Documents - A document list, and
    • -
    • Symbols - A list of symbols in your code.
    • -
    -
  • -
  • The main editor window.
  • -
  • An optional message window which can show the following tabs:
      -
    • Status - A list of status messages.
    • -
    • Compiler - The output of compiling or building programs.
    • -
    • Messages - Results of 'Find Usage', 'Find in Files' and other actions
    • -
    • Scribble - A text scratchpad for any use.
    • -
    • Terminal - An optional terminal window.
    • -
    -
  • -
  • A status bar
  • -
-

Most of these can be configured in the Interface preferences, the -View menu, or the popup menu for the relevant area.

-

Additional tabs may be added to the sidebar and message window by plugins.

-

The position of the tabs can be selected in the interface preferences.

-

The sizes of the sidebar and message window can be adjusted by -dragging the dividers.

-
-
-

Command line options

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Short optionLong optionFunction
none+numberSet initial line number for the first opened file -(same as --line, do not put a space between the + sign -and the number). E.g. "geany +7 foo.bar" will open the -file foo.bar and place the cursor in line 7.
none--columnSet initial column number for the first opened file.
-c dir_name--config=directory_nameUse an alternate configuration directory. The default -configuration directory is ~/.config/geany/ and that -is where geany.conf and other configuration files -reside.
none--ft-namesPrint a list of Geany's internal filetype names (useful -for snippets configuration).
-g--generate-tagsGenerate a global tags file (see -Generating a global tags file).
-P--no-preprocessingDon't preprocess C/C++ files when generating tags.
-i--new-instanceDo not open files in a running instance, force opening -a new instance. Only available if Geany was compiled -with support for Sockets.
-l--lineSet initial line number for the first opened file.
none--list-documentsReturn a list of open documents in a running Geany -instance. -This can be used to read the currently opened documents in -Geany from an external script or tool. The returned list -is separated by newlines (LF) and consists of the full, -UTF-8 encoded filenames of the documents. -Only available if Geany was compiled with support for -Sockets.
-m--no-msgwinDo not show the message window. Use this option if you -do not need compiler messages or VTE support.
-n--no-ctagsDo not load symbol completion and call tip data. Use this -option if you do not want to use them.
-p--no-pluginsDo not load plugins or plugin support.
none--print-prefixPrint installation prefix, the data directory, the lib -directory and the locale directory (in that order) to -stdout, one line each. This is mainly intended for plugin -authors to detect installation paths.
-r--read-onlyOpen all files given on the command line in read-only mode. -This only applies to files opened explicitly from the command -line, so files from previous sessions or project files are -unaffected.
-s--no-sessionDo not load the previous session's files.
-t--no-terminalDo not load terminal support. Use this option if you do -not want to load the virtual terminal emulator widget -at startup. If you do not have libvte.so.4 installed, -then terminal-support is automatically disabled. Only -available if Geany was compiled with support for VTE.
none--socket-file

Use this socket filename for communication with a -running Geany instance. This can be used with the following -command to execute Geany on the current workspace:

-
-geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
-
-
none--vte-libSpecify explicitly the path including filename or only -the filename to the VTE library, e.g. -/usr/lib/libvte.so or libvte.so. This option is -only needed when the auto-detection does not work. Only -available if Geany was compiled with support for VTE.
-v--verboseBe verbose (print useful status messages).
-V--versionShow version information and exit.
-?--helpShow help information and exit.
none[files ...]

Open all given files at startup. This option causes -Geany to ignore loading stored files from the last -session (if enabled). -Geany also recognizes line and column information when -appended to the filename with colons, e.g. -"geany foo.bar:10:5" will open the file foo.bar and -place the cursor in line 10 at column 5.

-

Projects can also be opened but a project file (*.geany) -must be the first non-option argument. All additionally -given files are ignored.

-
-

You can also pass line number and column number information, e.g.:

-
-geany some_file.foo:55:4
-
-

Geany supports all generic GTK options, a list is available on the -help screen.

-
-
-

General

-
-

Startup

-

At startup, Geany loads all files from the last time Geany was -launched. You can disable this feature in the preferences dialog -(see General Startup preferences).

-

You can start several instances of Geany, but only the first will -load files from the last session. In the subsequent instances, you -can find these files in the file menu under the "Recent files" item. -By default this contains the last 10 recently opened files. You can -change the number of recently opened files in the preferences dialog.

-

To run a second instance of Geany, do not specify any filenames on -the command-line, or disable opening files in a running instance -using the appropriate command line option.

-
-
-

Opening files from the command-line in a running instance

-

Geany detects if there is an an instance of itself already running and opens files -from the command-line in that instance. So, Geany can -be used to view and edit files by opening them from other programs -such as a file manager.

-

You can also pass line number and column number information, e.g.:

-
-geany some_file.foo:55:4
-
-

This would open the file some_file.foo with the cursor on line 55, -column 4.

-

If you do not like this for some reason, you can disable using the first -instance by using the appropriate command line option -- see the section -called Command line options.

-
-
-

Virtual terminal emulator widget (VTE)

-

If you have installed libvte.so on your system, it is loaded -automatically by Geany, and you will have a terminal widget in the -notebook at the bottom.

-

If Geany cannot find any libvte.so at startup, the terminal widget -will not be loaded. So there is no need to install the package containing -this file in order to run Geany. Additionally, you can disable the use -of the terminal widget by command line option, for more information -see the section called Command line options.

-

You can use this terminal (from now on called VTE) much as you would -a terminal program like xterm. There is basic clipboard support. You -can paste the contents of the clipboard by pressing the right mouse -button to open the popup menu, and choosing Paste. To copy text from -the VTE, just select the desired text and then press the right mouse -button and choose Copy from the popup menu. On systems running the -X Window System you can paste the last selected text by pressing the -middle mouse button in the VTE (on 2-button mice, the middle button -can often be simulated by pressing both mouse buttons together).

-

In the preferences dialog you can specify a shell which should be -started in the VTE. To make the specified shell a login shell just -use the appropriate command line options for the shell. These options -should be found in the manual page of the shell. For zsh and bash -you can use the argument --login.

-
-

Note

-

Geany tries to load libvte.so. If this fails, it tries to load -some other filenames. If this fails too, you should check whether you -installed libvte correctly. Again note, Geany will run without this -library.

-
-

It could be, that the library is called something else than -libvte.so (e.g. on FreeBSD 6.0 it is called libvte.so.8). If so -please set a link to the correct file (as root):

-
-# ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
-
-

Obviously, you have to adjust the paths and set X to the number of your -libvte.so.

-

You can also specify the filename of the VTE library to use on the command -line (see the section called Command line options) or at compile time -by specifying the command line option --with-vte-module-path to -./configure.

-
-
-

Defining own widget styles using .gtkrc-2.0

-

You can define your widget style for many of Geany's GUI parts. To -do this, just edit your .gtkrc-2.0 (usually found in your home -directory on UNIX-like systems and in the etc subdirectory of your -Geany installation on Windows).

-

To have a defined style used by Geany you must assign it to -at least one of Geany's widgets. For example use the following line:

-
-widget "Geany*" style "geanyStyle"
-
-

This would assign your style "geany_style" to all Geany -widgets. You can also assign styles only to specific widgets. At the -moment you can use the following widgets:

-
    -
  • GeanyMainWindow
  • -
  • GeanyEditMenu
  • -
  • GeanyToolbarMenu
  • -
  • GeanyDialog
  • -
  • GeanyDialogPrefs
  • -
  • GeanyDialogProject
  • -
  • GeanyDialogSearch
  • -
  • GeanyMenubar
  • -
  • GeanyToolbar
  • -
-

An example of a simple .gtkrc-2.0:

-
-style "geanyStyle"
-{
-    font_name="Sans 12"
-}
-widget "GeanyMainWindow" style "geanyStyle"
-
-style "geanyStyle"
-{
-    font_name="Sans 10"
-}
-widget "GeanyPrefsDialog" style "geanyStyle"
-
-
-
-
-

Documents

-
-

Switching between documents

-

The documents list and the editor tabs are two different ways -to switch between documents using the mouse. When you hit the key -combination to move between tabs, the order is determined by the tab -order. It is not alphabetical as shown in the documents list -(regardless of whether or not editor tabs are visible).

-

See the Notebook tab keybindings section for useful -shortcuts including for Most-Recently-Used document switching.

-
-
-

Cloning documents

-

The Document->Clone menu item copies the current document's text, -cursor position and properties into a new untitled document. If -there is a selection, only the selected text is copied. This can be -useful when making temporary copies of text or for creating -documents with similar or identical contents.

-
-
-
-

Character sets and Unicode Byte-Order-Mark (BOM)

-
-

Using character sets

-

Geany provides support for detecting and converting character sets. So -you can open and save files in different character sets, and even -convert a file from one character set to another. To do this, -Geany uses the character conversion capabilities of the GLib library.

-

Only text files are supported, i.e. opening files which contain -NULL-bytes may fail. Geany will try to open the file anyway but it is -likely that the file will be truncated because it can only be read up -to the first occurrence of a NULL-byte. All characters after this -position are lost and are not written when you save the file.

-

Geany tries to detect the encoding of a file while opening it, but -auto-detecting the encoding of a file is not easy and sometimes an -encoding might not be detected correctly. In this case you have to -set the encoding of the file manually in order to display it -correctly. You can this in the file open dialog by selecting an -encoding in the drop down box or by reloading the file with the -file menu item "Reload as". The auto-detection works well for most -encodings but there are also some encodings where it is known that -auto-detection has problems.

-

There are different ways to set different encodings in Geany:

-
    -
  • Using the file open dialog

    -

    This opens the file with the encoding specified in the encoding drop -down box. If the encoding is set to "Detect from file" auto-detection -will be used. If the encoding is set to "Without encoding (None)" the -file will be opened without any character conversion and Geany will -not try to auto-detect the encoding (see below for more information).

    -
  • -
  • Using the "Reload as" menu item

    -

    This item reloads the current file with the specified encoding. It can -help if you opened a file and found out that the wrong encoding was used.

    -
  • -
  • Using the "Set encoding" menu item

    -

    Contrary to the above two options, this will not change or reload -the current file unless you save it. It is useful when you want to -change the encoding of the file.

    -
  • -
  • Specifying the encoding in the file itself

    -

    As mentioned above, auto-detecting the encoding of a file may fail on -some encodings. If you know that Geany doesn't open a certain file, -you can add the specification line, described in the next section, -to the beginning of the file to force Geany to use a specific -encoding when opening the file.

    -
  • -
-
-
-

In-file encoding specification

-

Geany detects meta tags of HTML files which contain charset information -like:

-
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
-
-

and the specified charset is used when opening the file. This is useful if the -encoding of the file cannot be detected properly. -For non-HTML files you can also define a line like:

-
-/* geany_encoding=ISO-8859-15 */
-
-

or:

-
-# geany_encoding=ISO-8859-15 #
-
-

to force an encoding to be used. The #, /* and */ are examples -of filetype-specific comment characters. It doesn't matter which -characters are around the string " geany_encoding=ISO-8859-15 " as long -as there is at least one whitespace character before and after this -string. Whitespace characters are in this case a space or tab character. -An example to use this could be you have a file with ISO-8859-15 -encoding but Geany constantly detects the file encoding as ISO-8859-1. -Then you simply add such a line to the file and Geany will open it -correctly the next time.

-

Since Geany 0.15 you can also use lines which match the -regular expression used to find the encoding string: -coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*

-
-

Note

-

These specifications must be in the first 512 bytes of the file. -Anything after the first 512 bytes will not be recognized.

-
-

Some examples are:

-
-# encoding = ISO-8859-15
-
-

or:

-
-# coding: ISO-8859-15
-
-
-
-

Special encoding "None"

-

There is a special encoding "None" which uses no -encoding. It is useful when you know that Geany cannot auto-detect -the encoding of a file and it is not displayed correctly. Especially -when the file contains NULL-bytes this can be useful to skip auto -detection and open the file properly at least until the occurrence -of the first NULL-byte. Using this encoding opens the file as it is -without any character conversion.

-
-
-

Unicode Byte-Order-Mark (BOM)

-

Furthermore, Geany detects a Unicode Byte Order Mark (see -http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course, -this feature is only available if the opened file is in a Unicode -encoding. The Byte Order Mark helps to detect the encoding of a file, -e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems -using a Byte Order Mark could cause some problems for programs not -expecting it, e.g. the compiler gcc stops -with stray errors, PHP does not parse a script containing a BOM and -script files starting with a she-bang maybe cannot be started. In the -status bar you can easily see whether the file starts with a BOM or -not.

-

If you want to set a BOM for a file or if you want to remove it -from a file, just use the document menu and toggle the checkbox.

-
-

Note

-

If you are unsure what a BOM is or if you do not understand where -to use it, then it is probably not important for you and you can -safely ignore it.

-
-
-
-
-

Editing

-
-

Folding

-

Geany provides basic code folding support. Folding means the ability to -show and hide parts of the text in the current file. You can hide -unimportant code sections and concentrate on the parts you are working on -and later you can show hidden sections again. In the editor window there is -a small grey margin on the left side with [+] and [-] symbols which -show hidden parts and hide parts of the file respectively. By -clicking on these icons you can simply show and hide sections which are -marked by vertical lines within this margin. For many filetypes nested -folding is supported, so there may be several fold points within other -fold points.

-
-

Note

-

You can customize the folding icon and line styles - see the -filetypes.common Folding Settings.

-
-

If you don't like it or don't need it at all, you can simply disable -folding support completely in the preferences dialog.

-

The folding behaviour can be changed with the "Fold/Unfold all children of -a fold point" option in the preference dialog. If activated, Geany will -unfold all nested fold points below the current one if they are already -folded (when clicking on a [+] symbol). -When clicking on a [-] symbol, Geany will fold all nested fold points -below the current one if they are unfolded.

-

This option can be inverted by pressing the Shift -key while clicking on a fold symbol. That means, if the "Fold/Unfold all -children of a fold point" option is enabled, pressing Shift will disable -it for this click and vice versa.

-
-
-

Column mode editing (rectangular selections)

-

There is basic support for column mode editing. To use it, create a -rectangular selection by holding down the Control and Shift keys -(or Alt and Shift on Windows) while selecting some text. -Once a rectangular selection exists you can start editing the text within -this selection and the modifications will be done for every line in the -selection.

-

It is also possible to create a zero-column selection - this is -useful to insert text on multiple lines.

-
-
-

Drag and drop of text

-

If you drag selected text in the editor widget of Geany the text is -moved to the position where the mouse pointer is when releasing the -mouse button. Holding Control when releasing the mouse button will -copy the text instead. This behaviour was changed in Geany 0.11 - -before the selected text was copied to the new position.

-
-
-

Indentation

-

Geany allows each document to indent either with a tab character, -multiple spaces or a combination of both.

-

The Tabs setting indents with one tab character per indent level, and -displays tabs as the indent width.

-

The Spaces setting indents with the number of spaces set in the indent -width for each level.

-

The Tabs and Spaces setting indents with spaces as above, then converts -as many spaces as it can to tab characters at the rate of one tab for -each multiple of the Various preference setting -indent_hard_tab_width (default 8) and displays tabs as the -indent_hard_tab_width value.

-

The default indent settings are set in Editor Indentation -preferences (see the link for more information).

-

The default settings can be overridden per-document using the -Document menu. They can also be overridden by projects - see -Project management.

-

The indent mode for the current document is shown on the status bar -as follows:

-
-
TAB
-
Indent with Tab characters.
-
SP
-
Indent with spaces.
-
T/S
-
Indent with tabs and spaces, depending on how much indentation is -on a line.
-
-
-

Applying new indentation settings

-

After changing the default settings you may wish to apply the new -settings to every document in the current session. To do this use the -Project->Apply Default Indentation menu item.

-
-
-

Detecting indent type

-

The Detect from file indentation preference can be used to -scan each file as it's opened and set the indent type based on -how many lines start with a tab vs. 2 or more spaces.

-
-
-
-

Auto-indentation

-

When enabled, auto-indentation happens when pressing Enter in the -Editor. It adds a certain amount of indentation to the new line so the -user doesn't always have to indent each line manually.

-

Geany has four types of auto-indentation:

-
-
None
-
Disables auto-indentation completely.
-
Basic
-
Adds the same amount of whitespace on a new line as on the previous line. -For the Tabs and the Spaces indent types the indentation will use the -same combination of characters as the previous line. The -Tabs and Spaces indentation type converts as explained above.
-
Current chars
-
Does the same as Basic but also indents a new line after an opening -brace '{', and de-indents when typing a closing brace '}'. For Python, -a new line will be indented after typing ':' at the end of the -previous line.
-
Match braces
-
Similar to Current chars but the closing brace will be aligned to -match the indentation of the line with the opening brace. This -requires the filetype to be one where Geany knows that the Scintilla -lexer understands matching braces (C, C++, D, HTML, Pascal, Bash, -Perl, TCL).
-
-

There is also XML-tag auto-indentation. This is enabled when the -mode is more than just Basic, and is also controlled by a filetype -setting - see xml_indent_tags.

-
-
-

Bookmarks

-

Geany provides a handy bookmarking feature that lets you mark one -or more lines in a document, and return the cursor to them using a -key combination.

-

To place a mark on a line, either left-mouse-click in the left margin -of the editor window, or else use Ctrl-m. This will -produce a small green plus symbol in the margin. You can have as many -marks in a document as you like. Click again (or use Ctrl-m again) -to remove the bookmark. To remove all the marks in a given document, -use "Remove Markers" in the Document menu.

-

To navigate down your document, jumping from one mark to the next, -use Ctrl-. (control period). To go in the opposite direction on -the page, use Ctrl-, (control comma). Using the bookmarking feature -together with the commands to switch from one editor tab to another -(Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to -navigate around multiple files.

-
-
-

Code navigation history

-

To ease navigation in source files and especially between -different files, Geany lets you jump between different navigation -points. Currently, this works for the following:

- -

When using one of these actions, Geany remembers your current position -and jumps to the new one. If you decide to go back to your previous -position in the file, just use "Navigate back a location". To -get back to the new position again, just use "Navigate forward a -location". This makes it easier to navigate in e.g. foreign code -and between different files.

-
-
-

Sending text through custom commands

-

You can define several custom commands in Geany and send the current -selection to one of these commands using the Edit->Format->Send -Selection to menu or keybindings. The output of the command will be -used to replace the current selection. This makes it possible to use -text formatting tools with Geany in a general way.

-

The selected text will be sent to the standard input of the executed -command, so the command should be able to read from it and it should -print all results to its standard output which will be read by -Geany. To help finding errors in executing the command, the output -of the program's standard error will be printed on Geany's standard -output.

-

If there is no selection, the whole current line is used instead.

-

To add a custom command, use the Send Selection to->Set Custom -Commands menu item. Click on Add to get a new item and type the -command. You can also specify some command line options. Empty -commands are not saved.

-

Normal shell quoting is supported, so you can do things like:

-
    -
  • sed 's/\./(dot)/g'
  • -
-

The above example would normally be done with the Replace all -function, but it can be handy to have common commands already set up.

-

Note that the command is not run in a shell, so if you want to use -shell features like pipes and command chains, you need to explicitly -launch the shell and pass it your command:

-
    -
  • sh -c 'sort | uniq'
  • -
-
-
-

Context actions

-

You can execute the context action command on the current word at the -cursor position or the available selection. This word or selection -can be used as an argument to the command. -The context action is invoked by a menu entry in the popup menu of the -editor and also a keyboard shortcut (see the section called -Keybindings).

-

The command can be specified in the preferences dialog and also for -each filetype (see "context_action_cmd" in the section called -Filetype configuration). When the context action is invoked, the filetype -specific command is used if available, otherwise the command -specified in the preferences dialog is executed.

-

The current word or selection can be referred with the wildcard "%s" -in the command, it will be replaced by the current word or -selection before the command is executed.

-

For example a context action can be used to open API documentation -in a browser window, the command to open the PHP API documentation -would be:

-
-firefox "http://www.php.net/%s"
-
-

when executing the command, the %s is substituted by the word near -the cursor position or by the current selection. If the cursor is at -the word "echo", a browser window will open(assumed your browser is -called firefox) and it will open the address: http://www.php.net/echo.

-
-
-

Autocompletion

-

Geany can offer a list of possible completions for symbols defined in the -tags and for all words in a document.

-

The autocompletion list for symbols is presented when the first few -characters of the symbol are typed (configurable, see Editor Completions -preferences, default 4) or when the Complete word -keybinding is pressed (configurable, see Editor keybindings, -default Ctrl-Space).

-

When the defined keybinding is typed and the Autocomplete all words in -document preference (in Editor Completions preferences) -is selected then the autocompletion list will show all matching words -in the document, if there are no matching symbols.

-

If you don't want to use autocompletion it can be dismissed until -the next symbol by pressing Escape. The autocompletion list is updated -as more characters are typed so that it only shows completions that start -with the characters typed so far. If no symbols begin with the sequence, -the autocompletion window is closed.

-

The up and down arrows will move the selected item. The highlighted -item on the autocompletion list can be chosen from the list by pressing -Enter/Return. You can also double-click to select an item. The sequence -will be completed to match the chosen item, and if the Drop rest of -word on completion preference is set (in Editor Completions -preferences) then any characters after the cursor that match -a symbol or word are deleted.

-
-

Word part completion

-

By default, pressing Tab will complete the selected item by word part; -useful e.g. for adding the prefix gtk_combo_box_entry_ without typing it -manually:

-
    -
  • gtk_com<TAB>
  • -
  • gtk_combo_<TAB>
  • -
  • gtk_combo_box_<e><TAB>
  • -
  • gtk_combo_box_entry_<s><ENTER>
  • -
  • gtk_combo_box_entry_set_text_column
  • -
-

The key combination can be changed from Tab - See Editor keybindings. -If you clear/change the key combination for word part completion, Tab -will complete the whole word instead, like Enter.

-
-
-

Scope autocompletion

-

E.g.:

-
-struct
-{
-    int i;
-    char c;
-} foo;
-
-

When you type foo. it will show an autocompletion list with 'i' and -'c' symbols.

-

It only works for languages that set parent scope names for e.g. struct -members. Currently this means C-like languages. The C tag parser only -parses global scopes, so this won't work for structs or objects declared -in local scope.

-
-
-
-

User-definable snippets

-

Snippets are small strings or code constructs which can be replaced or -completed to a more complex string. So you can save a lot of time when -typing common strings and letting Geany do the work for you. -To know what to complete or replace Geany reads a configuration file -called snippets.conf at startup.

-

Maybe you need to often type your name, so define a snippet like this:

-
-[Default]
-myname=Enrico Tr枚ger
-
-

Every time you write myname <TAB> in Geany, it will replace "myname" -with "Enrico Tr枚ger". The key to start autocompletion can be changed -in the preferences dialog, by default it is TAB. The corresponding keybinding -is called Complete snippet.

-

Paths

-

You can override the default snippets using the user -snippets.conf file. Use the Tools->Configuration -Files->snippets.conf menu item. See also Configuration file paths.

-

This adds the default settings to the user file if the file doesn't -exist. Alternatively the file can be created manually, adding only -the settings you want to change. All missing settings will be read -from the system snippets file.

-

Snippet groups

-

The file snippets.conf contains sections defining snippets that -are available for particular filetypes and in general.

-

The two sections "Default" and "Special" apply to all filetypes. -"Default" contains all snippets which are available for every -filetype and "Special" contains snippets which can only be used in -other snippets. So you can define often used parts of snippets and -just use the special snippet as a placeholder (see the -snippets.conf for details).

-

You can define sections with the name of a filetype eg "C++". The -snippets in that section are only available for use in files with that -filetype. Snippets in filetype sections will hide snippets with the -same name in the "Default" section when used in a file of that -filetype.

-

Substitution sequences for snippets

-

To define snippets you can use several special character sequences which -will be replaced when using the snippet:

- ---- - - - - - - - - - - - - - - - - - -
\n or %newline%Insert a new line (it will be replaced by the used EOL -char(s): LF, CR/LF, or CR).
\t or %ws%Insert an indentation step, it will be replaced according -to the current document's indent mode.
\s\s to force whitespace at beginning or end of a value -('key= value' won't work, use 'key=\svalue')
%cursor%Place the cursor at this position after completion has -been done. You can define multiple %cursor% wildcards -and use the keybinding Move cursor in snippet to jump -to the next defined cursor position in the completed -snippet.
%...%"..." means the name of a key in the "Special" section. -If you have defined a key "brace_open" in the "Special" -section you can use %brace_open% in any other snippet.
-

Snippet names must not contain spaces otherwise they won't -work correctly. But beside that you can define almost any -string as a snippet and use it later in Geany. It is not limited -to existing contructs of certain programming languages(like if, -for, switch). Define whatever you need.

-

Template wildcards

-

Since Geany 0.15 you can also use most of the available templates wildcards -listed in Template wildcards. All wildcards which are listed as -available in snippets can be used. For instance to improve the above example:

-
-[Default]
-myname=My name is {developer}
-mysystem=My system: {command:uname -a}
-
-

this will replace myname with "My name is " and the value of the template -preference developer.

-

Word characters

-

You can change the way Geany recognizes the word to complete, -that is how the start and end of a word is recognised when the -snippet completion is requested. The section "Special" may -contain a key "wordchars" which lists all characters a string may contain -to be recognized as a word for completion. Leave it commented to use -default characters or define it to add or remove characters to fit your -needs.

-
-

Snippet keybindings

-

Normally you would type the snippet name and press Tab. However, you -can define keybindings for snippets under the Keybindings group in -snippets.conf:

-
-[Keybindings]
-for=<Ctrl>7
-block_cursor=<Ctrl>8
-
-
-

Note

-

Snippet keybindings may be overridden by Geany's configurable -keybindings.

-
-
-
-
-

Inserting Unicode characters

-

You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding -Ctrl-Shift, type some hex digits representing the code point for the character -you want and hit Enter or Return (still holding Ctrl-Shift). If you release -Ctrl-Shift before hitting Enter or Return (or any other character), the code -insertion is completed, but the typed character is also entered. In the case -of Enter/Return, it is a newline, as you might expect.

-

In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u -in the keybinding preferences, then select Tools->Reload Configuration -or restart Geany. Note that it works slightly differently from other GTK -applications, in that you'll need to continue to hold down the Ctrl and Shift -keys while typing the code point hex digits (and the Enter or Return to finish the code point).

-
-
-
-

Search, replace and go to

-

This section describes search-related commands from the Search menu -and the editor window's popup menu:

-
    -
  • Find
  • -
  • Find selection
  • -
  • Find usage
  • -
  • Find in files
  • -
  • Replace
  • -
  • Go to tag definition
  • -
  • Go to tag declaration
  • -
  • Go to line
  • -
-

See also Search preferences.

-
-

Toolbar entries

-

There are also two toolbar entries:

-
    -
  • Search bar
  • -
  • Go to line entry
  • -
-

There are keybindings to focus each of these - see Focus -keybindings. Pressing Escape will then focus the editor.

- -
-
-

Find

-

The Find dialog is used for finding text in one or more open documents.

-./images/find_dialog.png -
-

Matching options

-

The syntax for the Use regular expressions option is shown in -Regular expressions.

-
-

Note

-

Use escape sequences is implied for regular expressions.

-
-

The Use escape sequences option will transform any escaped characters -into their UTF-8 equivalent. For example, \t will be transformed into -a tab character. Other recognized symbols are: \\, \n, \r, \uXXXX -(Unicode characters).

-
-
-

Find all

-

To find all matches, click on the Find All expander. This will reveal -several options:

-
    -
  • In Document
  • -
  • In Session
  • -
  • Mark
  • -
-

Find All In Document will show a list of matching lines in the -current document in the Messages tab of the Message Window. Find All -In Session does the same for all open documents.

-

Mark will highlight all matches in the current document with a -colored box. These markers can be removed by selecting the -Remove Markers command from the Document menu.

-
-
-

Change font in search dialog text fields

-

All search related dialogs use a Monospace for the text input fields to -increase the readability of input text. This is useful when you are -typing input such as regular expressions with spaces, periods and commas which -might it hard to read with a proportional font.

-

If you want to change the font, you can do this easily -by inserting the following style into your .gtkrc-2.0 -(usually found in your home directory on UNIX-like systems and in the -etc subdirectory of your Geany installation on Windows):

-
-style "search_style"
-{
-    font_name="Monospace 8"
-}
-widget "GeanyDialogSearch.*.GtkEntry" style:highest "search_style"
-
-

Please note the addition of ":highest" in the last line which sets the priority -of this style to the highest available. Otherwise, the style is ignored -for the search dialogs.

-
-
-
-

Find selection

-

The Find Next/Previous Selection commands perform a search for the -current selected text. If nothing is selected, by default the current -word is used instead. This can be customized by the -find_selection_type preference - see Various preferences.

- ---- - - - - - - - - - - - - - - - - -
Valuefind_selection_type behaviour
0Use the current word (default).
1Try the X selection first, then current word.
2Repeat last search.
-
-
-

Find usage

-

Find Usage searches all open files. It is similar to the Find All In -Session option in the Find dialog.

-

If there is a selection, then it is used as the search text; otherwise -the current word is used. The current word is either taken from the -word nearest the edit cursor, or the word underneath the popup menu -click position when the popup menu is used. The search results are -shown in the Messages tab of the Message Window.

-
-

Note

-

You can also use Find Usage for symbol list items from the popup -menu.

-
-
-
-

Find in files

-

Find in Files is a more powerful version of Find Usage that searches -all files in a certain directory using the Grep tool. The Grep tool -must be correctly set in Preferences to the path of the system's Grep -utility. GNU Grep is recommended (see note below).

-./images/find_in_files_dialog.png -

The Search field is initially set to the current word in the editor -(depending on Search preferences).

-

The Files setting allows to choose which files are included in the -search, depending on the mode:

-
-
All
-
Search in all files;
-
Project
-
Use the current project's patterns, see Project properties;
-
Custom
-
Use custom patterns.
-
-

Both project and custom patterns use a glob-style syntax, each -pattern separated by a space. To search all .c and .h files, -use: *.c *.h. -Note that an empty pattern list searches in all files rather -than none.

-

The Directory field is initially set to the current document's directory, -unless this field has already been edited and the current document has -not changed. Otherwise, the current document's directory is prepended to -the drop-down history. This can be disabled - see Search preferences.

-

The Encoding field can be used to define the encoding of the files -to be searched. The entered search text is converted to the chosen encoding -and the search results are converted back to UTF-8.

-

The Extra options field is used to pass any additional arguments to -the grep tool.

-
-

Note

-

The Files setting uses --include= when searching recursively, -Recurse in subfolders uses -r; both are GNU Grep options and may -not work with other Grep implementations.

-
-
-

Filtering out version control files

-

When using the Recurse in subfolders option with a directory that's -under version control, you can set the Extra options field to filter -out version control files.

-

If you have GNU Grep >= 2.5.2 you can use the --exclude-dir -argument to filter out CVS and hidden directories like .svn.

-

Example: --exclude-dir=.svn --exclude-dir=CVS

-

If you have an older Grep, you can try using the --exclude flag -to filter out filenames.

-

SVN Example: --exclude=*.svn-base

-

The --exclude argument only matches the file name part, not the path.

-
-
-
-

Replace

-

The Replace dialog is used for replacing text in one or more open -documents.

-./images/replace_dialog.png -

The Replace dialog has the same options for matching text as the Find -dialog. See the section Matching options.

-

The Use regular expressions option allows regular expressions to -be used in the search string and back references in the replacement -text -- see the entry for '\n' in Regular expressions.

-
-

Replace all

-

To replace several matches, click on the Replace All expander. This -will reveal several options:

-
    -
  • In Document
  • -
  • In Session
  • -
  • In Selection
  • -
-

Replace All In Document will replace all matching text in the -current document. Replace All In Session does the same for all open -documents. Replace All In Selection will replace all matching text -in the current selection of the current document.

-
-
-
-

Go to tag definition

-

If the current word or selection is the name of a tag definition -(e.g. a function name) and the file containing the tag definition is -open, this command will switch to that file and go to the -corresponding line number. The current word is either the word -nearest the edit cursor, or the word underneath the popup menu click -position when the popup menu is used.

-
-

Note

-

If the corresponding tag is on the current line, Geany will first -look for a tag declaration instead, as this is more useful. -Likewise Go to tag declaration will search for a tag definition -first in this case also.

-
-
-
-

Go to tag declaration

-

Like Go to tag definition, but for a forward declaration such as a -C function prototype or extern declaration instead of a function -body.

-
-
-

Go to line

-

Go to a particular line number in the current file.

-
-
-

Regular expressions

-

You can use regular expressions in the Find and Replace dialogs -by selecting the Use regular expressions check box (see Matching -options). The syntax is Perl compatible. Basic syntax is described -in the table below. For full details, see -http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html.

-
-

Note

-
    -
  1. The Use escape sequences dialog option always applies for regular -expressions.
  2. -
  3. Searching backwards with regular expressions is not supported.
  4. -
-
-

In a regular expression, the following characters are interpreted:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.Matches any character.
(This marks the start of a region for tagging a match.
)This marks the end of a tagged region.
\n

Where n is 1 through 9 refers to the first through ninth tagged -region when searching or replacing.

-

Searching for (Wiki)\1 matches WikiWiki.

-

If the search string was Fred([1-9])XXX and the -replace string was Sam\1YYY, when applied to Fred2XXX this -would generate Sam2YYY.

-
\0When replacing, the whole matching text.
\bThis matches a word boundary.
\c

A backslash followed by d, D, s, S, w or W, becomes a -character class (both inside and outside sets []).

-
    -
  • d: decimal digits
  • -
  • D: any char except decimal digits
  • -
  • s: whitespace (space, \t \n \r \f \v)
  • -
  • S: any char except whitespace (see above)
  • -
  • w: alphanumeric & underscore
  • -
  • W: any char except alphanumeric & underscore
  • -
-
\xThis allows you to use a character x that would otherwise have -a special meaning. For example, \[ would be interpreted as [ -and not as the start of a character set. Use \\ for a literal -backslash.
[...]

Matches one of the characters in the set. If the first -character in the set is ^, it matches the characters NOT in -the set, i.e. complements the set. A shorthand S-E (start -dash end) is used to specify a set of characters S up to E, -inclusive.

-

The special characters ] and - have no special -meaning if they appear first in the set. - can also be last -in the set. To include both, put ] first: []A-Z-].

-

Examples:

-
-[]|-]    matches these 3 chars
-[]-|]    matches from ] to | chars
-[a-z]    any lowercase alpha
-[^]-]    any char except - and ]
-[^A-Z]   any char except uppercase alpha
-[a-zA-Z] any alpha
-
-
^This matches the start of a line (unless used inside a set, see -above).
$This matches the end of a line.
*This matches 0 or more times. For example, Sa*m matches Sm, Sam, -Saam, Saaam and so on.
+This matches 1 or more times. For example, Sa+m matches Sam, -Saam, Saaam and so on.
?This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.
-
-

Note

-

This table is adapted from Scintilla and SciTE documentation, -distributed under the License for Scintilla and SciTE.

-
-
-
-
-

View menu

-

The View menu allows various elements of the main window to be shown -or hidden, and also provides various display-related editor options.

-
-

Color schemes menu

-

The Color schemes menu is available under the View->Editor submenu. -It lists various color schemes for editor highlighting styles, -including the default scheme first. Other items are available based -on what color scheme files Geany found at startup.

-

Color scheme files are read from the Configuration file paths under -the colorschemes subdirectory. They should have the extension -.conf. The default color scheme -is read from filetypes.common.

-

The [named_styles] section and [named_colors] section are the -same as for filetypes.common.

-

The [theme_info] section can contain information about the -theme. The name and description keys are read to set the -menu item text and tooltip, respectively. These keys can have -translations, e.g.:

-
-key=Hello
-key[de]=Hallo
-key[fr_FR]=Bonjour
-
-
-
-
-

Tags

-

Tags are information that relates symbols in a program with the -source file location of the declaration and definition.

-

Geany has built-in functionality for generating tag information (aka -"workspace tags") for supported filetypes when you open a file. You -can also have Geany automatically load external tag files (aka "global -tags files") upon startup, or manually using Tools --> Load Tags.

-

Geany uses its own tag file format, similar to what ctags uses -(but is incompatible with ctags). You use Geany to generate global -tags files, as described below.

-
-

Workspace tags

-

Tags for each document are parsed whenever a file is loaded, saved or -modified (see Symbol list update frequency preference in the Editor -Completions preferences). These are shown in the Symbol list in the -Sidebar. These tags are also used for autocompletion of symbols and calltips -for all documents open in the current session that have the same filetype.

-

The Go to Tag commands can be used with all workspace tags. See -Go to tag definition.

-
-
-

Global tags

-

Global tags are used to provide autocompletion of symbols and calltips -without having to open the corresponding source files. This is intended -for library APIs, as the tags file only has to be updated when you upgrade -the library.

-

You can load a custom global tags file in two ways:

-
    -
  • Using the Load Tags command in the Tools menu.
  • -
  • By moving or symlinking tags files to the tags subdirectory of -one of the configuration file paths before starting Geany.
  • -
-

You can either download these files or generate your own. They have -the format:

-
-name.lang_ext.tags
-
-

lang_ext is one of the extensions set for the filetype associated -with the tags. See the section called Filetype extensions for -more information.

-
-

Default global tags files

-

For some languages, a list of global tags is loaded when the -corresponding filetype is first used. Currently these are for:

-
    -
  • C
  • -
  • Pascal
  • -
  • PHP
  • -
  • HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
  • -
  • LaTeX
  • -
  • Python
  • -
-
-
-

Global tags file format

-

Global tags files can have three different formats:

-
    -
  • Tagmanager format
  • -
  • Pipe-separated format
  • -
  • CTags format
  • -
-

The first line of global tags files should be a comment, introduced -by # followed by a space and a string like format=pipe, -format=ctags or format=tagmanager respectively, these are -case-sensitive. This helps Geany to read the file properly. If this -line is missing, Geany tries to auto-detect the used format but this -might fail.

-

The Tagmanager format is a bit more complex and is used for files -created by the geany -g command. There is one tag per line. -Different tag attributes like the return value or the argument list -are separated with different characters indicating the type of the -following argument. This is the more complete and recommended tag -format.

-
-
Pipe-separated format
-

The Pipe-separated format is easier to read and write. -There is one tag per line and different tag attributes are separated -by the pipe character (|). A line looks like:

-
-basename|string|(string path [, string suffix])|
-
-
-
The first field is the tag name (usually a function name).
-
The second field is the type of the return value.
-
The third field is the argument list for this tag.
-
The fourth field is the description for this tag but -currently unused and should be left empty.
-
-

Except for the first field (tag name), all other field can be left -empty but the pipe separator must appear for them.

-

You can easily write your own global tag files using this format. -Just save them in your tags directory, as described earlier in the -section Global tags.

-
-
-
CTags format
-

This is the format that ctags generates, and that is used by Vim. -This format is compatible with the format historically used by Vi.

-

The format is described at http://ctags.sourceforge.net/FORMAT, but -for the full list of existing extensions please refer to ctags. -However, note that Geany may actually only honor a subset of the -existing extensions.

-
-
-
-

Generating a global tags file

-

You can generate your own global tags files by parsing a list of -source files. The command is:

-
-geany -g [-P] <Tag File> <File list>
-
-
    -
  • Tag File filename should be in the format described earlier -- -see the section called Global tags.
  • -
  • File list is a list of filenames, each with a full path (unless -you are generating C/C++ tags and have set the CFLAGS environment -variable appropriately).
  • -
  • -P or --no-preprocessing disables using the C pre-processor -to process #include directives for C/C++ source files. Use this -option if you want to specify each source file on the command-line -instead of using a 'master' header file. Also can be useful if you -don't want to specify the CFLAGS environment variable.
  • -
-

Example for the wxD library for the D programming language:

-
-geany -g wxd.d.tags /home/username/wxd/wx/*.d
-
-
-
Generating C/C++ tag files
-

You may need to first setup the C ignore.tags file.

-

For C/C++ tag files gcc is required by default, so that header files -can be preprocessed to include any other headers they depend upon. If -you do not want this, use the -P option described above.

-

For preprocessing, the environment variable CFLAGS should be set with -appropriate -I/path include paths. The following example works with -the bash shell, generating tags for the GnomeUI library:

-
-CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
-/usr/include/libgnomeui-2.0/gnome.h
-
-

You can adapt this command to use CFLAGS and header files appropriate -for whichever libraries you want.

-
-
-
Generating tag files on Windows
-

This works basically the same as on other platforms:

-
-"c:\program files\geany\bin\geany" -g c:\mytags.php.tags c:\code\somefile.php
-
-
-
-
-
-

C ignore.tags

-

You can ignore certain tags for C-based languages if they would lead -to wrong parsing of the code. Use the Tools->Configuration -Files->ignore.tags menu item to open the user ignore.tags file. -See also Configuration file paths.

-

List all tag names you want to ignore in this file, separated by spaces -and/or newlines.

-

Example:

-
-G_GNUC_NULL_TERMINATED
-G_GNUC_PRINTF
-G_GNUC_WARN_UNUSED_RESULT
-
-

This will parse code like:

-

gchar **utils_strv_new(const gchar *first, ...) -G_GNUC_NULL_TERMINATED;

-

More detailed information about ignore tags usage from the Exuberant Ctags -manual page:

-
-Specifies a list of identifiers which are to be specially handled -while parsing C and C++ source files. This option is specifically -provided to handle special cases arising through the use of -pre-processor macros. When the identifiers listed are simple identifiers, -these identifiers will be ignored during parsing of the source files. -If an identifier is suffixed with a '+' character, ctags will also -ignore any parenthesis-enclosed argument list which may immediately -follow the identifier in the source files. -If two identifiers are separated with the '=' character, the first -identifiers is replaced by the second identifiers for parsing purposes.
-

For even more detailed information please read the manual page of -Exuberant Ctags.

-

Geany extends Ctags with a '*' character suffix - this means use -prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc. -Note that prefix match items should be put after other items to ensure -that items like G_GNUC_PRINTF+ get parsed correctly.

-
-
-
-

Preferences

-

You may adjust Geany's settings using the Edit --> Preferences -dialog. Any changes you make there can be applied by hitting either -the Apply or the OK button. These settings will persist between Geany -sessions. Note that most settings here have descriptive popup bubble -help -- just hover the mouse over the item in question to get help -on it.

-

You may also adjust some View settings (under the View menu) that -persist between Geany sessions. The settings under the Document menu, -however, are only for the current document and revert to defaults -when restarting Geany.

-
-

Note

-

In the paragraphs that follow, the text describing a dialog tab -comes after the screenshot of that tab.

-
-
-

General Startup preferences

-./images/pref_dialog_gen_startup.png -
-

Startup

-
-
Load files from the last session
-
On startup, load the same files you had open the last time you -used Geany.
-
Load virtual terminal support
-
Load the library for running a terminal in the message window area.
-
Enable plugin support
-
Allow plugins to be used in Geany.
-
-
-
-

Shutdown

-
-
Save window position and geometry
-
Save the current position and size of the main window so next time -you open Geany it's in the same location.
-
Confirm Exit
-
Have a dialog pop up to confirm that you really want to quit Geany.
-
-
-
-

Paths

-
-
Startup path
-
Path to start in when opening or saving files. -It must be an absolute path.
-
Project files
-
Path to start in when opening project files.
-
Extra plugin path
-
By default Geany looks in the system installation and the user -configuration - see Plugins. In addition the path entered here will be -searched. -Usually you do not need to set an additional path to search for -plugins. It might be useful when Geany is installed on a multi-user machine -and additional plugins are available in a common location for all users. -Leave blank to not set an additional lookup path.
-
-
-
-
-

General Miscellaneous preferences

-./images/pref_dialog_gen_misc.png -
-

Miscellaneous

-
-
Beep on errors when compilation has finished
-
Have the computer make a beeping sound when compilation of your program -has completed or any errors occurred.
-
Switch status message list at new message
-
Switch to the status message tab (in the notebook window at the bottom) -once a new status message arrives.
-
Suppress status messages in the status bar
-

Remove all messages from the status bar. The messages are still displayed -in the status messages window.

-
-

Tip

-

Another option is to use the Switch to Editor keybinding - it -reshows the document statistics on the status bar. See Focus -keybindings.

-
-
-
Use Windows File Open/Save dialogs
-
Defines whether to use the native Windows File Open/Save dialogs or -whether to use the GTK default dialogs.
-
Auto-focus widgets (focus follows mouse)
-
Give the focus automatically to widgets below the mouse cursor. -This works for the main editor widget, the scribble, the toolbar search field -goto line fields and the VTE.
-
-
- -
-

Projects

-
-
Use project-based session files
-
Save your current session when closing projects. You will be able to -resume different project sessions, automatically opening the files -you had open previously.
-
Store project file inside the project base directory
-
When creating new projects, the default path for the project file contains -the project base path. Without this option enabled, the default project file -path is one level above the project base path. -In either case, you can easily set the final project file path in the -New Project dialog. This option provides the more common -defaults automatically for convenience.
-
-
-
-
-

Interface preferences

-./images/pref_dialog_interface_interface.png - -
-

Fonts

-
-
Editor
-
Change the font used to display documents.
-
Symbol list
-
Change the font used for the Symbols sidebar tab.
-
Message window
-
Change the font used for the message window area.
-
-
-
-

Miscellaneous

-
-
Show status bar
-
Show the status bar at the bottom of the main window. It gives information about -the file you are editing like the line and column you are on, whether any -modifications were done, the file encoding, the filetype and other information.
-
-
-
-
-

Interface Notebook tab preferences

-./images/pref_dialog_interface_notebook.png -
-

Editor tabs

-
-
Show editor tabs
-
Show a notebook tab for all documents so you can switch between them -using the mouse (instead of using the Documents window).
-
Show close buttons
-
Make each tab show a close button so you can easily close open -documents.
-
Placement of new file tabs
-
Whether to create a document with its notebook tab to the left or -right of all existing tabs.
-
Next to current
-
Whether to place file tabs next to the current tab -rather than at the edges of the notebook.
-
Double-clicking hides all additional widgets
-
Whether to call the View->Toggle All Additional Widgets command -when double-clicking on a notebook tab.
-
-
-
-

Tab positions

-
-
Editor
-
Set the positioning of the editor's notebook tabs to the right, -left, top, or bottom of the editing window.
-
Sidebar
-
Set the positioning of the sidebar's notebook tabs to the right, -left, top, or bottom of the sidebar window.
-
Message window
-
Set the positioning of the message window's notebook tabs to the -right, left, top, or bottom of the message window.
-
-
-
-
-

Interface Toolbar preferences

-

Affects the main toolbar underneath the menu bar.

-./images/pref_dialog_interface_toolbar.png -
-

Toolbar

-
-
Show Toolbar
-
Whether to show the toolbar.
-
Append Toolbar to the Menu
-
Allows to append the toolbar to the main menu bar instead of placing it below. -This is useful to save vertical space.
-
Customize Toolbar
-
See Customizing the toolbar.
-
-
-
-

Appearance

-
-
Icon Style
-
Select the toolbar icon style to use - either icons and text, just -icons or just text. -The choice System default uses whatever icon style is set by GTK.
-
Icon size
-
Select the size of the icons you see (large, small or very small). -The choice System default uses whatever icon size is set by GTK.
-
-
-
-
-

Editor Features preferences

-./images/pref_dialog_edit_features.png -
-

Features

-
-
Line wrapping
-
Show long lines wrapped around to new display lines.
-
-
-
"Smart" home key
-
Whether to move the cursor to the first non-whitespace character -on the line when you hit the home key on your keyboard. Pressing it -again will go to the very start of the line.
-
Disable Drag and Drop
-
Do not allow the dragging and dropping of selected text in documents.
-
Code folding
-
Allow groups of lines in a document to be collapsed for easier -navigation/editing.
-
Fold/Unfold all children of a fold point
-
Whether to fold/unfold all child fold points when a parent line -is folded.
-
Use indicators to show compile errors
-
Underline lines with compile errors using red squiggles to indicate -them in the editor area.
-
Newline strips trailing spaces
-
Remove any whitespace at the end of the line when you hit the -Enter/Return key. See also Strip trailing spaces. Note -auto indentation is calculated before stripping, so although this -setting will clear a blank line, it will not set the next line -indentation back to zero.
-
Line breaking column
-
The editor column number to insert a newline at when Line Breaking -is enabled for the current document.
-
Comment toggle marker
-
A string which is added when toggling a line comment in a source file. -It is used to mark the comment as toggled.
-
-
-
-
-

Editor Indentation preferences

-./images/pref_dialog_edit_indentation.png -
-

Indentation group

-

See Indentation for more information.

-
-
Width
-
The width of a single indent size in spaces. By default the indent -size is equivalent to 4 spaces.
-
Detect width from file
-
Try to detect and set the indent width based on file content, when -a file is opened.
-
Type
-

When Geany inserts indentation, whether to use:

-
    -
  • Just Tabs
  • -
  • Just Spaces
  • -
  • Tabs and Spaces, depending on how much indentation is on a line
  • -
-

The Tabs and Spaces indent type is also known as Soft tab -support in some other editors.

-
-
Detect type from file
-
Try to detect and set the indent type based on file content, when -a file is opened.
-
Auto-indent mode
-

The type of auto-indentation you wish to use after pressing Enter, -if any.

-
-
Basic
-
Just add the indentation of the previous line.
-
Current chars
-
Add indentation based on the current filetype and any characters at -the end of the line such as {, } for C, : for Python.
-
Match braces
-
Like Current chars but for C-like languages, make a closing -} brace line up with the matching opening brace.
-
-
-
Tab key indents
-

If set, pressing tab will indent the current line or selection, and -unindent when pressing Shift-tab. Otherwise, the tab key will -insert a tab character into the document (which can be different -from indentation, depending on the indent type).

-
-

Note

-

There are also separate configurable keybindings for indent & -unindent, but this preference allows the tab key to have different -meanings in different contexts - e.g. for snippet completion.

-
-
-
-
-
-
-

Editor Completions preferences

-./images/pref_dialog_edit_completions.png -
-

Completions

-
-
Snippet Completion
-
Whether to replace special keywords after typing Tab into a -pre-defined text snippet. -See User-definable snippets.
-
XML/HTML tag auto-closing
-
When you open an XML/HTML tag automatically generate its -completion tag.
-
Automatic continuation multi-line comments
-

Continue automatically multi-line comments in languages like C, C++ -and Java when a new line is entered inside such a comment. -With this option enabled, Geany will insert a * on every new line -inside a multi-line comment, for example when you press return in the -following C code:

-
-/*
- * This is a C multi-line comment, press <Return>
-
-

then Geany would insert:

-
-*
-
-

on the next line with the correct indentation based on the previous line, -as long as the multi-line is not closed by */.

-
-
Autocomplete symbols
-
When you start to type a symbol name, look for the full string to -allow it to be completed for you.
-
Autocomplete all words in document
-
When you start to type a word, Geany will search the whole document for -words starting with the typed part to complete it, assuming there -are no tag names to show.
-
Drop rest of word on completion
-
Remove any word part to the right of the cursor when choosing a -completion list item.
-
Characters to type for autocompletion
-
Number of characters of a word to type before autocompletion is -displayed.
-
Completion list height
-
The number of rows to display for the autocompletion window.
-
Max. symbol name suggestions
-
The maximum number of items in the autocompletion list.
-
Symbol list update frequency
-

The minimum delay (in milliseconds) between two symbol list updates.

-

This option determines how frequently the tag list is updated for the -current document. The smaller the delay, the more up-to-date the symbol -list (and then the completions); but rebuilding the symbol list has a -cost in performance, especially with large files.

-

The default value is 250ms, which means the symbol list will be updated -at most four times per second, even if the document changes continuously.

-

A value of 0 disables automatic updates, so the symbol list will only be -updated upon document saving.

-
-
-
-
-

Auto-close quotes and brackets

-

Geany can automatically insert a closing bracket and quote characters when -you open them. For instance, you type a ( and Geany will automatically -insert ). With the following options, you can define for which -characters this should work.

-
-
Parenthesis ( )
-
Auto-close parenthesis when typing an opening one
-
Curly brackets { }
-
Auto-close curly brackets (braces) when typing an opening one
-
Square brackets [ ]
-
Auto-close square brackets when typing an opening one
-
Single quotes ' '
-
Auto-close single quotes when typing an opening one
-
Double quotes " "
-
Auto-close double quotes when typing an opening one
-
-
-
-
-

Editor Display preferences

-

This is for visual elements displayed in the editor window.

-./images/pref_dialog_edit_display.png -
-

Display

-
-
Invert syntax highlighting colors
-
Invert all colors, by default this makes white text on a black -background.
-
Show indendation guides
-
Show vertical lines to help show how much leading indentation there -is on each line.
-
Show whitespaces
-
Mark all tabs with an arrow "-->" symbol and spaces with dots to -show which kinds of whitespace are used.
-
Show line endings
-
Display a symbol everywhere that a carriage return or line feed -is present.
-
Show line numbers
-
Show or hide the Line Number margin.
-
Show markers margin
-
Show or hide the small margin right of the line numbers, which is used -to mark lines.
-
Stop scrolling at last line
-
When enabled Geany stops scrolling when at the last line of the document. -Otherwise you can scroll one more page even if there are no real lines.
-
-
-
-

Long line marker

-

The long line marker helps to indicate overly-long lines, or as a hint -to the user for when to break the line.

-
-
Type
-
-
Line
-
Show a thin vertical line in the editor window at the given column -position.
-
Background
-
Change the background color of characters after the given column -position to the color set below. (This is recommended over the -Line setting if you use proportional fonts).
-
Disabled
-
Don't mark long lines at all.
-
-
-
Long line marker
-
Set this value to a value greater than zero to specify the column -where it should appear.
-
Long line marker color
-
Set the color of the long line marker.
-
-
-
-

Virtual spaces

-

Virtual space is space beyond the end of each line. -The cursor may be moved into virtual space but no real space will be -added to the document until there is some text typed or some other -text insertion command is used.

-
-
Disabled
-
Do not show virtual spaces
-
Only for rectangular selections
-
Only show virtual spaces beyond the end of lines when drawing a rectangular selection
-
Always
-
Always show virtual spaces beyond the end of lines
-
-
-
-
-

Files preferences

-./images/pref_dialog_files.png -
-

New files

-
-
Open new documents from the command-line
-
Whether to create new documents when passing filenames that don't -exist from the command-line.
-
Default encoding (new files)
-
The type of file encoding you wish to use when creating files.
-
Used fixed encoding when opening files
-
Assume all files you are opening are using the type of encoding specified below.
-
Default encoding (existing files)
-
Opens all files with the specified encoding instead of auto-detecting it. -Use this option when it's not possible for Geany to detect the exact encoding.
-
Default end of line characters
-
The end of line characters to which should be used for new files. -On Windows systems, you generally want to use CR/LF which are the common -characters to mark line breaks. -On Unix-like systems, LF is default and CR is used on MAC systems.
-
-
-
-

Saving files

-

Perform formatting operations when a document is saved. These -can each be undone with the Undo command.

-
-
Ensure newline at file end
-
Add a newline at the end of the document if one is missing.
-
Ensure consistent line endings
-
Ensures that newline characters always get converted before -saving, avoiding mixed line endings in the same file.
-
-
-
Strip trailing spaces
-

Remove any whitespace at the end of each document line.

-
-

Note

-

This does not apply to Diff documents, e.g. patch files.

-
-
-
Replace tabs with space
-

Replace all tabs in the document with the equivalent number of spaces.

-
-

Note

-

It is better to use spaces to indent than use this preference - see -Indentation.

-
-
-
-
-
-

Miscellaneous

-
-
Recent files list length
-
The number of files to remember in the recently used files list.
-
Disk check timeout
-

The number of seconds to periodically check the current document's -file on disk in case it has changed. Setting it to 0 will disable -this feature.

-
-

Note

-

These checks are only performed on local files. Remote files are -not checked for changes due to performance issues -(remote files are files in ~/.gvfs/).

-
-
-
-
-
-
-

Tools preferences

-./images/pref_dialog_tools.png -
-

Tool paths

-
-
Terminal
-
The command to execute a script in a terminal. Occurrences of %c -in the command are substituted with the run script name, see -Terminal emulators.
-
Browser
-
The location of your web browser executable.
-
Grep
-
The location of the grep executable.
-
-
-

Note

-

For Windows users: at the time of writing it is recommended to use -the grep.exe from the UnxUtils project -(http://sourceforge.net/projects/unxutils). The grep.exe from the -Mingw project for instance might not work with Geany at the moment.

-
-
-
-

Commands

-
-
Context action
-
Set this to a command to execute on the current word. -You can use the "%s" wildcard to pass the current word below the cursor -to the specified command.
-
-
-
-
-

Template preferences

-

This data is used as meta data for various template text to insert into -a document, such as the file header. You only need to set fields that -you want to use in your template files.

-./images/pref_dialog_templ.png -
-

Template data

-
-
Developer
-
The name of the developer who will be creating files.
-
Initials
-
The initials of the developer.
-
Mail address
-

The email address of the developer.

-
-

Note

-

You may wish to add anti-spam markup, e.g. name<at>site<dot>ext.

-
-
-
Company
-
The company the developer is working for.
-
Initial version
-
The initial version of files you will be creating.
-
Year
-
Specify a format for the the {year} wildcard. You can use any conversion specifiers -which can be used with the ANSI C strftime function. For details please see -http://man.cx/strftime.
-
Date
-
Specify a format for the the {date} wildcard. You can use any conversion specifiers -which can be used with the ANSI C strftime function. For details please see -http://man.cx/strftime.
-
Date & Time
-
Specify a format for the the {datetime} wildcard. You can use any conversion specifiers -which can be used with the ANSI C strftime function. For details please see -http://man.cx/strftime.
-
-
-
-
-

Keybinding preferences

-./images/pref_dialog_keys.png -

There are some commands listed in the keybinding dialog that are not, by default, -bound to a key combination, and may not be available as a menu item.

-
-

Note

-

For more information see the section Keybindings.

-
-
-
-

Printing preferences

-./images/pref_dialog_printing.png -
-
Use external command for printing
-
Use a system command to print your file out.
-
Use native GTK printing
-
Let the GTK GUI toolkit handle your print request.
-
Print line numbers
-
Print the line numbers on the left of your paper.
-
Print page number
-
Print the page number on the bottom right of your paper.
-
Print page header
-
Print a header on every page that is sent to the printer.
-
Use base name of the printed file
-
Don't use the entire path for the header, only the filename.
-
Date format
-
How the date should be printed. You can use the same format -specifiers as in the ANSI C function strftime(). For details please -see http://man.cx/strftime.
-
-
-
-

Various preferences

-./images/pref_dialog_various.png -

Rarely used preferences, explained in the table below. A few of them require -restart to take effect, and a few other will only affect newly opened or created -documents before restart.

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyDescriptionDefaultApplies
Editor related   
use_gtk_word_boundariesWhether to look for the end of a word -when using word-boundary related -Scintilla commands (see Scintilla -keyboard commands).trueto new -documents
brace_match_ltgtWhether to highlight <, > angle brackets.falseimmediately
complete_snippets_whilst_editingWhether to allow completion of snippets -when editing an existing line (i.e. there -is some text after the current cursor -position on the line). Only used when the -keybinding Complete snippet is set to -Space.falseimmediately
show_editor_scrollbarsWhether to display scrollbars. If set to -false, the horizontal and vertical -scrollbars are hidden completely.trueimmediately
indent_hard_tab_widthThe size of a tab character. Don't change -it unless you really need to; use the -indentation settings instead.8immediately
Interface related   
show_symbol_list_expandersWhether to show or hide the small -expander icons on the symbol list -treeview.trueto new -documents
allow_always_saveWhether files can be saved always, even -if they don't have any changes. -By default, the Save button and menu -item are disabled when a file is -unchanged. When setting this option to -true, the Save button and menu item are -always active and files can be saved.falseimmediately
compiler_tab_autoscrollWhether to automatically scroll to the -last line of the output in the Compiler -tab.trueimmediately
statusbar_templateThe status bar statistics line format. -(See Statusbar Templates for details).See below.immediately
new_document_after_closeWhether to open a new document after all -documents have been closed.falseimmediately
msgwin_status_visibleWhether to show the Status tab in the -Messages Windowtrueimmediately
msgwin_compiler_visibleWhether to show the Compiler tab in the -Messages Windowtrueimmediately
msgwin_messages_visibleWhether to show the Messages tab in the -Messages Windowtrueimmediately
msgwin_scribble_visibleWhether to show the Scribble tab in the -Messages Windowtrueimmediately
VTE related   
emulationTerminal emulation mode. Only change this -if you have VTE termcap files other than -vte/termcap/xterm.xtermimmediately
send_selection_unsafeBy default, Geany strips any trailing -newline characters from the current -selection before sending it to the terminal -to not execute arbitrary code. This is -mainly a security feature. -If, for whatever reasons, you really want -it to be executed directly, set this option -to true.falseimmediately
send_cmd_prefixString with which prefix the commands sent -to the shell. This may be used to tell -some shells (BASH with HISTCONTROL set -to ignorespace, ZSH with -HIST_IGNORE_SPACE enabled, etc.) from -putting these commands in their history by -setting this to a space. Note that leading -spaces must be escaped using s in the -configuration file.Emptyimmediately
File related   
use_atomic_file_savingDefines the mode how Geany saves files to -disk. If disabled, Geany directly writes -the content of the document to disk. This -might cause loss of data when there is -no more free space on disk to save the -file. When set to true, Geany first saves -the contents into a temporary file and if -this succeeded, the temporary file is -moved to the real file to save. -This gives better error checking in case of -no more free disk space. But it also -destroys hard links of the original file -and its permissions (e.g. executable flags -are reset). Use this with care as it can -break things seriously. -The better approach would be to ensure your -disk won't run out of free space.falseimmediately
use_gio_unsafe_file_savingWhether to use GIO as the unsafe file -saving backend. It is better on most -situations but is known not to work -correctly on some complex setups.trueimmediately
gio_unsafe_save_backupMake a backup when using GIO unsafe file -saving. Backup is named filename~.falseimmediately
Filetype related   
extract_filetype_regexRegex to extract filetype name from file -via capture group one.See below.immediately
Search related   
find_selection_typeSee Find selection.0immediately
Build Menu related   
number_ft_menu_itemsThe maximum number of menu items in the -filetype section of the Build menu.2on restart
number_non_ft_menu_itemsThe maximum number of menu items in the -independent section of the Build menu.3on restart
number_exec_menu_itemsThe maximum number of menu items in the -execute section of the Build menu.2on restart
-

The extract_filetype_regex has the default value GEANY_DEFAULT_FILETYPE_REGEX.

-
-

Statusbar Templates

-

The default statusbar template is (note \t = tab):

-

line: %l / %L\t col: %c\t sel: %s\t %w      %t      %mmode: %M      encoding: %e      filetype: %f      scope: %S

-

Settings the preference to an empty string will also cause Geany to use this -internal default.

-

The following format characters are available for the statusbar template:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PlaceholderDescription
%lThe current line number starting at 1
%LThe total number of lines
%cThe current column number starting at 0
%CThe current column number starting at 1
%sThe number of selected characters or if only whole lines -selected, the number of selected lines.
%wShows RO when the document is in read-only mode, -otherwise shows whether the editor is in overtype (OVR) -or insert (INS) mode.
%tShows the indentation mode, either tabs (TAB), -spaces (SP) or both (T/S).
%mShows whether the document is modified (MOD) or nothing.
%MThe name of the document's line-endings (ex. Unix (LF))
%eThe name of the document's encoding (ex. UTF-8).
%fThe filetype of the document (ex. None, Python, C, etc).
%SThe name of the scope where the caret is located.
%pThe caret position in the entire document starting at 0.
%rShows whether the document is read-only (RO) or nothing.
%YThe Scintilla style number at the caret position. This is -useful if you're debugging color schemes or related code.
-
-
-
-

Terminal (VTE) preferences

-

See also: Virtual terminal emulator widget (VTE).

-./images/pref_dialog_vte.png -
-

Terminal widget

-
-
Terminal font
-
Select the font that will be used in the terminal emulation control.
-
Foreground color
-
Select the font color.
-
Background color
-
Select the background color of the terminal.
-
Background image
-
Select the background image to show behind the terminal's text.
-
Scrollback lines
-
The number of lines buffered so that you can scroll though the history.
-
Shell
-
The location of the shell on your system.
-
Scroll on keystroke
-
Scroll the terminal to the prompt line when pressing a key.
-
Scroll on output
-
Scroll the output down.
-
Cursor blinks
-
Let the terminal cursor blink.
-
Override Geany keybindings
-
Allow the VTE to receive keyboard shortcuts (apart from focus commands).
-
Disable menu shortcut key (F10 by default)
-
Disable the menu shortcut when you are in the virtual terminal.
-
Follow path of the current file
-
Make the path of the terminal change according to the path of the -current file.
-
Execute programs in VTE
-
Execute programs in the virtual terminal instead of using the external -terminal tool. Note that if you run multiple execute commands at once -the output may become mixed together in the VTE.
-
Don't use run script
-
Don't use the simple run script which is usually used to display -the exit status of the executed program. -This can be useful if you already have a program running in the VTE -like a Python console (e.g. ipython). Use this with care.
-
-
-
-
-
-

Project management

-

Project management is optional in Geany. Currently it can be used for:

-
    -
  • Storing and opening session files on a project basis.
  • -
  • Overriding default settings with project equivalents.
  • -
  • Configuring the Build menu on a project basis.
  • -
-

A list of session files can be stored and opened with the project -when the Use project-based session files preference is enabled, -in the Project group of the Preferences dialog.

-

As long as a project is open, the Build menu will use -the items defined in project's settings, instead of the defaults. -See Build Menu Configuration for information on configuring the menu.

-

The current project's settings are saved when it is closed, or when -Geany is shutdown. When restarting Geany, the previously opened project -file that was in use at the end of the last session will be reopened.

-

The project menu items are detailed below.

-
-

New project

-

To create a new project, fill in the Name field. By default this -will setup a new project file ~/projects/name.geany. Usually it's -best to store all your project files in the same directory (they are -independent of any source directory trees).

-

The Base path text field is setup to use ~/projects/name. This -can safely be set to any existing path -- it will not touch the file -structure contained in it.

-
-
-

Project properties

-

You can set an optional description for the project. Currently it's -only used for a template wildcard - see Template wildcards.

-

The Base path field is used as the directory to run the Build menu commands. -The specified path can be an absolute path or it is considered to be -relative to the project's file name.

-

The File patterns field allows to specify a list of file patterns for the -project, which can be used in the Find in files dialog.

-

The Indentation tab allows you to override the default -Indentation settings.

-
-
-

Open project

-

The Open command displays a standard file chooser, starting in -~/projects. Choose a project file named with the .geany -extension.

-

When project session support is enabled, Geany will close the currently -open files and open the session files associated with the project.

-
-
-

Close project

-

Project file settings are saved when the project is closed.

-

When project session support is enabled, Geany will close the project -session files and open any previously closed default session files.

-
-
-
-

Build menu

-

After editing code with Geany, the next step is to compile, link, build, -interpret, run etc. As Geany supports many languages each with a different -approach to such operations, and as there are also many language independent -software building systems, Geany does not have a built-in build system, nor -does it limit which system you can use. Instead the build menu provides -a configurable and flexible means of running any external commands to -execute your preferred build system.

-

This section provides a description of the default configuration of the -build menu and then covers how to configure it, and where the defaults fit in.

-

Running the commands from within Geany has two benefits:

-
    -
  • The current file is automatically saved before the command is run.
  • -
  • The output is captured in the Compiler notebook tab and parsed for -warnings or errors.
  • -
-

Warnings and errors that can be parsed for line numbers will be shown in -red in the Compiler tab and you can click on them to switch to the relevant -source file (or open it) and mark the line number. Also lines with -warnings or errors are marked in the source, see Indicators below.

-
-

Tip

-

If Geany's default error message parsing does not parse errors for -the tool you're using, you can set a custom regex in the Build Commands -Dialog, see Build Menu Configuration.

-
-
-

Indicators

-

Indicators are red squiggly underlines which are used to highlight -errors which occurred while compiling the current file. So you can -easily see where your code failed to compile. You can remove them by -selecting Remove Error Indicators in the Document menu.

-

If you do not like this feature, you can disable it - see Editor Features -preferences.

-
-
-

Default build menu items

-

Depending on the current file's filetype, the default Build menu will contain -the following items:

-
    -
  • Compile
  • -
  • Build
  • -
  • Make All
  • -
  • Make Custom Target
  • -
  • Make Object
  • -
  • Next Error
  • -
  • Previous Error
  • -
  • Execute
  • -
  • Set Build Menu Commands
  • -
-
-

Compile

-

The Compile command has different uses for different kinds of files.

-

For compilable languages such as C and C++, the Compile command is -set up to compile the current source file into a binary object file.

-

Java source files will be compiled to class file bytecode.

-

Interpreted languages such as Perl, Python, Ruby will compile to -bytecode if the language supports it, or will run a syntax check, -or if that is not available will run the file in its language interpreter.

-
-
-

Build

-

For compilable languages such as C and C++, the Build command will link -the current source file's equivalent object file into an executable. If -the object file does not exist, the source will be compiled and linked -in one step, producing just the executable binary.

-

Interpreted languages do not use the Build command.

-
-

Note

-

If you need complex settings for your build system, or several -different settings, then writing a Makefile and using the Make -commands is recommended; this will also make it easier for users to -build your software.

-
-
-
-

Make

-

This runs "make" in the same directory as the -current file.

-
-
-

Make custom target

-

This is similar to running 'Make' but you will be prompted for -the make target name to be passed to the Make tool. For example, -typing 'clean' in the dialog prompt will run "make clean".

-
-
-

Make object

-

Make object will run "make current_file.o" in the same directory as -the current file, using the filename for 'current_file'. It is useful -for building just the current file without building the whole project.

-
-
-

Next error

-

The next error item will move to the next detected error in the file.

-
-
-

Previous error

-

The previous error item will move to the previous detected error in the file.

-
-
-

Execute

-

Execute will run the corresponding executable file, shell script or -interpreted script in a terminal window. The command set in the -"Set Build Commands" dialog is run in a script to ensure the terminal -stays open after execution completes. Note: see Terminal emulators -below for the command format. Alternatively the built-in VTE can be used -if it is available - see Virtual terminal emulator widget (VTE).

-

After your program or script has finished executing, the run script will -prompt you to press the return key. This allows you to review any text -output from the program before the terminal window is closed.

-
-

Note

-

The execute command output is not parsed for errors.

-
-
-
-

Stopping running processes

-

When there is a running program, the Execute menu item in the menu and -the Run button in the toolbar -each become a stop button so you can stop the current running program (and -any child processes). This works by sending the SIGQUIT signal to the process.

-

Depending on the process you started it is possible that the process -cannot be stopped. For example this can happen when the process creates -more than one child process.

-
-
Terminal emulators
-

The Terminal field of the tools preferences tab requires a command to -execute the terminal program and to pass it the name of the Geany run -script that it should execute in a Bourne compatible shell (eg /bin/sh). -The marker "%c" is substituted with the name of the Geany run script, -which is created in the working directory set in the Build commands -dialog, see Build menu commands dialog for details.

-

As an example the default (Linux) command is:

-
-xterm -e "/bin/sh %c"
-
-
-
-
-

Set build commands

-

By default Compile, Build and Execute are fairly basic commands. You -may wish to customise them using Set Build Commands.

-

E.g. for C you can add any include paths and compile flags for the -compiler, any library names and paths for the linker, and any -arguments you want to use when running Execute.

-
-
-
-

Build menu configuration

-

The build menu has considerable flexibility and configurability, allowing -both menu labels the commands they execute and the directory they execute -in to be configured.

-

For example, if you change one of the default make commands to run say 'waf' -you can also change the label to match.

-

These settings are saved automatically when Geany is shut down.

-

The build menu is divided into four groups of items each with different -behaviors:

-
    -
  • Filetype build commands - are configurable and depend on the filetype of the -current document; they capture output in the compiler tab and parse it for -errors.
  • -
  • Independent build commands - are configurable and mostly don't depend on the -filetype of the current document; they also capture output in the -compiler tab and parse it for errors.
  • -
  • Execute commands - are configurable and intended for executing your -program or other long running programs. The output is not parsed for errors -and is directed to the terminal command selected in preferences.
  • -
  • Fixed commands - these perform built-in actions:
      -
    • Go to the next error.
    • -
    • Go to the previous error.
    • -
    • Show the build menu commands dialog.
    • -
    -
  • -
-

The maximum numbers of items in each of the configurable groups can be -configured in the Various preferences. Even though the maximum number of -items may have been increased, only those menu items that have values -configured are shown in the menu.

-

The groups of menu items obtain their configuration from four potential -sources. The highest priority source that has the menu item defined will -be used. The sources in decreasing priority are:

-
    -
  • A project file if open
  • -
  • The user preferences
  • -
  • The system filetype definitions
  • -
  • The defaults
  • -
-

The detailed relationships between sources and the configurable menu item groups -is shown in the following table.

- ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GroupProject FilePreferencesSystem FiletypeDefaults
Filetype

Loads From: project -file

-

Saves To: project -file

-

Loads From: -filetypes.xxx file in -~/.config/geany/filedefs

-

Saves to: as above, -creating if needed.

-

Loads From: -filetypes.xxx in -Geany install

-

Saves to: as user -preferences left.

-
None
Filetype -Independent

Loads From: project -file

-

Saves To: project -file

-

Loads From: -geany.conf file in -~/.config/geany

-

Saves to: as above, -creating if needed.

-

Loads From: -filetypes.xxx in -Geany install

-

Saves to: as user -preferences left.

-
-
1:
-
Label: _Make -Command: make
-
2:
-
Label: Make Custom _Target -Command: make
-
3:
-
Label: Make _Object -Command: make %e.o
-
-
Execute

Loads From: project -file or else -filetype defined in -project file

-

Saves To: -project file

-

Loads From: -geany.conf file in -~/.config/geany or else -filetypes.xxx file in -~/.config/geany/filedefs

-

Saves To: -filetypes.xxx file in -~/.config/geany/filedefs

-

Loads From: -filetypes.xxx in -Geany install

-

Saves To: as user -preferences left.

-
Label: _Execute -Command: ./%e
-

The following notes on the table reference cells by coordinate as (group,source):

-
    -
  • General - for filetypes.xxx substitute the appropriate extension for -the filetype of the current document for xxx - see filenames.
  • -
  • System Filetypes - Labels loaded from these sources are locale sensitive -and can contain translations.
  • -
  • (Filetype, Project File) and (Filetype, Preferences) - preferences use a full -filetype file so that users can configure all other filetype preferences -as well. Projects can only configure menu items per filetype. Saving -in the project file means that there is only one file per project not -a whole directory.
  • -
  • (Filetype-Independent, System Filetype) - although conceptually strange, defining -filetype-independent commands in a filetype file, this provides the ability to -define filetype dependent default menu items.
  • -
  • (Execute, Project File) and (Execute, Preferences) - the project independent -execute and preferences independent execute commands can only be set by hand -editing the appropriate file, see Preferences file format and Project file -format.
  • -
-
-
-

Build menu commands dialog

-

Most of the configuration of the build menu is done through the Build Menu -Commands Dialog. You edit the configuration sourced from preferences in the -dialog opened from the Build->Build Menu Commands item and you edit the -configuration from the project in the build tab of the project preferences -dialog. Both use the same form shown below.

-./images/build_menu_commands_dialog.png -

The dialog is divided into three sections:

-
    -
  • Filetype build commands (selected based on the current document's filetype).
  • -
  • Independent build commands (available regardless of filetype).
  • -
  • Filetype execute commands.
  • -
-

The filetype and independent sections also each contain a field for the regular -expression used for parsing command output for error and warning messages.

-

The columns in the first three sections allow setting of the label, command, -and working directory to run the command in.

-

An item with an empty label will not be shown in the menu.

-

An empty working directory will default to the directory of the current document. -If there is no current document then the command will not run.

-

The dialog will always show the command selected by priority, not just the -commands configured in this configuration source. This ensures that you always -see what the menu item is going to do if activated.

-

If the current source of the menu item is higher priority than the -configuration source you are editing then the command will be shown -in the dialog but will be insensitive (greyed out). This can't happen -with the project source but can with the preferences source dialog.

-

The clear buttons remove the definition from the configuration source you are editing. -When you do this the command from the next lower priority source will be shown. -To hide lower priority menu items without having anything show in the menu -configure with a nothing in the label but at least one character in the command.

-
-

Substitutions in commands and working directories

-

The first occurence of each of the following character sequences in each of the -command and working directory fields is substituted by the items specified below -before the command is run.

-
    -
  • %d - substituted by the absolute path to the directory of the current file.
  • -
  • %e - substituted by the name of the current file without the extension or path.
  • -
  • %f - substituted by the name of the current file without the path.
  • -
  • %p - if a project is open, substituted by the base path from the project.
  • -
-
-

Note

-

If the basepath set in the project preferences is not an absolute path , then it is -taken as relative to the directory of the project file. This allows a project file -stored in the source tree to specify all commands and working directories relative -to the tree itself, so that the whole tree including the project file, can be moved -and even checked into and out of version control without having to re-configure the -build menu.

-
-
-
-

Build menu keyboard shortcuts

-

Keyboard shortcuts can be defined for the first two filetype menu items, the first three -independent menu items, the first two execute menu items and the fixed menu items. -In the keybindings configuration dialog (see Keybinding preferences) -these items are identified by the default labels shown in the Build Menu section above.

-

It is currently not possible to bind keyboard shortcuts to more than these menu items.

-

You can also use underlines in the labels to set mnemonic characters.

-
-
-

Old settings

-

The configurable Build Menu capability was introduced in Geany 0.19 and -required a new section to be added to the configuration files (See -Preferences file format). Geany will still load older format project, -preferences and filetype file settings and will attempt to map them into the new -configuration format. There is not a simple clean mapping between the formats. -The mapping used produces the most sensible results for the majority of cases. -However, if they do not map the way you want, you may have to manually -configure some settings using the Build Commands -Dialog or the Build tab of the project preferences dialog.

-

Any setting configured in either of these dialogs will override settings mapped from -older format configuration files.

-
-
-
-
-

Printing support

-

Since Geany 0.13 there has been printing support using GTK's printing API. -The printed page(s) will look nearly the same as on your screen in Geany. -Additionally, there are some options to modify the printed page(s).

-
-

Note

-

The background text color is set to white, except for text with -a white foreground. This allows dark color schemes to save ink -when printing.

-
-

You can define whether to print line numbers, page numbers at the bottom of -each page and whether to print a page header on each page. This header -contains the filename of the printed document, the current page number and -the date and time of printing. By default, the file name of the document -with full path information is added to the header. If you prefer to add -only the basename of the file(without any path information) you can set it -in the preferences dialog. You can also adjust the format of the date and -time added to the page header. The available conversion specifiers are the -same as the ones which can be used with the ANSI C strftime function.

-

All of these settings can also be changed in the print dialog just before -actual printing is done. -On Unix-like systems the provided print dialog offers a print preview. The -preview file is opened with a PDF viewer and by default GTK uses evince -for print preview. If you have not installed evince or just want to use -another PDF viewer, you can change the program to use in the file -.gtkrc-2.0 (usually found in your home directory). Simply add a line -like:

-
-gtk-print-preview-command = "epdfview %f"
-
-

at the end of the file. Of course, you can also use xpdf, kpdf or whatever -as the print preview command.

-

Geany also provides an alternative basic printing support using a custom -print command. However, the printed document contains no syntax highlighting. -You can adjust the command to which the filename is passed in the preferences -dialog. The default command is:

-
-% lpr %f
-
-

%f will be substituted by the filename of the current file. Geany -will not show errors from the command itself, so you should make -sure that it works before(e.g. by trying to execute it from the -command line).

-

A nicer example, which many prefer is:

-
-% a2ps -1 --medium=A4 -o - %f | xfprint4
-
-

But this depends on a2ps and xfprint4. As a replacement for xfprint4, -gtklp or similar programs can be used.

-
-
-

Plugins

-

Plugins are loaded at startup, if the Enable plugin support -general preference is set. There is also a command-line option, --p, which prevents plugins being loaded. Plugins are scanned in -the following directories:

-
    -
  • $prefix/lib/geany on Unix-like systems (see Installation prefix)
  • -
  • The lib subfolder of the installation path on Windows.
  • -
  • The plugins subfolder of the user configuration directory - see -Configuration file paths.
  • -
  • The Extra plugin path preference (usually blank) - see Paths.
  • -
-

Most plugins add menu items to the Tools menu when they are loaded.

-

See also Plugin documentation for information about single plugins -which are included in Geany.

-
-

Plugin manager

-

The Plugin Manager dialog lets you choose which plugins -should be loaded at startup. You can also load and unload plugins on the -fly using this dialog. Once you click the checkbox for a specific plugin -in the dialog, it is loaded or unloaded according to its previous state. -By default, no plugins are loaded at startup until you select some. -You can also configure some plugin specific options if the plugin -provides any.

-
-
-
-

Keybindings

-

Geany supports the default keyboard shortcuts for the Scintilla -editing widget. For a list of these commands, see Scintilla -keyboard commands. The Scintilla keyboard shortcuts will be overridden -by any custom keybindings with the same keyboard shortcut.

-
-

Switching documents

-

There are some non-configurable bindings to switch between documents, -listed below. These can also be overridden by custom keybindings.

- ---- - - - - - - - - - - - - - -
KeyAction
Alt-[1-9]Select left-most tab, from 1 to 9.
Alt-0Select right-most tab.
-

See also Notebook tab keybindings.

-
-
-

Configurable keybindings

-

For all actions listed below you can define your own keybindings. Open -the Preferences dialog, select the desired action and click on -change. In the resulting dialog you can press the key combination you -want to assign to the action and it will be saved when you press OK. -You can define only one key combination for each action and each key -combination can only be defined for one action.

-

The following tables list all customizable keyboard shortcuts, those -which are common to many applications are marked with (C) after the -shortcut.

-
-

File keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
NewCtrl-N (C)Creates a new file.
OpenCtrl-O (C)Opens a file.
Open selected fileCtrl-Shift-OOpens the selected filename.
Re-open last closed tab Re-opens the last closed document tab.
SaveCtrl-S (C)Saves the current file.
Save As Saves the current file under a new name.
Save allCtrl-Shift-SSaves all open files.
Close allCtrl-Shift-WCloses all open files.
CloseCtrl-W (C)Closes the current file.
Reload fileCtrl-R (C)Reloads the current file. All unsaved changes -will be lost.
PrintCtrl-P (C)Prints the current file.
QuitCtrl-Q (C)Quits Geany.
-
-
-

Editor keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
UndoCtrl-Z (C)Un-does the last action.
RedoCtrl-YRe-does the last action.
Delete current line(s)Ctrl-KDeletes the current line (and any lines with a -selection).
Delete to line endCtrl-Shift-DeleteDeletes from the current caret position to the -end of the current line.
Duplicate line or selectionCtrl-DDuplicates the current line or selection.
Transpose current line Transposes the current line with the previous one.
Scroll to current lineCtrl-Shift-LScrolls the current line into the centre of the -view. The cursor position and or an existing -selection will not be changed.
Scroll up by one lineAlt-UpScrolls the view.
Scroll down by one lineAlt-DownScrolls the view.
Complete wordCtrl-SpaceShows the autocompletion list. If already showing -tag completion, it shows document word completion -instead, even if it is not enabled for automatic -completion. Likewise if no tag suggestions are -available, it shows document word completion.
Show calltipCtrl-Shift-SpaceShows a calltip for the current function or -method.
Show macro listCtrl-ReturnShows a list of available macros and variables in -the workspace.
Complete snippetTabIf you type a construct like if or for and press -this key, it will be completed with a matching -template.
Suppress snippet completion If you type a construct like if or for and press -this key, it will not be completed, and a space or -tab will be inserted, depending on what the -construct completion keybinding is set to. For -example, if you have set the construct completion -keybinding to space, then setting this to -Shift+space will prevent construct completion and -insert a space.
Context Action Executes a command and passes the current word -(near the cursor position) or selection as an -argument. See the section called Context -actions.
Move cursor in snippet Jumps to the next defined cursor positions in a -completed snippets if multiple cursor positions -where defined.
Word part completionTabWhen the autocompletion list is visible, complete -the currently selected item up to the next word -part.
Move line(s) upAlt-PageUpMove the current line or selected lines up by -one line.
Move line(s) downAlt-PageDownMove the current line or selected lines down by -one line.
-
-
-

Clipboard keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
CutCtrl-X (C)Cut the current selection to the clipboard.
CopyCtrl-C (C)Copy the current selection to the clipboard.
PasteCtrl-V (C)Paste the clipboard text into the current document.
Cut current line(s)Ctrl-Shift-XCuts the current line (and any lines with a -selection) to the clipboard.
Copy current line(s)Ctrl-Shift-CCopies the current line (and any lines with a -selection) to the clipboard.
-
-
-

Select keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
Select allCtrl-A (C)Makes a selection of all text in the current -document.
Select current wordAlt-Shift-WSelects the current word under the cursor.
Select current paragraphAlt-Shift-PSelects the current paragraph under the cursor -which is defined by two empty lines around it.
Select current line(s)Alt-Shift-LSelects the current line under the cursor (and any -partially selected lines).
Select to previous word part (Extend) selection to previous word part boundary.
Select to next word part (Extend) selection to next word part boundary.
-
-
-

Insert keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
Insert dateShift-Alt-DInserts a customisable date.
Insert alternative whitespace Inserts a tab character when spaces should -be used for indentation and inserts space -characters of the amount of a tab width when -tabs should be used for indentation.
Insert New Line Before Current Inserts a new line with indentation.
Insert New Line After Current Inserts a new line with indentation.
-
-
-

Format keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
Toggle case of selectionCtrl-Alt-UChanges the case of the selection. A lowercase -selection will be changed into uppercase and vice -versa. If the selection contains lower- and -uppercase characters, all will be converted to -lowercase.
Comment line Comments current line or selection.
Uncomment line Uncomments current line or selection.
Toggle line commentationCtrl-EComments a line if it is not commented or removes -a comment if the line is commented.
Increase indentCtrl-IIndents the current line or selection by one tab -or with spaces in the amount of the tab width -setting.
Decrease indentCtrl-URemoves one tab or the amount of spaces of -the tab width setting from the indentation of the -current line or selection.
Increase indent by one space Indents the current line or selection by one -space.
Decrease indent by one space Deindents the current line or selection by one -space.
Smart line indent Indents the current line or all selected lines -with the same indentation as the previous line.
Send to Custom Command 1 (2,3)Ctrl-1 (2,3)Passes the current selection to a configured -external command (available for the first -three configured commands, see -Sending text through custom commands for -details).
Send Selection to Terminal Sends the current selection or the current -line (if there is no selection) to the -embedded Terminal (VTE).
Reflow lines/block Reformat selected lines or current -(indented) text block, -breaking lines at the long line marker or the -line breaking column if line breaking is -enabled for the current document.
-
-
-

Settings keybindings

- ----- - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
PreferencesCtrl-Alt-POpens preferences dialog.
Plugin Preferences Opens plugin preferences dialog.
-
-
-

Search keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
FindCtrl-F (C)Opens the Find dialog.
Find NextCtrl-GFinds next result.
Find PreviousCtrl-Shift-GFinds previous result.
Find Next Selection Finds next occurence of selected text.
Find Previous Selection Finds previous occurence of selected text.
ReplaceCtrl-H (C)Opens the Replace dialog.
Find in filesCtrl-Shift-FOpens the Find in files dialog.
Next message Jumps to the line with the next message in -the Messages window.
Previous message Jumps to the line with the previous message -in the Messages window.
Find UsageCtrl-Shift-EFinds all occurrences of the current word (near -the keyboard cursor) or selection in all open -documents and displays them in the messages -window.
Find Document UsageCtrl-Shift-DFinds all occurrences of the current word (near -the keyboard cursor) or selection in the current -document and displays them in the messages -window.
Mark AllCtrl-Shift-MHighlight all matches of the current -word/selection in the current document -with a colored box. If there's nothing to -find, or the cursor is next to an existing match, -the highlighted matches will be cleared.
-
-
-

Go to keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
Navigate forward a locationAlt-Right (C)Switches to the next location in the navigation -history. See the section called Code Navigation -History.
Navigate back a locationAlt-Left (C)Switches to the previous location in the -navigation history. See the section called -Code navigation history.
Go to lineCtrl-LFocuses the Go to Line entry (if visible) or -shows the Go to line dialog.
Goto matching braceCtrl-BIf the cursor is ahead or behind a brace, then it -is moved to the brace which belongs to the current -one. If this keyboard shortcut is pressed again, -the cursor is moved back to the first brace.
Toggle markerCtrl-MSet a marker on the current line, or clear the -marker if there already is one.
Goto next markerCtrl-.Goto the next marker in the current document.
Goto previous markerCtrl-,Goto the previous marker in the current document.
Go to tag definitionCtrl-TJump to the definition of the current word or -selection. See Go to tag definition.
Go to tag declarationCtrl-Shift-TJump to the declaration of the current word or -selection. See Go to tag declaration.
Go to Start of LineHomeMove the caret to the start of the line. -Behaves differently if smart_home_key is set.
Go to End of LineEndMove the caret to the end of the line.
Go to Start of Display LineAlt-HomeMove the caret to the start of the display line. -This is useful when you use line wrapping and -want to jump to the start of the wrapped, virtual -line, not the real start of the whole line. -If the line is not wrapped, it behaves like -Go to Start of Line.
Go to End of Display LineAlt-EndMove the caret to the end of the display line. -If the line is not wrapped, it behaves like -Go to End of Line.
Go to Previous Word PartCtrl-/Goto the previous part of the current word.
Go to Next Word PartCtrl-\Goto the next part of the current word.
-
-
-

View keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
FullscreenF11 (C)Switches to fullscreen mode.
Toggle Messages Window Toggles the message window (status and compiler -messages) on and off.
Toggle Sidebar Shows or hides the sidebar.
Toggle all additional widgets Hide and show all additional widgets like the -notebook tabs, the toolbar, the messages window -and the status bar.
Zoom InCtrl-+ (C)Zooms in the text.
Zoom OutCtrl-- (C)Zooms out the text.
Zoom ResetCtrl-0Reset any previous zoom on the text.
-
-
-

Focus keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
Switch to EditorF2Switches to editor widget. -Also reshows the document statistics line -(after a short timeout).
Switch to Search BarF7Switches to the search bar in the toolbar (if -visible).
Switch to Message Window Focus the Message Window's current tab.
Switch to Compiler Focus the Compiler message window tab.
Switch to Messages Focus the Messages message window tab.
Switch to ScribbleF6Switches to scribble widget.
Switch to VTEF4Switches to VTE widget.
Switch to Sidebar Focus the Sidebar.
Switch to Sidebar Symbol List Focus the Symbol list tab in the Sidebar -(if visible).
Switch to Sidebar Document List Focus the Document list tab in the Sidebar -(if visible).
-
-
-

Notebook tab keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
Switch to left documentCtrl-PageUp (C)Switches to the previous open document.
Switch to right documentCtrl-PageDown (C)Switches to the next open document.
Switch to last used documentCtrl-TabSwitches to the previously shown document (if it's -still open). -Holding Ctrl (or another modifier if the keybinding -has been changed) will show a dialog, then repeated -presses of the keybinding will switch to the 2nd-last -used document, 3rd-last, etc. Also known as -Most-Recently-Used documents switching.
Move document leftCtrl-Shift-PageUpChanges the current document with the left hand -one.
Move document rightCtrl-Shift-PageDownChanges the current document with the right hand -one.
Move document first Moves the current document to the first position.
Move document last Moves the current document to the last position.
-
-
-

Document keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
Clone See Cloning documents.
Replace tabs with space Replaces all tabs with the right amount of spaces.
Replace spaces with tabs Replaces leading spaces with tab characters.
Toggle current fold Toggles the folding state of the current code block.
Fold all Folds all contractible code blocks.
Unfold all Unfolds all contracted code blocks.
Reload symbol listCtrl-Shift-RReloads the tag/symbol list.
Toggle Line wrapping Enables or disables wrapping of long lines.
Toggle Line breaking Enables or disables automatic breaking of long -lines at a configurable column.
Remove Markers Remove any markers on lines or words which -were set by using 'Mark All' in the -search dialog or by manually marking lines.
Remove Error Indicators Remove any error indicators in the -current document.
Remove Markers and Error Indicators Combines Remove Markers and -Remove Error Indicators.
-
-
-

Project keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
New Create a new project.
Open Opens a project file.
Properties Shows project properties.
Close Close the current project.
-
-
-

Build keybindings

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDefault shortcutDescription
CompileF8Compiles the current file.
BuildF9Builds (compiles if necessary and links) the -current file.
Make allShift-F9Builds the current file with the Make tool.
Make custom targetCtrl-Shift-F9Builds the current file with the Make tool and a -given target.
Make objectShift-F8Compiles the current file with the Make tool.
Next error Jumps to the line with the next error from the -last build process.
Previous error Jumps to the line with the previous error from -the last build process.
RunF5Executes the current file in a terminal emulation.
Set Build Commands Opens the build commands dialog.
-
-
-

Tools keybindings

- ----- - - - - - - - - - - - - -
ActionDefault shortcutDescription
Show Color Chooser Opens the Color Chooser dialog.
-
-
-

Help keybindings

- ----- - - - - - - - - - - - - -
ActionDefault shortcutDescription
HelpF1 (C)Opens the manual.
-
-
-
-
-
-

Configuration files

-
-

Warning

-

You must use UTF-8 encoding without BOM for configuration files.

-
-
-

Configuration file paths

-

Geany has default configuration files installed for the system and -also per-user configuration files.

-

The system files should not normally be edited because they will be -overwritten when upgrading Geany.

-

The user configuration directory can be overridden with the -c -switch, but this is not normally done. See Command line options.

-
-

Note

-

Any missing subdirectories in the user configuration directory -will be created when Geany starts.

-
-

You can check the paths Geany is using with Help->Debug Messages. -Near the top there should be 2 lines with something like:

-
-Geany-INFO: System data dir: /usr/share/geany
-Geany-INFO: User config dir: /home/username/.config/geany
-
-
-

Paths on Unix-like systems

-

The system path is $prefix/share/geany, where $prefix is the -path where Geany is installed (see Installation prefix).

-

The user configuration directory is normally: -/home/username/.config/geany

-
-
-

Paths on Windows

-

The system path is the data subfolder of the installation path -on Windows.

-

The user configuration directory might vary, but on Windows XP it's: -C:\Documents and Settings\UserName\Application Data\geany -On Windows 7 and above you most likely will find it at: -C:\users\UserName\Roaming\geany

-
-
-
-

Tools menu items

-

There's a Configuration files submenu in the Tools menu that -contains items for some of the available user configuration files. -Clicking on one opens it in the editor for you to update. Geany will -reload the file after you have saved it.

-
-

Note

-

Other configuration files not shown here will need to be opened -manually, and will not be automatically reloaded when saved. -(see Reload Configuration below).

-
-

There's also a Reload Configuration item which can be used if you -updated one of the other configuration files, or modified or added -template files.

-

Reload Configuration is also necessary to update syntax highlighting colors.

-
-

Note

-

Syntax highlighting colors aren't updated in open documents after -saving filetypes.common as this may take a significant -amount of time.

-
-
-
-

Global configuration file

-

System administrators can add a global configuration file for Geany -which will be used when starting Geany and a user configuration file -does not exist.

-

The global configuration file is read from geany.conf in the -system configuration path - see Configuration file paths. It can -contain any settings which are found in the usual configuration file -created by Geany, but does not have to contain all settings.

-
-

Note

-

This feature is mainly intended for package maintainers or system -admins who want to set up Geany in a multi user environment and -set some sane default values for this environment. Usually users won't -need to do that.

-
-
-
-

Filetype definition files

-

All color definitions and other filetype specific settings are -stored in the filetype definition files. Those settings are colors -for syntax highlighting, general settings like comment characters or -word delimiter characters as well as compiler and linker settings.

-

See also Configuration file paths.

-
-

Filenames

-

Each filetype has a corresponding filetype definition file. The format -for built-in filetype Foo is:

-
-filetypes.foo
-
-

The extension is normally just the filetype name in lower case.

-

However there are some exceptions:

- ---- - - - - - - - - - - - - - - - - - - - -
FiletypeExtension
C++cpp
C#cs
Makemakefile
Matlab/Octavematlab
-

There is also the special file filetypes.common.

-

For custom filetypes, the filename for Foo is different:

-
-filetypes.Foo.conf
-
-

See the link for details.

-
-
-

System files

-

The system-wide filetype configuration files can be found in the -system configuration path and are called filetypes.$ext, -where $ext is the name of the filetype. For every -filetype there is a corresponding definition file. There is one -exception: filetypes.common -- this file is for general settings, -which are not specific to a certain filetype.

-
-

Warning

-

It is not recommended that users edit the system-wide files, -because they will be overridden when Geany is updated.

-
-
-
-

User files

-

To change the settings, copy a file from the system configuration -path to the subdirectory filedefs in your user configuration -directory. Then you can edit the file and the changes will still be -available after an update of Geany.

-

Alternatively, you can create the file yourself and add only the -settings you want to change. All missing settings will be read from -the corresponding system configuration file.

-
-
-

Custom filetypes

-

At startup Geany looks for filetypes.*.conf files in the system and -user filetype paths, adding any filetypes found with the name matching -the '*' wildcard - e.g. filetypes.Bar.conf.

-

Custom filetypes are not as powerful as built-in filetypes, but -support for the following has been implemented:

-
    -
  • Recognizing and setting the filetype (after the user has manually updated -the filetype extensions file).

    -
  • -
  • Filetype group membership.

    -
  • -
  • -
    Reading filetype settings in the [settings] section, including:
    -
    -
    -
    -
  • -
  • Build commands ([build-menu] section).

    -
  • -
  • Loading global tags files (sharing the tag_parser filetype's namespace).

    -
  • -
-

See Filetype configuration for details on each setting.

-
-

Creating a custom filetype from an existing filetype

-

Because most filetype settings will relate to the syntax -highlighting (e.g. styling, keywords, lexer_properties -sections), it is best to copy an existing filetype file that uses -the lexer you wish to use as the basis of a custom filetype, using -the correct filename extension format shown above, e.g.:

-
-cp filetypes.foo filetypes.Bar.conf
-
-

Then add the lexer_filetype=Foo setting (if not already present) -and add/adjust other settings.

-
-

Warning

-

The [styling] and [keywords] sections have key names -specific to each filetype/lexer. You must follow the same -names - in particular, some lexers only support one keyword -list, or none.

-
-
-
-
-

Filetype configuration

-

As well as the sections listed below, each filetype file can contain -a [build-menu] section as described in [build-menu] section.

-
-

[styling] section

-

In this section the colors for syntax highlighting are defined. The -manual format is:

-
    -
  • key=foreground_color;background_color;bold_flag;italic_flag
  • -
-

Colors have to be specified as RGB hex values prefixed by -0x or # similar to HTML/CSS hex triplets. For example, all of the following -are valid values for pure red; 0xff0000, 0xf00, #ff0000, or #f00. The -values are case-insensitive but it is a good idea to use lower-case. -Note that you can also use named colors as well by substituting the -color value with the name of a color as defined in the [named_colors] -section, see the [named_colors] Section for more information.

-

Bold and italic are flags and should only be "true" or "false". If their -value is something other than "true" or "false", "false" is assumed.

-

You can omit fields to use the values from the style named "default".

-

E.g. key=0xff0000;;true

-

This makes the key style have red foreground text, default background -color text and bold emphasis.

-
-
Using a named style
-

The second format uses a named style name to reference a style -defined in filetypes.common.

-
    -
  • key=named_style
  • -
  • key2=named_style2,bold,italic
  • -
-

The bold and italic parts are optional, and if present are used to -toggle the bold or italic flags to the opposite of the named style's -flags. In contrast to style definition booleans, they are a literal -",bold,italic" and commas are used instead of semi-colons.

-

E.g. key=comment,italic

-

This makes the key style match the "comment" named style, but with -italic emphasis.

-

To define named styles, see the filetypes.common [named_styles] -Section.

-
-
-
Reading styles from another filetype
-

You can automatically copy all of the styles from another filetype -definition file by using the following syntax for the [styling] -group:

-
-[styling=Foo]
-
-

Where Foo is a filetype name. The corresponding [styling] -section from filetypes.foo will be read.

-

This is useful when the same lexer is being used for multiple -filetypes (e.g. C/C++/C#/Java/etc). For example, to make the C++ -styling the same as the C styling, you would put the following in -filetypes.cpp:

-
-[styling=C]
-
-
-
-
-

[keywords] section

-

This section contains keys for different keyword lists specific to -the filetype. Some filetypes do not support keywords, so adding a -new key will not work. You can only add or remove keywords to/from -an existing list.

-
-

Important

-

The keywords list must be in one line without line ending characters.

-
-
-
-

[lexer_properties] section

-

Here any special properties for the Scintilla lexer can be set in the -format key.name.field=some.value.

-

Properties Geany uses are listed in the system filetype files. To find -other properties you need Geany's source code:

-
-egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
-
-
-
-

[settings] section

-
-
extension
-

This is the default file extension used when saving files, not -including the period character (.). The extension used should -match one of the patterns associated with that filetype (see -Filetype extensions).

-

Example: extension=cxx

-
-
wordchars
-

These characters define word boundaries when making selections -and searching using word matching options.

-

Example: (look at system filetypes.* files)

-
-

Note

-

This overrides the whitespace_chars filetypes.common setting.

-
-
-
comment_single
-

A character or string which is used to comment code. If you want to use -multiline comments only, don't set this but rather comment_open and -comment_close.

-

Single-line comments are used in priority over multiline comments to -comment a line, e.g. with the Comment/Uncomment line command.

-

Example: comment_single=//

-
-
comment_open
-

A character or string which is used to comment code. You need to also -set comment_close to really use multiline comments. If you want to use -single-line comments, prefer setting comment_single.

-

Multiline comments are used in priority over single-line comments to -comment a block, e.g. template comments.

-

Example: comment_open=/*

-
-
comment_close
-

If multiline comments are used, this is the character or string to -close the comment.

-

Example: comment_close=*/

-
-
comment_use_indent
-

Set this to false if a comment character or string should start at -column 0 of a line. If set to true it uses any indentation of the -line.

-

Note: Comment indentation

-

comment_use_indent=true would generate this if a line is -commented (e.g. with Ctrl-D):

-
-#command_example();
-
-

comment_use_indent=false would generate this if a line is -commented (e.g. with Ctrl-D):

-
-#   command_example();
-
-

Note: This setting only works for single line comments (like '//', -'#' or ';').

-

Example: comment_use_indent=true

-
-
context_action_cmd
-

A command which can be executed on the current word or the current -selection.

-

Example usage: Open the API documentation for the -current function call at the cursor position.

-

The command can -be set for every filetype or if not set, a global command will -be used. The command itself can be specified without the full -path, then it is searched in $PATH. But for security reasons, -it is recommended to specify the full path to the command. The -wildcard %s will be replaced by the current word at the cursor -position or by the current selection.

-

Hint: for PHP files the following could be quite useful: -context_action_cmd=firefox "http://www.php.net/%s"

-

Example: context_action_cmd=devhelp -s "%s"

-
-
-
-
tag_parser
-
The TagManager language name, e.g. "C". Usually the same as the -filetype name.
-
-
-
lexer_filetype
-

A filetype name to setup syntax highlighting from another filetype. -This must not be recursive, i.e. it should be a filetype name that -doesn't use the lexer_filetype key itself, e.g.:

-
-lexer_filetype=C
-#lexer_filetype=C++
-
-

The second line is wrong, because filetypes.cpp itself uses -lexer_filetype=C, which would be recursive.

-
-
symbol_list_sort_mode
-

What the default symbol list sort order should be.

- ---- - - - - - - - - - - - - - -
ValueMeaning
0Sort tags by name
1Sort tags by appearance (line number)
-
-
-
-
xml_indent_tags
-
If this setting is set to true, a new line after a line ending with an -unclosed XML/HTML tag will be automatically indented. This only applies -to filetypes for which the HTML or XML lexer is used. Such filetypes have -this setting in their system configuration files.
-
-
-
-

[indentation] section

-

This section allows definition of default indentation settings specific to -the file type, overriding the ones configured in the preferences. This can -be useful for file types requiring specific indentation settings (e.g. tabs -only for Makefile). These settings don't override auto-detection if activated.

-
-
width
-
The forced indentation width.
-
type
-

The forced indentation type.

- ---- - - - - - - - - - - - - - - - - -
ValueIndentation type
0Spaces only
1Tabs only
2Mixed (tabs and spaces)
-
-
-
-
-

[build_settings] section

-

As of Geany 0.19 this section is supplemented by the [build-menu] section. -Values that are set in the [build-menu] section will override those in this section.

-
-
error_regex
-

This is a regular expression to parse a filename -and line number from build output. If undefined, Geany will fall -back to its default error message parsing.

-

Only the first two matches will be read by Geany. Geany will look for -a match that is purely digits, and use this for the line number. The -remaining match will be used as the filename.

-

Example: error_regex=(.+):([0-9]+):[0-9]+

-

This will parse a message such as: -test.py:7:24: E202 whitespace before ']'

-
-
-

Build commands

-

If any build menu item settings have been configured in the Build Menu Commands -dialog or the Build tab of the project preferences dialog then these -settings are stored in the [build-menu] section and override the settings in -this section for that item.

-
-
compiler
-

This item specifies the command to compile source code files. But -it is also possible to use it with interpreted languages like Perl -or Python. With these filetypes you can use this option as a kind of -syntax parser, which sends output to the compiler message window.

-

You should quote the filename to also support filenames with -spaces. The following wildcards for filenames are available:

-
    -
  • %f -- complete filename without path
  • -
  • %e -- filename without path and without extension
  • -
-

Example: compiler=gcc -Wall -c "%f"

-
-
linker
-

This item specifies the command to link the file. If the file is not -already compiled, it will be compiled while linking. The -o option -is automatically added by Geany. This item works well with GNU gcc, -but may be problematic with other compilers (esp. with the linker).

-

Example: linker=gcc -Wall "%f"

-
-
run_cmd
-

Use this item to execute your file. It has to have been built -already. Use the %e wildcard to have only the name of the executable -(i.e. without extension) or use the %f wildcard if you need the -complete filename, e.g. for shell scripts.

-

Example: run_cmd="./%e"

-
-
-
-
-
-

Special file filetypes.common

-

There is a special filetype definition file called -filetypes.common. This file defines some general non-filetype-specific -settings.

-

You can open the user filetypes.common with the -Tools->Configuration Files->filetypes.common menu item. This adds -the default settings to the user file if the file doesn't exist. -Alternatively the file can be created manually, adding only the -settings you want to change. All missing settings will be read from -the system file.

-
-

Note

-

See the Filetype configuration section for how to define styles.

-
-
-

[named_styles] section

-

Named styles declared here can be used in the [styling] section of any -filetypes.* file.

-

For example:

-

In filetypes.common:

-
-[named_styles]
-foo=0xc00000;0xffffff;false;true
-bar=foo
-
-

In filetypes.c:

-
-[styling]
-comment=foo
-
-

This saves copying and pasting the whole style definition into several -different files.

-
-

Note

-

You can define aliases for named styles, as shown with the bar -entry in the above example, but they must be declared after the -original style.

-
-
-
-

[named_colors] section

-

Named colors declared here can be used in the [styling] or -[named_styles] section of any filetypes.* file or color scheme.

-

For example:

-
-[named_colors]
-my_red_color=#FF0000
-my_blue_color=#0000FF
-
-[named_styles]
-foo=my_red_color;my_blue_color;false;true
-
-

This allows to define a color pallete by name so that to change a color -scheme-wide only involves changing the hex value in a single location.

-
-
-

[styling] section

-
-
default
-

This is the default style. It is used for styling files without a -filetype set.

-

Example: default=0x000000;0xffffff;false;false

-
-
selection
-

The style for coloring selected text. The format is:

-
    -
  • Foreground color
  • -
  • Background color
  • -
  • Use foreground color
  • -
  • Use background color
  • -
-

The colors are only set if the 3rd or 4th argument is true. When -the colors are not overridden, the default is a dark grey -background with syntax highlighted foreground text.

-

Example: selection=0xc0c0c0;0x00007F;true;true

-
-
brace_good
-

The style for brace highlighting when a matching brace was found.

-

Example: brace_good=0xff0000;0xFFFFFF;true;false

-
-
brace_bad
-

The style for brace highlighting when no matching brace was found.

-

Example: brace_bad=0x0000ff;0xFFFFFF;true;false

-
-
caret
-

The style for coloring the caret(the blinking cursor). Only first -and third argument is interpreted. -Set the third argument to true to change the caret into a block caret.

-

Example: caret=0x000000;0x0;false;false

-
-
caret_width
-

The width for the caret(the blinking cursor). Only the first -argument is interpreted. The width is specified in pixels with -a maximum of three pixel. Use the width 0 to make the caret -invisible.

-

Example: caret=1;0;false;false

-
-
current_line
-

The style for coloring the background of the current line. Only -the second and third arguments are interpreted. The second argument -is the background color. Use the third argument to enable or -disable background highlighting for the current line (has to be -true/false).

-

Example: current_line=0x0;0xe5e5e5;true;false

-
-
indent_guide
-

The style for coloring the indentation guides. Only the first and -second arguments are interpreted.

-

Example: indent_guide=0xc0c0c0;0xffffff;false;false

-
-
white_space
-

The style for coloring the white space if it is shown. The first -both arguments define the foreground and background colors, the -third argument sets whether to use the defined foreground color -or to use the color defined by each filetype for the white space. -The fourth argument defines whether to use the background color.

-

Example: white_space=0xc0c0c0;0xffffff;true;true

-
-
margin_linenumber
-
Line number margin foreground and background colors.
-
-
-
margin_folding
-
Fold margin foreground and background colors.
-
fold_symbol_highlight
-
Highlight color of folding symbols.
-
folding_style
-

The style of folding icons. Only first and second arguments are -used.

-

Valid values for the first argument are:

-
    -
  • 1 -- for boxes
  • -
  • 2 -- for circles
  • -
  • 3 -- for arrows
  • -
  • 4 -- for +/-
  • -
-

Valid values for the second argument are:

-
    -
  • 0 -- for no lines
  • -
  • 1 -- for straight lines
  • -
  • 2 -- for curved lines
  • -
-

Default: folding_style=1;1;

-

Arrows: folding_style=3;0;

-
-
folding_horiz_line
-

Draw a thin horizontal line at the line where text is folded. Only -first argument is used.

-

Valid values for the first argument are:

-
    -
  • 0 -- disable, do not draw a line
  • -
  • 1 -- draw the line above folded text
  • -
  • 2 -- draw the line below folded text
  • -
-

Example: folding_horiz_line=0;0;false;false

-
-
line_wrap_visuals
-

First argument: drawing of visual flags to indicate a line is wrapped. -This is a bitmask of the values:

-
    -
  • 0 -- No visual flags
  • -
  • 1 -- Visual flag at end of subline of a wrapped line
  • -
  • 2 -- Visual flag at begin of subline of a wrapped line. Subline is -indented by at least 1 to make room for the flag.
  • -
-

Second argument: wether the visual flags to indicate a line is wrapped -are drawn near the border or near the text. This is a bitmask of the values:

-
    -
  • 0 -- Visual flags drawn near border
  • -
  • 1 -- Visual flag at end of subline drawn near text
  • -
  • 2 -- Visual flag at begin of subline drawn near text
  • -
-

Only first and second arguments are interpreted.

-

Example: line_wrap_visuals=3;0;false;false

-
-
line_wrap_indent
-

First argument: sets the size of indentation of sublines for wrapped lines -in terms of the width of a space, only used when the second argument is 0.

-

Second argument: wrapped sublines can be indented to the position of their -first subline or one more indent level. Possible values:

-
    -
  • 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
  • -
  • 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
  • -
  • 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
  • -
-

Only first and second arguments are interpreted.

-

Example: line_wrap_indent=0;1;false;false

-
-
translucency
-

Translucency for the current line (first argument) and the selection -(second argument). Values between 0 and 256 are accepted.

-

Note for Windows 95, 98 and ME users: -keep this value at 256 to disable translucency otherwise Geany might crash.

-

Only the first and second arguments are interpreted.

-

Example: translucency=256;256;false;false

-
-
marker_line
-

The style for a highlighted line (e.g when using Goto line or goto tag). -The foreground color (first argument) is only used when the Markers margin -is enabled (see View menu).

-

Only the first and second arguments are interpreted.

-

Example: marker_line=0x000000;0xffff00;false;false

-
-
marker_search
-

The style for a marked search results (when using "Mark" in Search dialogs). -The second argument sets the background color for the drawn rectangle.

-

Only the second argument is interpreted.

-

Example: marker_search=0x000000;0xb8f4b8;false;false

-
-
marker_mark
-

The style for a marked line (e.g when using the "Toggle Marker" keybinding -(Ctrl-M)). The foreground color (first argument) is only used -when the Markers margin is enabled (see View menu).

-

Only the first and second arguments are interpreted.

-

Example: marker_mark=0x000000;0xb8f4b8;false;false

-
-
marker_translucency
-

Translucency for the line marker (first argument) and the search marker -(second argument). Values between 0 and 256 are accepted.

-

Note for Windows 95, 98 and ME users: -keep this value at 256 to disable translucency otherwise Geany might crash.

-

Only the first and second arguments are interpreted.

-

Example: marker_translucency=256;256;false;false

-
-
line_height
-

Amount of space to be drawn above and below the line's baseline. -The first argument defines the amount of space to be drawn above the line, the second -argument defines the amount of space to be drawn below.

-

Only the first and second arguments are interpreted.

-

Example: line_height=0;0;false;false

-
-
calltips
-

The style for coloring the calltips. The first two arguments -define the foreground and background colors, the third and fourth -arguments set whether to use the defined colors.

-

Example: calltips=0xc0c0c0;0xffffff;false;false

-
-
-
-
-

[settings] section

-
-
whitespace_chars
-

Characters to treat as whitespace. These characters are ignored -when moving, selecting and deleting across word boundaries -(see Scintilla keyboard commands).

-

This should include space (\s) and tab (\t).

-

Example: whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~

-
-
-
-
-
-
-

Filetype extensions

-
-

Note

-

To change the default filetype extension used when saving a new file, -see Filetype definition files.

-
-

You can override the list of file extensions that Geany uses to detect -filetypes using the user filetype_extensions.conf file. Use the -Tools->Configuration Files->filetype_extensions.conf menu item. See -also Configuration file paths.

-

You should only list lines for filetype extensions that you want to -override in the user configuration file and remove or comment out -others. The patterns are listed after the = sign, using a -semi-colon separated list of patterns which should be matched for -that filetype.

-

For example, to override the filetype extensions for Make, the file -should look like:

-
-[Extensions]
-Make=Makefile*;*.mk;Buildfile;
-
-
-

Filetype group membership

-

Group membership is also stored in filetype_extensions.conf. This -file is used to store information Geany needs at startup, whereas the -separate filetype definition files hold information only needed when -a document with their filetype is used.

-

The format looks like:

-
-[Groups]
-Programming=C;C++;
-Script=Perl;Python;
-Markup=HTML;XML;
-Misc=Diff;Conf;
-None=None;
-
-

The key names cannot be configured.

-
-

Note

-

Group membership is only read at startup.

-
-
-
-
-

Preferences file format

-

The user preferences file geany.conf holds settings for all the items configured -in the preferences dialog. This file should not be edited while Geany is running -as the file will be overwritten when the preferences in Geany are changed or Geany -is quit.

-
-

[build-menu] section

-

The [build-menu] section contains the configuration of the build menu. -This section can occur in filetype, preferences and project files and -always has the format described here. Different menu items are loaded -from different files, see the table in the Build Menu Configuration -section for details. All the settings can be configured from the dialogs -except the execute command in filetype files and filetype definitions in -the project file, so these are the only ones which need hand editing.

-

The build-menu section stores one entry for each setting for each menu item that -is configured. The keys for these settings have the format:

-
-GG_NN_FF
-

where:

-
    -
  • GG - is the menu item group,
      -
    • FT for filetype
    • -
    • NF for independent (non-filetype)
    • -
    • EX for execute
    • -
    -
  • -
  • NN - is a two decimal digit number of the item within the group, -starting at 00
  • -
  • FF - is the field,
      -
    • LB for label
    • -
    • CM for command
    • -
    • WD for working directory
    • -
    -
  • -
-
-
-
-

Project file format

-

The project file contains project related settings and possibly a -record of the current session files.

-
-

[build-menu] additions

-

The project file also can have extra fields in the [build-menu] section -in addition to those listed in [build-menu] section above.

-

When filetype menu items are configured for the project they are stored -in the project file.

-

The filetypes entry is a list of the filetypes which exist in the -project file.

-

For each filetype the entries for that filetype have the format defined in -[build-menu] section but the key is prefixed by the name of the filetype -as it appears in the filetypes entry, eg the entry for the label of -filetype menu item 0 for the C filetype would be

-
-CFT_00_LB=Label
-
-
-
-

Templates

-

Geany supports the following templates:

-
    -
  • ChangeLog entry
  • -
  • File header
  • -
  • Function description
  • -
  • Short GPL notice
  • -
  • Short BSD notice
  • -
  • File templates
  • -
-

To use these templates, just open the Edit menu or open the popup menu -by right-clicking in the editor widget, and choose "Insert Comments" -and insert templates as you want.

-

Some templates (like File header or ChangeLog entry) will always be -inserted at the top of the file.

-

To insert a function description, the cursor must be inside -of the function, so that the function name can be determined -automatically. The description will be positioned correctly one line -above the function, just check it out. If the cursor is not inside -of a function or the function name cannot be determined, the inserted -function description won't contain the correct function name but "unknown" -instead.

-
-

Note

-

Geany automatically reloads template information when it notices you -save a file in the user's template configuration directory. You can -also force this by selecting Tools->Reload Configuration.

-
-
-

Template meta data

-

Meta data can be used with all templates, but by default user set -meta data is only used for the ChangeLog and File header templates.

-

In the configuration dialog you can find a tab "Templates" (see -Template preferences). You can define the default values -which will be inserted in the templates.

-
-
-

File templates

-

File templates are templates used as the basis of a new file. To -use them, choose the New (with Template) menu item from the File -menu.

-

By default, file templates are installed for some filetypes. Custom -file templates can be added by creating the appropriate template file. You can -also edit the default file templates.

-

The file's contents are just the text to place in the document, with -optional template wildcards like {fileheader}. The fileheader -wildcard can be placed anywhere, but it's usually put on the first -line of the file, followed by a blank line.

-
-

Adding file templates

-

File templates are read from templates/files under the -Configuration file paths.

-

The filetype to use is detected from the template file's extension, if -any. For example, creating a file module.c would add a menu item -which created a new document with the filetype set to 'C'.

-

The template file is read from disk when the corresponding menu item is -clicked.

-
-
-
-

Customizing templates

-

Each template can be customized to your needs. The templates are -stored in the ~/.config/geany/templates/ directory (see the section called -Command line options for further information about the configuration -directory). Just open the desired template with an editor (ideally, -Geany ;-) ) and edit the template to your needs. There are some -wildcards which will be automatically replaced by Geany at startup.

-
-

Template wildcards

-

All wildcards must be enclosed by "{" and "}", e.g. {date}.

-

Wildcards for character escaping

- ----- - - - - - - - - - - - - - - - - - - - - -
WildcardDescriptionAvailable in
ob{ Opening Brace (used to prevent other -wildcards being expanded).file templates, file header, snippets.
cb} Closing Brace.file templates, file header, snippets.
pc% Percent (used to escape e.g. %block% in -snippets).snippets.
-

Global wildcards

-

These are configurable, see Template preferences.

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
WildcardDescriptionAvailable in
developerThe name of the developer.file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
initialThe developer's initials, e.g. "ET" for -Enrico Tr枚ger or "JFD" for John Foobar Doe.file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
mailThe email address of the developer.file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
companyThe company the developer is working for.file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
versionThe initial version of a new file.file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
-

Date & time wildcards

-

The format for these wildcards can be changed in the preferences -dialog, see Template preferences. You can use any conversion -specifiers which can be used with the ANSI C strftime function. -For details please see http://man.cx/strftime.

- ----- - - - - - - - - - - - - - - - - - - - - -
WildcardDescriptionAvailable in
yearThe current year. Default format is: YYYY.file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
dateThe current date. Default format: -YYYY-MM-DD.file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
datetimeThe current date and time. Default format: -DD.MM.YYYY HH:mm:ss ZZZZ.file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
-

Dynamic wildcards

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
WildcardDescriptionAvailable in
untitledThe string "untitled" (this will be -translated to your locale), used in -file templates.file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
geanyversionThe actual Geany version, e.g. -"Geany 1.24.1".file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
filenameThe filename of the current file. -For new files, it's only replaced when -first saving if found on the first 4 lines -of the file.file header, snippets, file -templates.
projectThe current project's name, if any.file header, snippets, file templates.
descriptionThe current project's description, if any.file header, snippets, file templates.
functionnameThe function name of the function at the -cursor position. This wildcard will only be -replaced in the function description -template.function description.
command:pathExecutes the specified command and replace -the wildcard with the command's standard -output. See Special {command:} wildcard -for details.file templates, file header, -function description, ChangeLog entry, -bsd, gpl, snippets.
-

Template insertion wildcards

- ----- - - - - - - - - - - - - - - - - - - - - -
WildcardDescriptionAvailable in
gplThis wildcard inserts a short GPL notice.file header.
bsdThis wildcard inserts a BSD licence notice.file header.
fileheaderThe file header template. This wildcard -will only be replaced in file templates.snippets, file templates.
-
-
Special {command:} wildcard
-

The {command:} wildcard is a special one because it can execute -a specified command and put the command's output (stdout) into -the template.

-

Example:

-
-{command:uname -a}
-
-

will result in:

-
-Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
-
-

Using this wildcard you can insert nearly any arbitrary text into the -template.

-

In the environment of the executed command the variables -GEANY_FILENAME, GEANY_FILETYPE and GEANY_FUNCNAME are set. -The value of these variables is filled in only if Geany knows about it. -For example, GEANY_FUNCNAME is only filled within the function -description template. However, these variables are always set, -just maybe with an empty value. -You can easily access them e.g. within an executed shell script using:

-
-$GEANY_FILENAME
-
-
-

Note

-

If the specified command could not be found or not executed, the wildcard is substituted -by an empty string. In such cases, you can find the occurred error message on Geany's -standard error and in the Help->Debug Messages dialog.

-
-
-
-
-
-
-

Customizing the toolbar

-

You can add, remove and reorder the elements in the toolbar by using -the toolbar editor, or by manually editing the configuration file -ui_toolbar.xml.

-

The toolbar editor can be opened from the preferences editor on the Toolbar tab or -by right-clicking on the toolbar itself and choosing it from the menu.

-
-

Manually editing the toolbar layout

-

To override the system-wide configuration file, copy it to your user -configuration directory (see Configuration file paths).

-

For example:

-
-% cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
-
-

Then edit it and add any of the available elements listed in the file or remove -any of the existing elements. Of course, you can also reorder the elements as -you wish and add or remove additional separators. -This file must be valid XML, otherwise the global toolbar UI definition -will be used instead.

-

Your changes are applied once you save the file.

-
-

Note

-
    -
  1. You cannot add new actions which are not listed below.
  2. -
  3. Everything you add or change must be inside the /ui/toolbar/ path.
  4. -
-
-
-
-

Available toolbar elements

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Element nameDescription
NewCreate a new file
OpenOpen an existing file
SaveSave the current file
SaveAllSave all open files
ReloadReload the current file from disk
CloseClose the current file
CloseAllClose all open files
PrintPrint the current file
CutCut the current selection
CopyCopy the current selection
PastePaste the contents of the clipboard
DeleteDelete the current selection
UndoUndo the last modification
RedoRedo the last modification
NavBackNavigate back a location
NavForNavigate forward a location
CompileCompile the current file
BuildBuild the current file, includes a submenu for Make commands. Geany -remembers the last chosen action from the submenu and uses this as default -action when the button itself is clicked.
RunRun or view the current file
ColorOpen a color chooser dialog, to interactively pick colors from a palette
ZoomInZoom in the text
ZoomOutZoom out the text
UnIndentDecrease indentation
IndentIncrease indentation
ReplaceReplace text in the current document
SearchEntryThe search field belonging to the 'Search' element (can be used alone)
SearchFind the entered text in the current file (only useful if you also -use 'SearchEntry')
GotoEntryThe goto field belonging to the 'Goto' element (can be used alone)
GotoJump to the entered line number (only useful if you also use 'GotoEntry')
PreferencesShow the preferences dialog
QuitQuit Geany
-
-
-
-
-

Plugin documentation

-
-

HTML Characters

-

The HTML Characters plugin helps when working with special -characters in XML/HTML, e.g. German Umlauts 眉 and 盲.

-
-

Insert entity dialog

-

When the plugin is enabled, you can insert special character -entities using Tools->Insert Special HTML Characters.

-

This opens up a dialog where you can find a huge amount of special -characters sorted by category that you might like to use inside your -document. You can expand and collapse the categories by clicking on -the little arrow on the left hand side. Once you have found the -desired character click on it and choose "Insert". This will insert -the entity for the character at the current cursor position. You -might also like to double click the chosen entity instead.

-
-
-

Replace special chars by its entity

-

To help make a XML/HTML document valid the plugin supports -replacement of special chars known by the plugin. Both bulk -replacement and immediate replacement during typing are supported.

-
-
A few characters will not be replaced. These are
-
    -
  • "
  • -
  • &
  • -
  • <
  • -
  • >
  • -
  • (&nbsp;)
  • -
-
-
-
-

At typing time

-

You can activate/deactivate this feature using the Tools->HTML -Replacement->Auto-replace Special Characters menu item. If it's -activated, all special characters (beside the given exceptions from -above) known by the plugin will be replaced by their entities.

-

You could also set a keybinding for the plugin to toggle the status -of this feature.

-
-
-

Bulk replacement

-

After inserting a huge amount of text, e.g. by using copy & paste, the -plugin allows bulk replacement of all known characters (beside the -mentioned exceptions). You can find the function under the same -menu at Tools->HTML Replacement->Replace Characters in Selection, or -configure a keybinding for the plugin.

-
-
-
-
-

Save Actions

-
-

Auto Save

-

This plugin provides an option to automatically save documents. -You can choose to save the current document, or all of your documents, at -a given delay.

-
-
-

Save on focus out

-

You can save the current document when the editor's focus goes out. -Every pop-up, menu dialogs, or anything else that can make the editor lose the focus, -will make the current document to be saved.

-
-
-

Instant Save

-

This plugin sets on every new file (File->New or File->New (with template)) -a randomly chosen filename and set its filetype appropriate to the used template -or when no template was used, to a configurable default filetype. -This enables you to quickly compile, build and/or run the new file without the -need to give it an explicit filename using the Save As dialog. This might be -useful when you often create new files just for testing some code or something -similar.

-
-
-

Backup Copy

-

This plugin creates a backup copy of the current file in Geany when it is -saved. You can specify the directory where the backup copy is saved and -you can configure the automatically added extension in the configure dialog -in Geany's plugin manager.

-

After the plugin was loaded in Geany's plugin manager, every file is -copied into the configured backup directory when the file is saved in Geany.

-
-
-
-
-

Contributing to this document

-

This document (geany.txt) is written in reStructuredText -(or "reST"). The source file for it is located in Geany's doc -subdirectory. If you intend on making changes, you should grab the -source right from Git to make sure you've got the newest version. After -editing the file, to build the HTML document to see how your changes -look, run "make doc" in the subdirectory doc of Geany's source -directory. This regenerates the geany.html file. To generate a PDF -file, use the command "make pdf" which should generate a file called -geany-1.24.1.pdf.

-

After you are happy with your changes, create a patch e.g. by using:

-
-% git diff geany.txt > foo.patch
-
-

or even better, by creating a Git-formatted patch which will keep authoring -and description data, by first committing your changes (doing so in a fresh -new branch is recommended for matser not to diverge from upstream) and then -using git format-patch:

-
-% git checkout -b my-documentation-changes # create a fresh branch
-% git commit geany.txt
-Write a good commit message...
-% git format-patch HEAD^
-% git checkout master # go back to master
-
-

and then submit that file to the mailing list for review.

-

Also you can clone the Geany repository at GitHub and send a pull request.

-

Note, you will need the Python docutils software package installed -to build the docs. The package is named python-docutils on Debian -and Fedora systems.

-
-
-

Scintilla keyboard commands

-

Copyright 漏 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>

-

This appendix is distributed under the terms of the License for -Scintilla and SciTE. A copy of this license can be found in the file -scintilla/License.txt included with the source code of this -program and in the appendix of this document. See License for -Scintilla and SciTE.

-

20 June 2006

-
-

Keyboard commands

-

Keyboard commands for Scintilla mostly follow common Windows and GTK+ -conventions. All move keys (arrows, page up/down, home and end) -allows to extend or reduce the stream selection when holding the -Shift key, and the rectangular selection when holding the -appropriate keys (see Column mode editing (rectangular selections)).

-

Some keys may not be available with some national keyboards -or because they are taken by the system such as by a window manager -or GTK. Keyboard equivalents of menu commands are listed in the -menus. Some less common commands with no menu equivalent are:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionShortcut key
Magnify text size.Ctrl-Keypad+
Reduce text size.Ctrl-Keypad-
Restore text size to normal.Ctrl-Keypad/
Indent block.Tab
Dedent block.Shift-Tab
Delete to start of word.Ctrl-BackSpace
Delete to end of word.Ctrl-Delete
Delete to start of line.Ctrl-Shift-BackSpace
Go to start of document.Ctrl-Home
Extend selection to start of document.Ctrl-Shift-Home
Go to start of display line.Alt-Home
Extend selection to start of display line.Alt-Shift-Home
Go to end of document.Ctrl-End
Extend selection to end of document.Ctrl-Shift-End
Extend selection to end of display line.Alt-Shift-End
Previous paragraph. Shift extends selection.Ctrl-Up
Next paragraph. Shift extends selection.Ctrl-Down
Previous word. Shift extends selection.Ctrl-Left
Next word. Shift extends selection.Ctrl-Right
-
-
-
-

Tips and tricks

-
-

Document notebook

-
    -
  • Double-click on empty space in the notebook tab bar to open a -new document.
  • -
  • Middle-click on a document's notebook tab to close the document.
  • -
  • Hold Ctrl and click on any notebook tab to switch to the last used -document.
  • -
  • Double-click on a document's notebook tab to toggle all additional -widgets (to show them again use the View menu or the keyboard -shortcut). The interface pref must be enabled for this to work.
  • -
-
-
-

Editor

-
    -
  • Alt-scroll wheel moves up/down a page.
  • -
  • Ctrl-scroll wheel zooms in/out.
  • -
  • Shift-scroll wheel scrolls 8 characters right/left.
  • -
  • Ctrl-click on a word in a document to perform Go to Tag Definition.
  • -
  • Ctrl-click on a bracket/brace to perform Go to Matching Brace.
  • -
-
-
-

Interface

-
    -
  • Double-click on a symbol-list group to expand or compact it.
  • -
-
- -
-
-

Compile-time options

-

There are some options which can only be changed at compile time, -and some options which are used as the default for configurable -options. To change these options, edit the appropriate source file -in the src subdirectory. Look for a block of lines starting with -#define GEANY_*. Any definitions which are not listed here should -not be changed.

-
-

Note

-

Most users should not need to change these options.

-
-
-

src/geany.h

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescriptionDefault
GEANY_STRING_UNTITLEDA string used as the default name for new -files. Be aware that the string can be -translated, so change it only if you know -what you are doing.untitled
GEANY_WINDOW_MINIMAL_WIDTHThe minimal width of the main window.620
GEANY_WINDOW_MINIMAL_HEIGHTThe minimal height of the main window.440
GEANY_WINDOW_DEFAULT_WIDTHThe default width of the main window at the -first start.900
GEANY_WINDOW_DEFAULT_HEIGHTThe default height of the main window at the -first start.600
Windows specific  
GEANY_USE_WIN32_DIALOGSet this to 1 if you want to use the default -Windows file open and save dialogs instead -GTK's file open and save dialogs. The -default Windows file dialogs are missing -some nice features like choosing a filetype -or an encoding. Do not touch this setting -when building on a non-Win32 system.0
-
-
-

project.h

- ----- - - - - - - - - - - - - -
OptionDescriptionDefault
GEANY_PROJECT_EXTThe default filename extension for Geany -project files. It is used when creating new -projects and as filter mask for the project -open dialog.geany
-
-
-

filetypes.c

- ----- - - - - - - - - - - - - -
OptionDescriptionDefault
GEANY_FILETYPE_SEARCH_LINESThe number of lines to search for the -filetype with the extract filetype regex.2
-
-
-

editor.h

- ----- - - - - - - - - - - - - -
OptionDescriptionDefault
GEANY_WORDCHARSThese characters define word boundaries when -making selections and searching using word -matching options.a string with: -a-z, A-Z, 0-9 and -underscore.
-
-
-

keyfile.c

-

These are default settings that can be overridden in the Preferences dialog.

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescriptionDefault
GEANY_MIN_SYMBOLLIST_CHARSHow many characters you need to type to -trigger the autocompletion list.4
GEANY_DISK_CHECK_TIMEOUTTime in seconds between checking a file for -external changes.30
GEANY_DEFAULT_TOOLS_MAKEThe make tool. This can also include a path."make"
GEANY_DEFAULT_TOOLS_TERMINALA terminal emulator command, see -Terminal emulators.See below.
GEANY_DEFAULT_TOOLS_BROWSERA web browser. This can also include a path."firefox"
GEANY_DEFAULT_TOOLS_PRINTCMDA printing tool. It should be able to accept -and process plain text files. This can also -include a path."lpr"
GEANY_DEFAULT_TOOLS_GREPA grep tool. It should be compatible with -GNU grep. This can also include a path."grep"
GEANY_DEFAULT_MRU_LENGTHThe length of the "Recent files" list.10
GEANY_DEFAULT_FONT_SYMBOL_LISTThe font used in sidebar to show symbols and -open files."Sans 9"
GEANY_DEFAULT_FONT_MSG_WINDOWThe font used in the messages window."Sans 9"
GEANY_DEFAULT_FONT_EDITORThe font used in the editor window."Monospace 10"
GEANY_TOGGLE_MARKA string which is used to mark a toggled -comment."~ "
GEANY_MAX_AUTOCOMPLETE_WORDSHow many autocompletion suggestions should -Geany provide.30
GEANY_DEFAULT_FILETYPE_REGEXThe default regex to extract filetypes from -files.See below.
-

The GEANY_DEFAULT_FILETYPE_REGEX default value is -\*-\s*([^\s]+)\s*-\*- which finds Emacs filetypes.

-

The GEANY_DEFAULT_TOOLS_TERMINAL default value on Windows is:

-
-cmd.exe /Q /C %c
-
-

and on any non-Windows system is:

-
-xterm -e "/bin/sh %c"
-
-
-
-

build.c

- ----- - - - - - - - - - - - - - - - - -
OptionDescriptionDefault
GEANY_BUILD_ERR_HIGHLIGHT_MAXAmount of build error indicators to -be shown in the editor window. -This affects the special coloring -when Geany detects a compiler output line as -an error message and then highlights the -corresponding line in the source code. -Usually only the first few messages are -interesting because following errors are -just after-effects. -All errors in the Compiler window are parsed -and unaffected by this value.50
PRINTBUILDCMDSEvery time a build menu item priority -calculation is run, print the state of the -menu item table in the form of the table -in Build Menu Configuration. May be -useful to debug configuration file -overloading. Warning produces a lot of -output. Can also be enabled/disabled by the -debugger by setting printbuildcmds to 1/0 -overriding the compile setting.FALSE
-
-
-
-

GNU General Public License

-
-            GNU GENERAL PUBLIC LICENSE
-               Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-            GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-             END OF TERMS AND CONDITIONS
-
-        How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
-
-
-

License for Scintilla and SciTE

-

Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>

-

All Rights Reserved

-

Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear in -supporting documentation.

-

NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN -NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE.

-
-
- - - From a4dfc9c12b7a6880ebf5922614823565dc7cfb4a Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 20 Aug 2014 15:52:03 +0200 Subject: [PATCH 085/737] Enable documentation generation automatically when possible --- m4/geany-docutils.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/m4/geany-docutils.m4 b/m4/geany-docutils.m4 index fdd4ebffac..7fcd8f6279 100644 --- a/m4/geany-docutils.m4 +++ b/m4/geany-docutils.m4 @@ -14,9 +14,9 @@ AC_DEFUN([GEANY_CHECK_DOCUTILS_HTML], [ AC_ARG_ENABLE([html-docs], [AS_HELP_STRING([--enable-html-docs], - [generate HTML documentation using rst2html [default=no]])], + [generate HTML documentation using rst2html [default=auto]])], [geany_enable_html_docs="$enableval"], - [geany_enable_html_docs="no"]) + [geany_enable_html_docs="auto"]) AC_ARG_VAR([RST2HTML], [Path to Docutils rst2html executable]) AS_IF([test "x$geany_enable_html_docs" != "xno"], [ @@ -40,9 +40,9 @@ AC_DEFUN([GEANY_CHECK_DOCUTILS_PDF], [ AC_ARG_ENABLE([pdf-docs], [AS_HELP_STRING([--enable-pdf-docs], - [generate PDF documentation using rst2pdf [default=no]])], + [generate PDF documentation using rst2pdf [default=auto]])], [geany_enable_pdf_docs="$enableval"], - [geany_enable_pdf_docs="no"]) + [geany_enable_pdf_docs="auto"]) AC_ARG_VAR([RST2PDF], [Path to Docutils rst2pdf executable]) AS_IF([test "x$geany_enable_pdf_docs" != "xno"], [ From 602ae0b324397d25a587af35738e5f034526a1e2 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 20 Aug 2014 16:40:25 +0200 Subject: [PATCH 086/737] Properly remove generated HTML documentation on clean --- doc/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 06c73d2e6e..59f5ae04d8 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -60,8 +60,7 @@ all-html-local: geany.html hacking.html clean-html-local: -rm -f hacking.html -# FIXME: why is the generated HTML manual checked-in to VCS? -# -rm -f geany.html + -rm -f geany.html else all-html-local:; From c990cd9dca40ac67a7404ed2ba36b3c6e134e13b Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Thu, 14 Aug 2014 12:25:14 +0100 Subject: [PATCH 087/737] Properly handle existing session when creating new project Ask whether to adopt the existing session documents. Also fixes the existing bug of not reloading the default session when an existing project is open and a new project is cancelled. --- src/keyfile.c | 56 ++++++++++++++++++++++++++++++++++----------------- src/keyfile.h | 2 ++ src/project.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 91 insertions(+), 23 deletions(-) diff --git a/src/keyfile.c b/src/keyfile.c index 91296e38bd..86b6ef8654 100644 --- a/src/keyfile.c +++ b/src/keyfile.c @@ -329,10 +329,23 @@ static gchar *get_session_file_string(GeanyDocument *doc) } +static void remove_session_files(GKeyFile *config) +{ + gchar **ptr; + gchar **keys = g_key_file_get_keys(config, "files", NULL, NULL); + + foreach_strv(ptr, keys) + { + if (g_str_has_prefix(*ptr, "FILE_NAME_")) + g_key_file_remove_key(config, "files", *ptr, NULL); + } + g_strfreev(keys); +} + + void configuration_save_session_files(GKeyFile *config) { gint npage; - gchar *tmp; gchar entry[16]; guint i = 0, j = 0, max; GeanyDocument *doc; @@ -340,6 +353,9 @@ void configuration_save_session_files(GKeyFile *config) npage = gtk_notebook_get_current_page(GTK_NOTEBOOK(main_widgets.notebook)); g_key_file_set_integer(config, "files", "current_page", npage); + // clear existing entries first as they might not all be overwritten + remove_session_files(config); + /* store the filenames in the notebook tab order to reopen them the next time */ max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)); for (i = 0; i < max; i++) @@ -356,23 +372,6 @@ void configuration_save_session_files(GKeyFile *config) j++; } } - /* if open filenames less than saved session files, delete existing entries in the list */ - i = j; - while (TRUE) - { - g_snprintf(entry, sizeof(entry), "FILE_NAME_%d", i); - tmp = g_key_file_get_string(config, "files", entry, NULL); - if (G_UNLIKELY(tmp == NULL)) - { - break; - } - else - { - g_key_file_remove_key(config, "files", entry, NULL); - g_free(tmp); - i++; - } - } #ifdef HAVE_VTE if (vte_info.have_vte) @@ -1047,6 +1046,27 @@ void configuration_save_default_session(void) } +void configuration_clear_default_session(void) +{ + gchar *configfile = g_build_filename(app->configdir, "geany.conf", NULL); + gchar *data; + GKeyFile *config = g_key_file_new(); + + g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE, NULL); + + if (cl_options.load_session) + remove_session_files(config); + + /* write the file */ + data = g_key_file_to_data(config, NULL, NULL); + utils_write_file(configfile, data); + g_free(data); + + g_key_file_free(config); + g_free(configfile); +} + + /* * Only reload the session part of the default configuration */ diff --git a/src/keyfile.h b/src/keyfile.h index 99def96334..717ba9dbd0 100644 --- a/src/keyfile.h +++ b/src/keyfile.h @@ -50,6 +50,8 @@ void configuration_reload_default_session(void); void configuration_save_default_session(void); +void configuration_clear_default_session(void); + void configuration_load_session_files(GKeyFile *config, gboolean read_recent_files); void configuration_save_session_files(GKeyFile *config); diff --git a/src/project.c b/src/project.c index 5ae97edde3..78c457ff1f 100644 --- a/src/project.c +++ b/src/project.c @@ -99,6 +99,16 @@ static void init_stash_prefs(void); #define PROJECT_DIR _("projects") +// returns whether we have working documents open +static gboolean have_session_docs(void) +{ + gint npages = gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)); + GeanyDocument *doc = document_get_current(); + + return npages > 1 || (npages == 1 && (doc->file_name || doc->changed)); +} + + /* TODO: this should be ported to Glade like the project preferences dialog, * then we can get rid of the PropertyDialogElements struct altogether as * widgets pointers can be accessed through ui_lookup_widget(). */ @@ -113,6 +123,27 @@ void project_new(void) gchar *tooltip; PropertyDialogElements e = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, FALSE }; + if (!app->project && project_prefs.project_session) + { + /* save session in case the dialog is cancelled */ + configuration_save_default_session(); + /* don't ask if the only doc is an unmodified new doc */ + if (have_session_docs()) + { + if (dialogs_show_question( + _("Move the current documents into the new project's session?"))) + { + // don't reload session on closing project + configuration_clear_default_session(); + } + else + { + if (!document_close_all()) + return; + } + } + } + if (! project_ask_close()) return; @@ -194,22 +225,36 @@ void project_new(void) gtk_widget_show_all(e.dialog); - while (gtk_dialog_run(GTK_DIALOG(e.dialog)) == GTK_RESPONSE_OK) + while (1) { + if (gtk_dialog_run(GTK_DIALOG(e.dialog)) != GTK_RESPONSE_OK) + { + // reload any documents that were closed + if (!app->project && !have_session_docs()) + { + configuration_reload_default_session(); + configuration_open_files(); + } + break; + } if (update_config(&e, TRUE)) { + // app->project is now set if (!write_config(TRUE)) + { SHOW_ERR(_("Project file could not be written")); + } else { ui_set_statusbar(TRUE, _("Project \"%s\" created."), app->project->name); - ui_add_recent_project_file(app->project->file_name); break; } } } gtk_widget_destroy(e.dialog); + document_new_file_if_non_open(); + ui_focus_current_document(); } @@ -220,7 +265,6 @@ gboolean project_load_file_with_session(const gchar *locale_file_name) if (project_prefs.project_session) { configuration_open_files(); - /* open a new file if no other file was opened */ document_new_file_if_non_open(); ui_focus_current_document(); } @@ -328,6 +372,7 @@ static void update_ui(void) ui_set_window_title(NULL); build_menu_update(NULL); + // update project name sidebar_openfiles_update_all(); } @@ -398,7 +443,6 @@ void project_close(gboolean open_default) { configuration_reload_default_session(); configuration_open_files(); - /* open a new file if no other file was opened */ document_new_file_if_non_open(); ui_focus_current_document(); } @@ -633,6 +677,7 @@ static GeanyProject *create_project(void) /* Verifies data for New & Properties dialogs. + * Creates app->project if NULL. * Returns: FALSE if the user needs to change any data. */ static gboolean update_config(const PropertyDialogElements *e, gboolean new_project) { @@ -1009,12 +1054,13 @@ static gboolean load_config(const gchar *filename) build_load_menu(config, GEANY_BCS_PROJ, (gpointer)p); if (project_prefs.project_session) { - /* save current (non-project) session (it could has been changed since program startup) */ + /* save current (non-project) session (it could have been changed since program startup) */ configuration_save_default_session(); /* now close all open files */ document_close_all(); /* read session files so they can be opened with configuration_open_files() */ configuration_load_session_files(config, FALSE); + document_new_file_if_non_open(); ui_focus_current_document(); } g_signal_emit_by_name(geany_object, "project-open", config); From 288b4f29d8a62a5cc2baa6f0ddefa6a3fe201ade Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 23 Aug 2014 17:56:14 +0200 Subject: [PATCH 088/737] Enable HTML manual building by default but for distribution tarballs Enable building of the HTML manual by default unless not building from Git and with an existing local copy (which is included in distribution tarballs). This makes sure we can install the HTML manual without having it checked in VCS, yet not require rst2html for tarball builds. --- m4/geany-docutils.m4 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/m4/geany-docutils.m4 b/m4/geany-docutils.m4 index 7fcd8f6279..75c27284db 100644 --- a/m4/geany-docutils.m4 +++ b/m4/geany-docutils.m4 @@ -12,11 +12,19 @@ dnl For HTML documentation generation dnl AC_DEFUN([GEANY_CHECK_DOCUTILS_HTML], [ + AC_REQUIRE([GEANY_CHECK_REVISION]) + + dnl we require rst2html by default unless we don't build from Git + dnl and already have the HTML manual built in-tree + html_docs_default=yes + AS_IF([test "$REVISION" = "-1" && test -f "$srcdir/doc/geany.html"], + [html_docs_default=auto]) + AC_ARG_ENABLE([html-docs], [AS_HELP_STRING([--enable-html-docs], [generate HTML documentation using rst2html [default=auto]])], [geany_enable_html_docs="$enableval"], - [geany_enable_html_docs="auto"]) + [geany_enable_html_docs="$html_docs_default"]) AC_ARG_VAR([RST2HTML], [Path to Docutils rst2html executable]) AS_IF([test "x$geany_enable_html_docs" != "xno"], [ @@ -26,7 +34,9 @@ dnl TODO: try rst2html.py first AS_IF([test "x$RST2HTML" != "xno"], [geany_enable_html_docs="yes"], [test "x$geany_enable_html_docs" = "xyes"], - [AC_MSG_ERROR([Documentation enabled but rst2html not found])], + [AC_MSG_ERROR([Documentation enabled but rst2html not found. +You can explicitly disable building of the HTML manual with --disable-html-docs, +but you then may not have a local copy of the HTML manual.])], [geany_enable_html_docs="no"]) ]) AM_CONDITIONAL([WITH_RST2HTML], [test "x$geany_enable_html_docs" != "xno"]) From 74006b069c1525af2d52cc8d488d8cbe03dd43a1 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 23 Aug 2014 18:14:56 +0200 Subject: [PATCH 089/737] Cleanup doc Makefile so that each conditional set all its targets Don't set clean-local and all-local dependencies all together at the end and rather let each section add the appropriate dependencies. This makes each conditional more self-contained, and is safe as Make allows adding extra dependencies to existing targets. --- doc/Makefile.am | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 59f5ae04d8..e0cc725706 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -56,15 +56,13 @@ geany.html: $(srcdir)/geany.css $(srcdir)/geany.txt hacking.html: $(srcdir)/geany.css $(top_srcdir)/HACKING $(AM_V_GEN)$(RST2HTML) -stg --stylesheet=$(srcdir)/geany.css $(top_srcdir)/HACKING $@ -all-html-local: geany.html hacking.html +all-local: geany.html hacking.html +clean-local: clean-html-local clean-html-local: -rm -f hacking.html -rm -f geany.html -else -all-html-local:; -clean-html-local:; endif # PDF user manual @@ -73,14 +71,12 @@ if WITH_RST2PDF geany-$(VERSION).pdf: geany.txt $(AM_V_GEN)$(RST2PDF) $(srcdir)/geany.txt -o $@ -all-pdf-local: geany-$(VERSION).pdf +all-local: geany-$(VERSION).pdf +clean-local: clean-pdf-local clean-pdf-local: -rm -f geany-$(VERSION).pdf -else -all-pdf-local:; -clean-pdf-local:; endif # API Documentation @@ -99,19 +95,14 @@ doxygen_sources = \ Doxyfile.stamp: Doxyfile $(doxygen_sources) $(AM_V_GEN)$(DOXYGEN) Doxyfile && echo "" > $@ -all-api-docs-local: Doxyfile.stamp +all-local: Doxyfile.stamp +clean-local: clean-api-docs-local clean-api-docs-local: -rm -rf reference/ Doxyfile.stamp -else -all-api-docs-local:; -clean-api-docs-local:; endif -all-local: all-html-local all-pdf-local all-api-docs-local -clean-local: clean-html-local clean-pdf-local clean-api-docs-local - uninstall-local: rm -rf $(DOCDIR); From 32bda2e6cb1d6c0ecafebd70c12f3e09d1aae269 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 23 Aug 2014 18:22:52 +0200 Subject: [PATCH 090/737] Don't clean HTML manual if we didn't build it Clean the HTML manual upon 'maintainer-clean' rather than 'clean' in case it was not built by Make but rather part of the distribution. This is fine even then, as configure will properly require what is needed to build it again if it is missing. --- doc/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index e0cc725706..2a25e8ed92 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -58,7 +58,11 @@ hacking.html: $(srcdir)/geany.css $(top_srcdir)/HACKING all-local: geany.html hacking.html -clean-local: clean-html-local +# clean on 'maintainer-clean' rather than 'clean' in case it was not +# built by Make but rather part of the distribution. This is fine even +# then, as configure will properly require what is needed to build it +# again if it is missing. +maintainer-clean-local: clean-html-local clean-html-local: -rm -f hacking.html -rm -f geany.html From ee79b2eb3f8f79112eca28c4974b355bdbef230e Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 23 Aug 2014 18:33:50 +0200 Subject: [PATCH 091/737] Enable API documentation generation automatically when possible --- m4/geany-doxygen.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/geany-doxygen.m4 b/m4/geany-doxygen.m4 index 5c5cbec7e0..27edd7f365 100644 --- a/m4/geany-doxygen.m4 +++ b/m4/geany-doxygen.m4 @@ -7,7 +7,7 @@ AC_DEFUN([GEANY_CHECK_DOXYGEN], [AS_HELP_STRING([--enable-api-docs], [generate API documentation using Doxygen [default=no]])], [geany_with_doxygen="$enableval"], - [geany_with_doxygen="no"]) + [geany_with_doxygen="auto"]) AC_ARG_VAR([DOXYGEN], [Path to Doxygen executable]) From 132b93c591f79907f16360e133a43886f7bba1c2 Mon Sep 17 00:00:00 2001 From: Frank Lanitz Date: Mon, 25 Aug 2014 13:31:12 +0200 Subject: [PATCH 092/737] SQL: Adding print to list of keywords e.g. used to 'print' debug output to log on e.g. Sybase ASA --- data/filetypes.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/filetypes.sql b/data/filetypes.sql index d42a8ee0e3..859de9c8ea 100644 --- a/data/filetypes.sql +++ b/data/filetypes.sql @@ -22,7 +22,7 @@ quotedidentifier=identifier_2 [keywords] # all items must be in one line -keywords=absolute action add admin after aggregate alias all allocate alter and any are array as asc assertion at authorization auto_increment before begin bfile bigint binary bit blob bool boolean both breadth by call cascade cascaded case cast catalog char charset character check class client clob close cluster collate collation column comment commit completion connect connection constraint constraints constructor continue corresponding create cross cube current current_date current_path current_role current_time current_timestamp current_user cursor cycle data date day deallocate dec decimal declare default deferrable deferred delete depth deref desc describe descriptor destroy destructor deterministic diagnostics dictionary dimension disconnect diskgroup distinct domain double drop dynamic each else elsif end end-exec engine equals escape every except exception exec execute exists explain external false fetch first fixed flashback float for foreign found from free full function general get global go goto grant group grouping having hold host hour identity if ignore immediate in index indextype indicator initialize initially inner inout input insert int integer intersect interval into is isolation iterate join key language large last lateral leading left less level like limit local localtime localtimestamp locator log long loop map match materialized mediumblob mediumint mediumtext merge message middleint minus minute modifies modify module month names national natural nchar nclob new next no noaudit none not null numeric nvarchar2 object of off old on only open operation option or order ordinality out outer output owner package pad parameter parameters partial path postfix precision prefix preorder prepare preserve primary prior privileges procedure profile public purge raise read reads real recursive ref references referencing regexp regexp_like relative rename replace restrict result return returning returns revoke right role rollback rollup routine row rows savepoint schema scroll scope search second section select sequence session session_user serial set sets size smallint some space specific specifictype sql sqlexception sqlstate sqlwarning start state statement static structure synonym system_user table tablespace temporary terminate text than then time timestamp timezone_hour timezone_minute tinyint to trailing transaction translation treat trigger true truncate type under union unique uniqueidentifier unknown unnest unsigned update usage user using value values varchar varchar2 variable varying view when whenever where while with without work write year zone +keywords=absolute action add admin after aggregate alias all allocate alter and any are array as asc assertion at authorization auto_increment before begin bfile bigint binary bit blob bool boolean both breadth by call cascade cascaded case cast catalog char charset character check class client clob close cluster collate collation column comment commit completion connect connection constraint constraints constructor continue corresponding create cross cube current current_date current_path current_role current_time current_timestamp current_user cursor cycle data date day deallocate dec decimal declare default deferrable deferred delete depth deref desc describe descriptor destroy destructor deterministic diagnostics dictionary dimension disconnect diskgroup distinct domain double drop dynamic each else elsif end end-exec engine equals escape every except exception exec execute exists explain external false fetch first fixed flashback float for foreign found from free full function general get global go goto grant group grouping having hold host hour identity if ignore immediate in index indextype indicator initialize initially inner inout input insert int integer intersect interval into is isolation iterate join key language large last lateral leading left less level like limit local localtime localtimestamp locator log long loop map match materialized mediumblob mediumint mediumtext merge message middleint minus minute modifies modify module month names national natural nchar nclob new next no noaudit none not null numeric nvarchar2 object of off old on only open operation option or order ordinality out outer output owner package pad parameter parameters partial path postfix precision prefix preorder prepare preserve primary print prior privileges procedure profile public purge raise read reads real recursive ref references referencing regexp regexp_like relative rename replace restrict result return returning returns revoke right role rollback rollup routine row rows savepoint schema scroll scope search second section select sequence session session_user serial set sets size smallint some space specific specifictype sql sqlexception sqlstate sqlwarning start state statement static structure synonym system_user table tablespace temporary terminate text than then time timestamp timezone_hour timezone_minute tinyint to trailing transaction translation treat trigger true truncate type under union unique uniqueidentifier unknown unnest unsigned update usage user using value values varchar varchar2 variable varying view when whenever where while with without work write year zone [settings] # default extension used when saving files From 5964d2e086d60005fd677e9c107729a78ecd37bf Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Thu, 21 Aug 2014 17:15:21 +0100 Subject: [PATCH 093/737] Properly close abandoned new project that couldn't be written Also rewrite the default session in case it was cleared. --- src/project.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/project.c b/src/project.c index 78c457ff1f..363d6cb7c0 100644 --- a/src/project.c +++ b/src/project.c @@ -89,6 +89,7 @@ static void on_entries_changed(GtkEditable *editable, PropertyDialogElements *e) static void on_radio_long_line_custom_toggled(GtkToggleButton *radio, GtkWidget *spin_long_line); static void apply_editor_prefs(void); static void init_stash_prefs(void); +static void destroy_project(gboolean open_default); #define SHOW_ERR(args) dialogs_show_msgbox(GTK_MESSAGE_ERROR, args) @@ -229,20 +230,26 @@ void project_new(void) { if (gtk_dialog_run(GTK_DIALOG(e.dialog)) != GTK_RESPONSE_OK) { - // reload any documents that were closed - if (!app->project && !have_session_docs()) + // any open docs were meant to be moved into the project + // rewrite default session because it was cleared + if (have_session_docs()) + configuration_save_default_session(); + else { + // reload any documents that were closed configuration_reload_default_session(); configuration_open_files(); } break; } + // dialog confirmed if (update_config(&e, TRUE)) { // app->project is now set if (!write_config(TRUE)) { SHOW_ERR(_("Project file could not be written")); + destroy_project(FALSE); } else { @@ -393,8 +400,6 @@ static void remove_foreach_project_filetype(gpointer data, gpointer user_data) /* open_default will make function reload default session files on close */ void project_close(gboolean open_default) { - GSList *node; - g_return_if_fail(app->project != NULL); /* save project session files, etc */ @@ -408,6 +413,15 @@ void project_close(gboolean open_default) return; } ui_set_statusbar(TRUE, _("Project \"%s\" closed."), app->project->name); + destroy_project(open_default); +} + + +static void destroy_project(gboolean open_default) +{ + GSList *node; + + g_return_if_fail(app->project != NULL); /* remove project filetypes build entries */ if (app->project->priv->build_filetypes_list != NULL) From 355f0c804ebab24e03339aa6498bd7f0d79a7883 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Fri, 22 Aug 2014 12:00:33 +0100 Subject: [PATCH 094/737] Fix GLib warning 'app->project == NULL failed' Occurred on Project->New with an existing project when closing an unsaved file was cancelled. --- src/project.c | 10 +++++----- src/project.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/project.c b/src/project.c index 363d6cb7c0..7d203326e1 100644 --- a/src/project.c +++ b/src/project.c @@ -398,9 +398,9 @@ static void remove_foreach_project_filetype(gpointer data, gpointer user_data) /* open_default will make function reload default session files on close */ -void project_close(gboolean open_default) +gboolean project_close(gboolean open_default) { - g_return_if_fail(app->project != NULL); + g_return_val_if_fail(app->project != NULL, FALSE); /* save project session files, etc */ if (!write_config(FALSE)) @@ -410,10 +410,11 @@ void project_close(gboolean open_default) { /* close all existing tabs first */ if (!document_close_all()) - return; + return FALSE; } ui_set_statusbar(TRUE, _("Project \"%s\" closed."), app->project->name); destroy_project(open_default); + return TRUE; } @@ -659,8 +660,7 @@ gboolean project_ask_close(void) _("Do you want to close it before proceeding?"), _("The '%s' project is open."), app->project->name)) { - project_close(FALSE); - return TRUE; + return project_close(FALSE); } else return FALSE; diff --git a/src/project.h b/src/project.h index 92d8315bd7..0abfb4416a 100644 --- a/src/project.h +++ b/src/project.h @@ -66,7 +66,7 @@ void project_new(void); void project_open(void); -void project_close(gboolean open_default); +gboolean project_close(gboolean open_default); void project_properties(void); From 64910a4ea1f3f902ffa08dfdf6422c8e69ad98fd Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 27 Aug 2014 19:02:24 +0200 Subject: [PATCH 095/737] Fix Waf build after HTML documentation untracking --- wscript | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wscript b/wscript index 22f347fcdb..798fbc6c19 100644 --- a/wscript +++ b/wscript @@ -514,6 +514,11 @@ def build(bld): 'top_builddir': bld.out_dir, 'top_srcdir': bld.top_dir,}) + # build HTML documentation if it is not part of the tree already, as it is required for install + # FIXME: replace this with automatic building if source changed/destination is missing + if not bld.path.find_resource('doc/geany.html'): + htmldoc(bld) + ### # Install files ### From 7047152a1f3ee79cd4e08dd77d1fe9039acc9834 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Fri, 29 Aug 2014 12:18:53 +0100 Subject: [PATCH 096/737] Allow user to edit open dialog filename when file doesn't exist --- src/dialogs.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/dialogs.c b/src/dialogs.c index 86e0f9a5cf..c0d1dd84e8 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -123,8 +123,10 @@ static void file_chooser_set_filter_idx(GtkFileChooser *chooser, guint idx) } -static void open_file_dialog_handle_response(GtkWidget *dialog, gint response) +static gboolean open_file_dialog_handle_response(GtkWidget *dialog, gint response) { + gboolean ret = TRUE; + if (response == GTK_RESPONSE_ACCEPT || response == GEANY_RESPONSE_VIEW) { GSList *filelist; @@ -150,7 +152,18 @@ static void open_file_dialog_handle_response(GtkWidget *dialog, gint response) filelist = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog)); if (filelist != NULL) { - document_open_files(filelist, ro, ft, charset); + const gchar *first = filelist->data; + + // When there's only one filename it may have been typed manually + if (!filelist->next && !g_file_test(first, G_FILE_TEST_EXISTS)) + { + dialogs_show_msgbox(GTK_MESSAGE_ERROR, _("\"%s\" was not found."), first); + ret = FALSE; + } + else + { + document_open_files(filelist, ro, ft, charset); + } g_slist_foreach(filelist, (GFunc) g_free, NULL); /* free filenames */ } g_slist_free(filelist); @@ -158,6 +171,7 @@ static void open_file_dialog_handle_response(GtkWidget *dialog, gint response) if (app->project && !EMPTY(app->project->base_path)) gtk_file_chooser_remove_shortcut_folder(GTK_FILE_CHOOSER(dialog), app->project->base_path, NULL); + return ret; } @@ -456,7 +470,6 @@ void dialogs_show_open_file(void) #endif { GtkWidget *dialog = create_open_file_dialog(); - gint response; open_file_dialog_apply_settings(dialog); @@ -467,8 +480,8 @@ void dialogs_show_open_file(void) gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog), app->project->base_path, NULL); - response = gtk_dialog_run(GTK_DIALOG(dialog)); - open_file_dialog_handle_response(dialog, response); + while (!open_file_dialog_handle_response(dialog, + gtk_dialog_run(GTK_DIALOG(dialog)))); gtk_widget_destroy(dialog); } g_free(initdir); From 8d5e666d9eab5518f300b45a71295027b2e9047a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 29 Aug 2014 14:10:56 +0200 Subject: [PATCH 097/737] Build HTML documentation automatically during the build process This is an improvement as requested in #322 to update the HTML docs after geany.txt or geany.css have changed. Also, with this change the resulting HTML will be generated in the outdir, not in srcdir/doc anymore. --- wscript | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/wscript b/wscript index 798fbc6c19..fb4227b510 100644 --- a/wscript +++ b/wscript @@ -232,6 +232,9 @@ def configure(conf): conf.env['minimum_gtk_version'] = minimum_gtk_version conf.env['use_gtk3'] = conf.options.use_gtk3 + # rst2html for the HTML manual + conf.env['RST2HTML'] = _find_rst2html(conf) + # Windows specials if is_win32: if conf.env['PREFIX'].lower() == tempfile.gettempdir().lower(): @@ -456,6 +459,18 @@ def build(bld): install_path = '${LOCALEDIR}', appname = 'geany') + # HTML documentation (build if it is not part of the tree already, as it is required for install) + html_doc_filename = os.path.join(bld.out_dir, 'doc', 'geany.html') + if bld.env['RST2HTML']: + rst2html = bld.env['RST2HTML'] + bld( + source = ['doc/geany.txt'], + deps = ['doc/geany.css'], + target = 'doc/geany.html', + name = 'geany.html', + cwd = os.path.join(bld.path.abspath(), 'doc'), + rule = '%s -stg --stylesheet=geany.css geany.txt %s' % (rst2html, html_doc_filename)) + # geany.pc if is_win32: # replace backward slashes by forward slashes as they could be interepreted as escape @@ -514,11 +529,6 @@ def build(bld): 'top_builddir': bld.out_dir, 'top_srcdir': bld.top_dir,}) - # build HTML documentation if it is not part of the tree already, as it is required for install - # FIXME: replace this with automatic building if source changed/destination is missing - if not bld.path.find_resource('doc/geany.html'): - htmldoc(bld) - ### # Install files ### @@ -541,18 +551,21 @@ def build(bld): # Docs base_dir = '${PREFIX}' if is_win32 else '${DOCDIR}' ext = '.txt' if is_win32 else '' - html_dir = '' if is_win32 else 'html/' - html_name = 'Manual.html' if is_win32 else 'index.html' for filename in 'AUTHORS ChangeLog COPYING README NEWS THANKS TODO'.split(): basename = _uc_first(filename, bld) destination_filename = '%s%s' % (basename, ext) destination = os.path.join(base_dir, destination_filename) bld.install_as(destination, filename) - start_dir = bld.path.find_dir('doc/images') - bld.install_files('${DOCDIR}/%simages' % html_dir, start_dir.ant_glob('*.png'), cwd=start_dir) + # install HTML documentation only if it exists, i.e. it was built before + if os.path.exists(html_doc_filename): + html_dir = '' if is_win32 else 'html/' + html_name = 'Manual.html' if is_win32 else 'index.html' + start_dir = bld.path.find_dir('doc/images') + bld.install_files('${DOCDIR}/%simages' % html_dir, start_dir.ant_glob('*.png'), cwd=start_dir) + bld.install_as('${DOCDIR}/%s%s' % (html_dir, html_name), 'doc/geany.html') + bld.install_as('${DOCDIR}/%s' % _uc_first('manual.txt', bld), 'doc/geany.txt') - bld.install_as('${DOCDIR}/%s%s' % (html_dir, html_name), 'doc/geany.html') bld.install_as('${DOCDIR}/ScintillaLicense.txt', 'scintilla/License.txt') if is_win32: bld.install_as('${DOCDIR}/ReadMe.I18n.txt', 'README.I18N') @@ -677,16 +690,6 @@ def apidoc(ctx): os.chdir('..') -def htmldoc(ctx): - """generate HTML documentation""" - # first try rst2html.py as it is the upstream default, fall back to rst2html - cmd = _find_rst2html(ctx) - os.chdir('doc') - Logs.pprint('CYAN', 'Generating HTML documentation') - ctx.exec_command('%s -stg --stylesheet=geany.css %s %s' % (cmd, 'geany.txt', 'geany.html')) - os.chdir('..') - - def _find_program(ctx, cmd, **kw): def noop(*args): pass From 15c2fafff6b76cb6d7e2032840832bae14a5aa7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 29 Aug 2014 14:11:14 +0200 Subject: [PATCH 098/737] Update Waf to 1.7.16 --- waf | Bin 90923 -> 91846 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/waf b/waf index b4bf4cf4e9b2e9c1848329f528fa9d01ee78788c..89e1ca8b7d35fec345627df5caedfe4cce6346e3 100755 GIT binary patch delta 88618 zcmZU4RaBi#uq6=m!onfAopZ22aCdii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RlBPR3(j279w1BTQUbAM|+hwz6wdg%g5ZsVYrpUFNcn#gHQ z7aZ`SiKN)sgx>}D;IuT3I8D-RJ8v#|AtYg~fvgr^cehN8Ecsz6O#|oIy92M03AjdQ zq@KB5%tGrhBPl|cBsU|e0thIfprIg;BPK_LBPnQ}PBLYU1pawM9h1-f$w47;Y zRDTXNXm}69_i?j&ho0;fP<0r6l!b?Z86*e%gRr}_C?IW}1C9%lB-u*r!{_YwmB07+ z_?JlXb1v#=`=!Ul$L2@d{}Jx@?M|!l$F)T?QRF?VsDPLLm#Fi@yC*<#eLIBQLhJr9 zfKY8s$?_cFC;1==0s?*PyRW^zwR>r*>C!Z^+WwXx%;2h+ai80ParNJ2+_UHbbk=m zKTS38GQ?BV6H@;{NT7eM*&d(#|LANyEARNN*=)%rZjv{gr>&TD`1sSmz{Au4a*p;C zczd-YCItRGPs`ME=zBcpH~EjEC)4}1{LnSSC=mK6BPOvbBJu){Fr=aqoSujYfAX>% z6sUw;A}&jEHw5DSxlVAusq`Lg6}ulYdx@sQhYC|I&*uOOBPS@p+P| zoDhDD*890*F%I_}L)+t-!?uWH;DakRe13e$TPWNuSZgJX_;^HGVzsNnOl|s}&##Ac zgN3#>nR?GG@^F56-kA7Gh`#EO*A|i_p}cJyc@}J0!w&PHue1 hf0Rf=!R_{Yf+7ST|BJaIoG3_ECW5+v3L`u{JqqPJNSy!x From 985cd9146ffae3ab6022c5127946f6f594378a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 29 Aug 2014 14:13:57 +0200 Subject: [PATCH 099/737] Add "hackingdoc" as proper action and remove non-working --hackingdoc option --- wscript | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/wscript b/wscript index fb4227b510..188daccd66 100644 --- a/wscript +++ b/wscript @@ -343,9 +343,6 @@ def options(opt): help='documentation root', dest='docdir') opt.add_option('--libdir', type='string', default='', help='object code libraries', dest='libdir') - # Actions - opt.add_option('--hackingdoc', action='store_true', default=False, - help='generate HTML documentation from HACKING file', dest='hackingdoc') def build(bld): @@ -690,6 +687,17 @@ def apidoc(ctx): os.chdir('..') +def hackingdoc(ctx): + """generate HACKING documentation""" + os.chdir('doc') + Logs.pprint('CYAN', 'Generating HACKING documentation') + cmd = _find_rst2html(ctx) + ret = ctx.exec_command('%s -stg --stylesheet=geany.css %s %s' % (cmd, '../HACKING', 'hacking.html')) + if ret != 0: + raise WafError('Generating HACKING documentation failed') + os.chdir('..') + + def _find_program(ctx, cmd, **kw): def noop(*args): pass From 8961f0b6e96de3591aa30b3886572147c4321c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 29 Aug 2014 14:27:12 +0200 Subject: [PATCH 100/737] Add option --disable-html-docs --- wscript | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index 188daccd66..d18d532f96 100644 --- a/wscript +++ b/wscript @@ -233,7 +233,14 @@ def configure(conf): conf.env['use_gtk3'] = conf.options.use_gtk3 # rst2html for the HTML manual - conf.env['RST2HTML'] = _find_rst2html(conf) + if not conf.options.no_html_doc: + try: + conf.env['RST2HTML'] = _find_rst2html(conf) + except WafError: + error_msg = '''Documentation enabled but rst2html not found. +You can explicitly disable building of the HTML manual with --disable-html-docs, +but you then may not have a local copy of the HTML manual.''' + raise WafError(error_msg) # Windows specials if is_win32: @@ -336,6 +343,9 @@ def options(opt): opt.add_option('--enable-gtk3', action='store_true', default=False, help='compile with GTK3 support (experimental) [[default: No]', dest='use_gtk3') + opt.add_option('--disable-html-docs', action='store_true', default=False, + help='do not generate HTML documentation using rst2html [[default: No]', + dest='no_html_doc') # Paths opt.add_option('--mandir', type='string', default='', help='man documentation', dest='mandir') From 6ecf750759b0611542586818b27a0638f23fb97f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 29 Aug 2014 14:39:26 +0200 Subject: [PATCH 101/737] The missing bits for HTML docs: only on GIT build and support in-tree geany.html --- wscript | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wscript b/wscript index d18d532f96..5e5e915a1a 100644 --- a/wscript +++ b/wscript @@ -232,8 +232,10 @@ def configure(conf): conf.env['minimum_gtk_version'] = minimum_gtk_version conf.env['use_gtk3'] = conf.options.use_gtk3 + revision = _get_git_rev(conf) + # rst2html for the HTML manual - if not conf.options.no_html_doc: + if not conf.options.no_html_doc and revision is not None: try: conf.env['RST2HTML'] = _find_rst2html(conf) except WafError: @@ -275,8 +277,6 @@ but you then may not have a local copy of the HTML manual.''' _define_from_opt(conf, 'LIBDIR', conf.options.libdir, libdir) _define_from_opt(conf, 'MANDIR', conf.options.mandir, mandir) - revision = _get_git_rev(conf) - conf.define('ENABLE_NLS', 1) conf.define('GEANY_LOCALEDIR', '' if is_win32 else conf.env['LOCALEDIR'], quote=True) conf.define('GEANY_DATADIR', 'data' if is_win32 else conf.env['DATADIR'], quote=True) @@ -565,7 +565,9 @@ def build(bld): bld.install_as(destination, filename) # install HTML documentation only if it exists, i.e. it was built before - if os.path.exists(html_doc_filename): + # local_html_doc_filename supports installing HTML doc from in-tree geany.html if it exists + local_html_doc_filename = os.path.join(bld.path.abspath(), 'doc', 'geany.html') + if os.path.exists(html_doc_filename) or os.path.exists(local_html_doc_filename): html_dir = '' if is_win32 else 'html/' html_name = 'Manual.html' if is_win32 else 'index.html' start_dir = bld.path.find_dir('doc/images') From 9307a6877c75169118672e453c55b54fd9a6ab3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 29 Aug 2014 15:40:47 +0200 Subject: [PATCH 102/737] Explicitly specify extensions when searching for rst2html This is cleaner than searching for rst2html and rst2html.py since Waf offers the API for this and this change enables Windows support. While at it, add binary name 'rst2html2' for ArchLinux support. --- wscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index 5e5e915a1a..458632cf40 100644 --- a/wscript +++ b/wscript @@ -721,9 +721,9 @@ def _find_program(ctx, cmd, **kw): def _find_rst2html(ctx): - cmds = ['rst2html.py', 'rst2html'] + cmds = ['rst2html', 'rst2html2'] for command in cmds: - cmd = _find_program(ctx, command, mandatory=False) + cmd = _find_program(ctx, command, mandatory=False, exts=',.py') if cmd: break if not cmd: From 5bd878cb7cab25beed42166e42fe67690207e9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 29 Aug 2014 15:46:44 +0200 Subject: [PATCH 103/737] Reuse ConfigurationContext when searching for programs if we have one This enables proper logging when checking for rst2html during configuration. --- wscript | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wscript b/wscript index 458632cf40..06f6a3b13c 100644 --- a/wscript +++ b/wscript @@ -714,9 +714,10 @@ def _find_program(ctx, cmd, **kw): def noop(*args): pass - ctx = ConfigurationContext() - ctx.to_log = noop - ctx.msg = noop + if ctx is None or not isinstance(ctx, ConfigurationContext): + ctx = ConfigurationContext() + ctx.to_log = noop + ctx.msg = noop return ctx.find_program(cmd, **kw) From f219ea1b38d06c15e8e53a705c1aa09f04bf97fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 29 Aug 2014 16:12:40 +0200 Subject: [PATCH 104/737] Cleanup apidoc and hackingdoc commands to use ctx.top_dir and ctx.out_dir This should be cleaner and safer than using '../' mixed with os.chdir(). --- wscript | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/wscript b/wscript index 06f6a3b13c..439ed57e8a 100644 --- a/wscript +++ b/wscript @@ -43,6 +43,7 @@ import sys import os import tempfile from waflib import Logs, Options, Scripting, Utils +from waflib.Build import BuildContext from waflib.Configure import ConfigurationContext from waflib.Errors import WafError from waflib.TaskGen import feature, before_method @@ -685,29 +686,28 @@ def updatepo(ctx): def apidoc(ctx): """generate API reference documentation""" - basedir = ctx.path.abspath() + ctx = BuildContext() # create our own context to have ctx.top_dir + basedir = ctx.top_dir doxygen = _find_program(ctx, 'doxygen') - doxyfile = '%s/%s/doc/Doxyfile' % (basedir, out) - os.chdir('doc') + doxyfile = '%s/doc/Doxyfile' % ctx.out_dir Logs.pprint('CYAN', 'Generating API documentation') ret = ctx.exec_command('%s %s' % (doxygen, doxyfile)) if ret != 0: raise WafError('Generating API documentation failed') - # update hacking.html - cmd = _find_rst2html(ctx) - ctx.exec_command('%s -stg --stylesheet=geany.css %s %s' % (cmd, '../HACKING', 'hacking.html')) - os.chdir('..') def hackingdoc(ctx): """generate HACKING documentation""" - os.chdir('doc') + ctx = BuildContext() # create our own context to have ctx.top_dir Logs.pprint('CYAN', 'Generating HACKING documentation') cmd = _find_rst2html(ctx) - ret = ctx.exec_command('%s -stg --stylesheet=geany.css %s %s' % (cmd, '../HACKING', 'hacking.html')) + hacking_file = os.path.join(ctx.top_dir, 'HACKING') + hacking_html_file = os.path.join(ctx.top_dir, 'doc', 'hacking.html') + stylesheet = os.path.join(ctx.top_dir, 'doc', 'geany.css') + ret = ctx.exec_command('%s -stg --stylesheet=%s %s %s' % ( + cmd, stylesheet, hacking_file, hacking_html_file)) if ret != 0: raise WafError('Generating HACKING documentation failed') - os.chdir('..') def _find_program(ctx, cmd, **kw): From 7125075168198f00f66001cbeaeb3d2318c0abf7 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 29 Aug 2014 16:48:01 +0200 Subject: [PATCH 105/737] Fix HTML documentation installation for VPATH builds --- doc/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 2a25e8ed92..fdb0617099 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -113,6 +113,9 @@ uninstall-local: # manually install some files under another name install-data-local: $(mkinstalldirs) $(DOCDIR)/html - $(INSTALL_DATA) $(srcdir)/geany.html $(DOCDIR)/html/index.html +# as we don't install with the automated mechanism so we can rename the file, +# we need to find the source file in the right location (either builddir or srcdir) + dir=$(builddir); test -f "$$dir/geany.html" || dir=$(srcdir); \ + $(INSTALL_DATA) "$$dir/geany.html" $(DOCDIR)/html/index.html $(INSTALL_DATA) $(srcdir)/geany.txt $(DOCDIR)/manual.txt $(INSTALL_DATA) $(top_srcdir)/scintilla/License.txt $(DOCDIR)/ScintillaLicense.txt From 0453991a61c57550555327707c3ecdefcf4de009 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 29 Aug 2014 16:58:26 +0200 Subject: [PATCH 106/737] Don't try to install the HTML documentation if we don't have it --- doc/Makefile.am | 5 +++++ m4/geany-docutils.m4 | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index fdb0617099..f17c2c1675 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,6 @@ man_MANS=geany.1 +if INSTALL_HTML_DOCS htmldocimagesdir = $(docdir)/html/images dist_htmldocimages_DATA = \ images/build_menu_commands_dialog.png \ @@ -23,6 +24,7 @@ dist_htmldocimages_DATA = \ images/pref_dialog_various.png \ images/pref_dialog_vte.png \ images/replace_dialog.png +endif doc_DATA = \ $(top_srcdir)/AUTHORS \ @@ -112,10 +114,13 @@ uninstall-local: # manually install some files under another name install-data-local: +if INSTALL_HTML_DOCS $(mkinstalldirs) $(DOCDIR)/html # as we don't install with the automated mechanism so we can rename the file, # we need to find the source file in the right location (either builddir or srcdir) dir=$(builddir); test -f "$$dir/geany.html" || dir=$(srcdir); \ $(INSTALL_DATA) "$$dir/geany.html" $(DOCDIR)/html/index.html +endif + $(mkinstalldirs) $(DOCDIR) $(INSTALL_DATA) $(srcdir)/geany.txt $(DOCDIR)/manual.txt $(INSTALL_DATA) $(top_srcdir)/scintilla/License.txt $(DOCDIR)/ScintillaLicense.txt diff --git a/m4/geany-docutils.m4 b/m4/geany-docutils.m4 index 75c27284db..997cb5acd0 100644 --- a/m4/geany-docutils.m4 +++ b/m4/geany-docutils.m4 @@ -14,10 +14,14 @@ AC_DEFUN([GEANY_CHECK_DOCUTILS_HTML], [ AC_REQUIRE([GEANY_CHECK_REVISION]) + AS_IF([test -f "$srcdir/doc/geany.html"], + [have_prebuilt_html_docs=yes], + [have_prebuilt_html_docs=no]) + dnl we require rst2html by default unless we don't build from Git dnl and already have the HTML manual built in-tree html_docs_default=yes - AS_IF([test "$REVISION" = "-1" && test -f "$srcdir/doc/geany.html"], + AS_IF([test "$REVISION" = "-1" && test "x$have_prebuilt_html_docs" = xyes], [html_docs_default=auto]) AC_ARG_ENABLE([html-docs], @@ -40,6 +44,8 @@ but you then may not have a local copy of the HTML manual.])], [geany_enable_html_docs="no"]) ]) AM_CONDITIONAL([WITH_RST2HTML], [test "x$geany_enable_html_docs" != "xno"]) + AM_CONDITIONAL([INSTALL_HTML_DOCS], [test "x$geany_enable_html_docs" != "xno" || + test "x$have_prebuilt_html_docs" = xyes]) GEANY_STATUS_ADD([Build HTML documentation], [$geany_enable_html_docs]) ]) dnl From 6e755985a8e8847fed176dea21976dc2eefbed3e Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 29 Aug 2014 15:22:49 +0200 Subject: [PATCH 107/737] Update Doxyfile --- doc/Doxyfile.in | 2382 +++++++++++++++++++++++++++++------------------ 1 file changed, 1479 insertions(+), 903 deletions(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index bcd05e03bb..7ec299b54f 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -1,104 +1,122 @@ -# Doxyfile 1.8.1.2 +# Doxyfile 1.8.8 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # -# All text after a hash (#) is considered a comment and will be ignored. +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. # The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" "). +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or sequence of words) that should -# identify the project. Note that if you do not use Doxywizard you need -# to put quotes around the project name if it contains spaces. +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. PROJECT_NAME = Geany -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. PROJECT_NUMBER = @VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer -# a quick idea about the purpose of the project. Keep the description short. +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is -# included in the documentation. The maximum height of the logo should not -# exceed 55 pixels and the maximum width should not exceed 200 pixels. -# Doxygen will copy the logo to the output directory. +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. PROJECT_LOGO = -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. OUTPUT_DIRECTORY = @top_builddir@/doc -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. CREATE_SUBDIRS = NO +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. +# The default value is: YES. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = "The $name class " \ "The $name widget " \ @@ -113,8 +131,9 @@ ABBREVIATE_BRIEF = "The $name class " \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# doxygen will generate a detailed section even if there is only a brief # description. +# The default value is: NO. ALWAYS_DETAILED_SEC = NO @@ -122,88 +141,105 @@ ALWAYS_DETAILED_SEC = NO # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. +# The default value is: NO. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful if your file system -# doesn't support long names like on DOS, Mac, or CD-ROM. +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. JAVADOC_AUTOBRIEF = YES -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 4 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +## ALIASES taken from pidgin -# ALIASES taken from pidgin ALIASES = "signal=- @ref " \ "signaldef=@subsection " \ "endsignaldef= " \ @@ -214,85 +250,107 @@ ALIASES = "signal=- @ref " \ "endsignals= " # This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding -# "class=itcl::class" will allow you to use the command class in the -# itcl::class meaning. +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. TCL_SUBST = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = YES -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. EXTENSION_MAPPING = -# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all -# comments according to the Markdown format, which allows for more readable +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you -# can mix doxygen, HTML, and XML commands with Markdown formatting. -# Disable only in case of backward compatibilities issues. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. MARKDOWN_SUPPORT = YES +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also makes the inheritance and collaboration +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. +# The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. +# The default value is: NO. CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. IDL_PROPERTY_SUPPORT = YES @@ -300,51 +358,61 @@ IDL_PROPERTY_SUPPORT = YES # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. +# The default value is: NO. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. SUBGROUPING = YES -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and -# unions are shown inside the group in which they are included (e.g. using -# @ingroup) instead of on a separate page (for HTML and Man pages) or -# section (for LaTeX and RTF). +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. INLINE_GROUPED_CLASSES = NO -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and -# unions with only public data fields will be shown inline in the documentation -# of the scope in which they are defined (i.e. file, namespace, or group -# documentation), provided this scope is documented. If set to NO (the default), -# structs, classes, and unions are shown on a separate page (for HTML and Man -# pages) or section (for LaTeX and RTF). +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. INLINE_SIMPLE_STRUCTS = NO -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. TYPEDEF_HIDES_STRUCT = NO -# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be -# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given -# their name and scope. Since this can be an expensive process and often the -# same symbol appear multiple times in the code, doxygen keeps a cache of -# pre-resolved symbols. If the cache is too small doxygen will become slower. -# If the cache is too large, memory is wasted. The cache size is given by this -# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols. +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 @@ -353,309 +421,356 @@ LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. EXTRACT_PRIVATE = NO -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation. +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespaces are hidden. +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. HIDE_UNDOC_MEMBERS = YES -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. HIDE_UNDOC_CLASSES = YES -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. HIDE_IN_BODY_DOCS = YES -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. +# The default value is: system dependent. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. SHOW_INCLUDE_FILES = NO -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. FORCE_LOCAL_INCLUDES = NO -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. INLINE_INFO = NO -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. SORT_BRIEF_DOCS = YES -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. SORT_BY_SCOPE_NAME = NO -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to -# do proper type resolution of all parameters of a function it will reject a -# match between the prototype and the implementation of a member function even -# if there is only one candidate or it is obvious which candidate to choose -# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen -# will still accept a match between prototype and implementation in such cases. +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. GENERATE_TESTLIST = NO -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or macro consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and macros in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. SHOW_USED_FILES = NO -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. SHOW_FILES = YES -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. LAYOUT_FILE = -# The CITE_BIB_FILES tag can be used to specify one or more bib files -# containing the references data. This must be a list of .bib files. The -# .bib extension is automatically appended if omitted. Using this command -# requires the bibtex tool to be installed. See also -# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style -# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this -# feature you need bibtex and perl available in the search path. +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- -# configuration options related to warning and progress messages +# Configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. WARN_IF_DOC_ERROR = YES -# The WARN_NO_PARAMDOC option can be enabled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. WARN_NO_PARAMDOC = YES -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text " -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- -# configuration options related to the input files +# Configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. INPUT = @top_srcdir@/src/ \ @top_srcdir@/doc/ \ @@ -669,20 +784,22 @@ INPUT = @top_srcdir@/src/ \ @top_srcdir@/tagmanager/src/tm_workspace.h # This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py -# *.f90 *.f *.for *.vhd *.vhdl +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. FILE_PATTERNS = *.c \ *.cc \ @@ -707,15 +824,16 @@ FILE_PATTERNS = *.c \ = \ NO -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. +# # Note that relative paths are relative to the directory from which doxygen is # run. @@ -724,14 +842,16 @@ EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. +# The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = @@ -740,755 +860,1108 @@ EXCLUDE_PATTERNS = # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). EXAMPLE_PATH = @top_srcdir@/doc # If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty or if -# non of the patterns match the file name, INPUT_FILTER is applied. +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) -# and it is also possible to disable source filtering for a specific pattern -# using *.ext= (so without naming a filter). This option only has effect when -# FILTER_SOURCE_FILES is enabled. +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + #--------------------------------------------------------------------------- -# configuration options related to source browsing +# Configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C, C++ and Fortran comments will always remain visible. +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. REFERENCED_BY_RELATION = NO -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. REFERENCES_RELATION = NO -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. VERBATIM_HEADERS = NO +# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# compiled with the --with-libclang option. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + #--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index +# Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. ALPHABETICAL_INDEX = NO -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- -# configuration options related to the HTML output +# Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = reference/ -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. Note that when using a custom header you are responsible -# for the proper inclusion of any scripts and style sheets that doxygen -# needs, which is dependent on the configuration options used. -# It is advised to generate a default header using "doxygen -w html -# header.html footer.html stylesheet.css YourConfigFile" and then modify -# that header. Note that the header is subject to change so you typically -# have to redo this when upgrading to a newer version of doxygen or when -# changing the value of configuration settings such as GENERATE_TREEVIEW! +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# style sheet in the HTML output directory as well, or it will be erased! +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra stylesheet files is of importance (e.g. the last +# stylesheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the -# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that -# the files will be copied as-is; there are no commands or markers available. +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the style sheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of -# entries shown in the various tree structured indices initially; the user -# can expand and collapse entries dynamically later on. Doxygen will expand -# the tree to such a level that at most the specified number of entries are -# visible (unless a fully collapsed tree already exceeds this amount). -# So setting the number of entries 1 will produce a full collapsed tree by -# default. 0 is a special value representing an infinite number of entries -# and will result in a full expanded tree by default. +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be # written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project -# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) -# at top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. Since the tabs have the same information as the -# navigation tree you can set this option to NO if you already set -# GENERATE_TREEVIEW to YES. +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. -# Since the tree basically has the same information as the tab index you -# could consider to set DISABLE_INDEX to NO when enabling this option. +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values -# (range [0,1..20]) that doxygen will group on one line in the generated HTML -# documentation. Note that a value of 0 will completely suppress the enum -# values from appearing in the overview section. +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the -# rendering instead of using prerendered bitmaps. Use this if you do not -# have LaTeX installed or if you want to formulas look prettier in the HTML -# output. When enabled you may also need to install MathJax separately and -# configure the path to it using the MATHJAX_RELPATH option. +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO -# When MathJax is enabled you need to specify the location relative to the -# HTML output directory using the MATHJAX_RELPATH option. The destination -# directory should contain the MathJax.js script. For instance, if the mathjax -# directory is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to -# the MathJax Content Delivery Network so you can quickly see the result without -# installing MathJax. -# However, it is strongly recommended to install a local -# copy of MathJax from http://www.mathjax.org before deployment. +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest -# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension -# names that should be enabled during MathJax rendering. +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /