geany
1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
![]() ![]() |
#include "navqueue.h"
#include "document.h"
#include "geanyobject.h"
#include "sciwrappers.h"
#include "toolbar.h"
#include "utils.h"
#include <gtk/gtk.h>
Go to the source code of this file.
Classes | |
struct | filepos |
Functions | |
void | navqueue_init (void) |
void | navqueue_free (void) |
static void | adjust_buttons (void) |
static gboolean | queue_pos_matches (guint queue_pos, const gchar *fname, gint pos) |
static void | add_new_position (const gchar *utf8_filename, gint pos) |
gboolean | navqueue_goto_line (GeanyDocument *old_doc, GeanyDocument *new_doc, gint line) |
Adds old file position and new file position to the navqueue, then goes to the new position. More... | |
static gboolean | goto_file_pos (const gchar *file, gint pos) |
void | navqueue_go_back (void) |
void | navqueue_go_forward (void) |
static gint | find_by_filename (gconstpointer a, gconstpointer b) |
void | navqueue_remove_file (const gchar *filename) |
Variables | |
static GQueue * | navigation_queue |
static guint | nav_queue_pos |
static GtkAction * | navigation_buttons [2] |
|
static |
Definition at line 114 of file navqueue.c.
References adjust_buttons(), filepos::file, nav_queue_pos, navigation_queue, pos, filepos::pos, and queue_pos_matches().
Referenced by navqueue_go_back(), and navqueue_goto_line().
|
static |
Definition at line 77 of file navqueue.c.
References nav_queue_pos, navigation_buttons, and navigation_queue.
Referenced by add_new_position(), navqueue_go_back(), navqueue_go_forward(), and navqueue_remove_file().
|
static |
Definition at line 252 of file navqueue.c.
References utils_str_equal().
Referenced by navqueue_remove_file().
|
static |
Definition at line 179 of file navqueue.c.
References document_find_by_filename(), GeanyDocument::editor, editor_goto_pos(), NULL, and pos.
Referenced by navqueue_go_back(), and navqueue_go_forward().
void navqueue_free | ( | void | ) |
Definition at line 67 of file navqueue.c.
References navigation_queue.
Referenced by do_main_quit().
void navqueue_go_back | ( | void | ) |
TODO: add option to re open the file
Definition at line 190 of file navqueue.c.
References add_new_position(), adjust_buttons(), document_get_current(), GeanyDocument::editor, filepos::file, GeanyDocument::file_name, goto_file_pos(), nav_queue_pos, navigation_queue, filepos::pos, GeanyEditor::sci, and sci_get_current_position().
Referenced by cb_func_goto_action(), and on_toolbutton_back_activate().
void navqueue_go_forward | ( | void | ) |
TODO: add option to re open the file
Definition at line 228 of file navqueue.c.
References adjust_buttons(), filepos::file, goto_file_pos(), nav_queue_pos, navigation_queue, and filepos::pos.
Referenced by cb_func_goto_action(), and on_toolbutton_forward_activate().
gboolean navqueue_goto_line | ( | GeanyDocument * | old_doc, |
GeanyDocument * | new_doc, | ||
gint | line | ||
) |
Adds old file position and new file position to the navqueue, then goes to the new position.
old_doc | The document of the previous position, if set as invalid (NULL ) then no old position is set |
new_doc | The document of the new position, must be valid. |
line | the line number of the new position. It is counted with 1 as the first line, not 0. |
TRUE
if the cursor has changed the position to line or FALSE
otherwise. Definition at line 151 of file navqueue.c.
References add_new_position(), DOC_VALID, GeanyDocument::editor, editor_goto_pos(), GeanyDocument::file_name, GeanyDocument::is_valid, line, NULL, pos, GeanyEditor::sci, sci_get_current_position(), and sci_get_position_from_line().
Referenced by goto_compiler_file_line(), goto_tag(), msgwin_goto_messages_file_line(), on_goto_popup_item_activate(), and taglist_go_to_selection().
void navqueue_init | ( | void | ) |
Definition at line 54 of file navqueue.c.
References nav_queue_pos, navigation_buttons, navigation_queue, and toolbar_get_action_by_name().
Referenced by main_lib().
void navqueue_remove_file | ( | const gchar * | filename | ) |
Definition at line 262 of file navqueue.c.
References adjust_buttons(), filename, find_by_filename(), match(), navigation_queue, and NULL.
Referenced by remove_page().
|
static |
Definition at line 102 of file navqueue.c.
References filepos::file, navigation_queue, pos, filepos::pos, and utils_str_equal().
Referenced by add_new_position().
|
static |
Definition at line 48 of file navqueue.c.
Referenced by add_new_position(), adjust_buttons(), navqueue_go_back(), navqueue_go_forward(), and navqueue_init().
|
static |
Definition at line 50 of file navqueue.c.
Referenced by adjust_buttons(), and navqueue_init().
|
static |
Definition at line 47 of file navqueue.c.
Referenced by add_new_position(), adjust_buttons(), navqueue_free(), navqueue_go_back(), navqueue_go_forward(), navqueue_init(), navqueue_remove_file(), and queue_pos_matches().