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
![]() ![]() |
Go to the source code of this file.
Classes | |
struct | EditWindow |
Typedefs | |
typedef struct EditWindow | EditWindow |
Enumerations | |
enum | { KB_SPLIT_HORIZONTAL , KB_SPLIT_VERTICAL , KB_SPLIT_UNSPLIT , KB_COUNT } |
enum | State { STATE_SPLIT_HORIZONTAL , STATE_SPLIT_VERTICAL , STATE_UNSPLIT , STATE_COUNT } |
Functions | |
gint | plugin_version_check (gint abi_ver) |
Use the PLUGIN_VERSION_CHECK() macro instead. More... | |
void | plugin_set_info (PluginInfo *info) |
Use the PLUGIN_SET_INFO() macro to define it. More... | |
static void | on_unsplit (GtkMenuItem *menuitem, gpointer user_data) |
static void | set_line_numbers (ScintillaObject *sci, gboolean set) |
static void | on_sci_notify (ScintillaObject *sci, gint param, SCNotification *nt, gpointer data) |
static void | sync_to_current (ScintillaObject *sci, ScintillaObject *current) |
static void | set_editor (EditWindow *editwin, GeanyEditor *editor) |
static void | set_state (enum State id) |
static GtkWidget * | ui_tool_button_new (const gchar *stock_id, const gchar *label, const gchar *tooltip) |
static void | on_refresh (void) |
static void | on_doc_menu_item_clicked (gpointer item, GeanyDocument *doc) |
static void | on_doc_show_menu (GtkMenuToolButton *button, GtkMenu *menu) |
static void | show_menu_gtk316_fix (GtkMenuToolButton *button, gpointer data) |
static GtkWidget * | create_toolbar (void) |
static void | split_view (gboolean horizontal) |
static void | on_split_horizontally (GtkMenuItem *menuitem, gpointer user_data) |
static void | on_split_vertically (GtkMenuItem *menuitem, gpointer user_data) |
static void | kb_activate (guint key_id) |
void | plugin_init (GeanyData *data) |
Called after loading the plugin. More... | |
static gboolean | do_select_current (gpointer data) |
static void | on_document_close (GObject *obj, GeanyDocument *doc, gpointer user_data) |
static void | on_document_save (GObject *obj, GeanyDocument *doc, gpointer user_data) |
static void | on_document_filetype_set (GObject *obj, GeanyDocument *doc, GeanyFiletype *filetype_old, gpointer user_data) |
void | plugin_cleanup (void) |
Called before unloading the plugin. More... | |
Variables | |
GeanyData * | geany_data |
GeanyPlugin * | geany_plugin |
struct { | |
GtkWidget * main | |
GtkWidget * horizontal | |
GtkWidget * vertical | |
GtkWidget * unsplit | |
} | menu_items |
static enum State | plugin_state |
static EditWindow | edit_window = {NULL, NULL, NULL, NULL} |
PluginCallback | plugin_callbacks [] |
typedef struct EditWindow EditWindow |
anonymous enum |
Enumerator | |
---|---|
KB_SPLIT_HORIZONTAL | |
KB_SPLIT_VERTICAL | |
KB_SPLIT_UNSPLIT | |
KB_COUNT |
Definition at line 42 of file splitwindow.c.
enum State |
Enumerator | |
---|---|
STATE_SPLIT_HORIZONTAL | |
STATE_SPLIT_VERTICAL | |
STATE_UNSPLIT | |
STATE_COUNT |
Definition at line 50 of file splitwindow.c.
|
static |
Definition at line 285 of file splitwindow.c.
References _, edit_window, gtk_container_add(), EditWindow::name_label, NULL, on_doc_show_menu(), on_refresh(), on_unsplit(), show_menu_gtk316_fix(), and ui_tool_button_new().
Referenced by split_view().
|
static |
Definition at line 469 of file splitwindow.c.
References document_get_current(), edit_window, GeanyDocument::editor, NULL, on_unsplit(), plugin_state, set_editor(), and STATE_UNSPLIT.
Referenced by on_document_close().
|
static |
Definition at line 407 of file splitwindow.c.
References KB_SPLIT_HORIZONTAL, KB_SPLIT_UNSPLIT, KB_SPLIT_VERTICAL, NULL, on_unsplit(), plugin_state, split_view(), and STATE_UNSPLIT.
Referenced by plugin_init().
|
static |
Definition at line 242 of file splitwindow.c.
References edit_window, GeanyDocument::editor, GeanyDocument::is_valid, and set_editor().
Referenced by on_doc_show_menu().
|
static |
Definition at line 249 of file splitwindow.c.
References GeanyEditor::document, edit_window, EditWindow::editor, NULL, on_doc_menu_item_clicked(), and ui_menu_add_document_items().
Referenced by create_toolbar().
|
static |
Definition at line 487 of file splitwindow.c.
References do_select_current(), edit_window, EditWindow::editor, GeanyDocument::editor, geany_plugin, NULL, and plugin_idle_add().
|
static |
Definition at line 505 of file splitwindow.c.
References edit_window, EditWindow::editor, GeanyDocument::editor, EditWindow::sci, GeanyEditor::sci, and sync_to_current().
|
static |
Definition at line 497 of file splitwindow.c.
References DOC_FILENAME, edit_window, EditWindow::editor, GeanyDocument::editor, and EditWindow::name_label.
|
static |
Definition at line 231 of file splitwindow.c.
References document_get_current(), edit_window, GeanyDocument::editor, EditWindow::sci, and set_editor().
Referenced by create_toolbar().
|
static |
Definition at line 106 of file splitwindow.c.
References Sci_NotifyHeader::code, line, SCNotification::margin, SCNotification::nmhdr, SCNotification::position, sci, sci_delete_marker_at_line(), sci_get_line_from_position(), sci_is_marker_set_at_line(), sci_set_marker_at_line(), SCI_TOGGLEFOLD, scintilla_send_message(), SCN_MARGINCLICK, and set.
Referenced by set_editor().
|
static |
|
static |
|
static |
Definition at line 385 of file splitwindow.c.
References edit_window, EditWindow::editor, geany_data, gtk_container_add(), GeanyData::main_widgets, GeanyMainWidgets::notebook, NULL, EditWindow::sci, set_state(), and STATE_UNSPLIT.
Referenced by create_toolbar(), do_select_current(), kb_activate(), plugin_cleanup(), and plugin_init().
void plugin_cleanup | ( | ) |
Called before unloading the plugin.
Required for normal plugins - it should undo everything done in plugin_init() - e.g. destroy menu items, free memory.
Definition at line 523 of file splitwindow.c.
References main_menu_item, menu_items, NULL, on_unsplit(), plugin_state, and STATE_UNSPLIT.
void plugin_init | ( | GeanyData * | data | ) |
Called after loading the plugin.
data | The same as geany_data. |
< Simple macro for geany_data
that reduces typing.
< Simple macro for geany_data
that reduces typing.
< Simple macro for geany_data
that reduces typing.
< Simple macro for geany_data
that reduces typing.
< Simple macro for geany_data
that reduces typing.
Definition at line 427 of file splitwindow.c.
References _, geany, geany_data, geany_plugin, gtk_container_add(), gtk_widget_show_all(), kb_activate(), KB_COUNT, KB_SPLIT_HORIZONTAL, KB_SPLIT_UNSPLIT, KB_SPLIT_VERTICAL, keybindings_set_item(), main_menu_item, GeanyData::main_widgets, menu_items, NULL, on_menu_create_html_activate(), on_menu_create_latex_activate(), on_split_horizontally(), on_split_vertically(), on_unsplit(), plugin_set_key_group(), set_state(), STATE_UNSPLIT, GeanyMainWidgets::tools_menu, and ui_add_document_sensitive().
void plugin_set_info | ( | PluginInfo * | info | ) |
Use the PLUGIN_SET_INFO() macro to define it.
Required by Geany. This function is called before the plugin is initialized, so Geany can read the plugin's name.
info | The data struct which should be initialized by this function. |
Definition at line 34 of file splitwindow.c.
gint plugin_version_check | ( | gint | abi | ) |
Use the PLUGIN_VERSION_CHECK() macro instead.
Required by Geany.
abi | ABI version Geany was compiled with |
Definition at line 32 of file splitwindow.c.
|
static |
Definition at line 164 of file splitwindow.c.
References DOC_FILENAME, GeanyEditor::document, EditWindow::editor, editor_create_widget(), EditWindow::name_label, NULL, on_sci_notify(), EditWindow::sci, GeanyEditor::sci, SCI_USEPOPUP, scintilla_send_message(), sync_to_current(), and EditWindow::vbox.
Referenced by do_select_current(), on_doc_menu_item_clicked(), on_refresh(), and split_view().
|
static |
Definition at line 86 of file splitwindow.c.
References sci, SCI_GETLINECOUNT, SCI_SETMARGINSENSITIVEN, SCI_SETMARGINWIDTHN, SCI_TEXTWIDTH, scintilla_send_message(), set, and STYLE_LINENUMBER.
Referenced by sync_to_current().
|
static |
Definition at line 188 of file splitwindow.c.
References menu_items, plugin_state, STATE_SPLIT_HORIZONTAL, STATE_SPLIT_VERTICAL, and STATE_UNSPLIT.
Referenced by on_unsplit(), plugin_init(), and split_view().
|
static |
Definition at line 263 of file splitwindow.c.
Referenced by create_toolbar().
|
static |
Definition at line 325 of file splitwindow.c.
References create_toolbar(), document_get_current(), edit_window, EditWindow::editor, GeanyDocument::editor, geany_data, gtk_container_add(), gtk_widget_show_all(), horizontal, GeanyData::main_widgets, GeanyMainWidgets::notebook, NULL, set_editor(), set_state(), STATE_SPLIT_HORIZONTAL, STATE_SPLIT_VERTICAL, and EditWindow::vbox.
Referenced by kb_activate(), on_split_horizontally(), and on_split_vertically().
|
static |
< Simple macro for geany_data
that reduces typing.
< Simple macro for geany_data
that reduces typing.
Definition at line 141 of file splitwindow.c.
References GeanyEditor::document, edit_window, EditWindow::editor, GeanyDocument::file_type, geany, highlighting_set_styles(), pos, sci, sci_get_current_position(), SCI_GETDOCPOINTER, SCI_GETMARGINWIDTHN, sci_set_current_position(), SCI_SETDOCPOINTER, SCI_SETMARGINWIDTHN, scintilla_send_message(), and set_line_numbers().
Referenced by on_document_filetype_set(), and set_editor().
|
static |
Definition at line 205 of file splitwindow.c.
References label, NULL, ui_lookup_stock_label(), and utils_str_remove_chars().
Referenced by create_toolbar().
|
static |
Definition at line 79 of file splitwindow.c.
Referenced by create_toolbar(), do_select_current(), on_doc_menu_item_clicked(), on_doc_show_menu(), on_document_close(), on_document_filetype_set(), on_document_save(), on_refresh(), on_unsplit(), split_view(), and sync_to_current().
GeanyData* geany_data |
Definition at line 37 of file splitwindow.c.
Referenced by on_unsplit(), plugin_init(), and split_view().
GeanyPlugin* geany_plugin |
Definition at line 38 of file splitwindow.c.
Referenced by on_document_close(), and plugin_init().
GtkWidget* horizontal |
Definition at line 61 of file splitwindow.c.
Referenced by split_view().
GtkWidget* main |
Definition at line 60 of file splitwindow.c.
struct { ... } menu_items |
Referenced by plugin_cleanup(), plugin_init(), and set_state().
PluginCallback plugin_callbacks[] |
Definition at line 514 of file splitwindow.c.
|
static |
Definition at line 67 of file splitwindow.c.
Referenced by do_select_current(), kb_activate(), plugin_cleanup(), and set_state().
GtkWidget* unsplit |
Definition at line 63 of file splitwindow.c.
GtkWidget* vertical |
Definition at line 62 of file splitwindow.c.