![]() |
![]() |
![]() |
CodeSlayer Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#include <codeslayer/codeslayer.h> #define CODESLAYER_HOME struct CodeSlayer; CodeSlayer * codeslayer_new (GtkWindow *window
,CodeSlayerProfile *profile
,CodeSlayerProcesses *processes
,CodeSlayerMenuBar *menu_bar
,CodeSlayerNotebook *notebook
,CodeSlayerProjects *projects
,CodeSlayerProjectProperties *project_properties
,CodeSlayerSidePane *side_pane
,CodeSlayerBottomPane *bottom_pane
); gboolean codeslayer_select_document (CodeSlayer *codeslayer
,CodeSlayerDocument *document
); gboolean codeslayer_select_document_by_file_path (CodeSlayer *codeslayer
,const gchar *file_path
,gint line_number
); CodeSlayerDocument * codeslayer_get_active_document (CodeSlayer *codeslayer
); const gchar * codeslayer_get_active_document_file_path (CodeSlayer *codeslayer
); CodeSlayerProject * codeslayer_get_active_document_project (CodeSlayer *codeslayer
); GList * codeslayer_get_all_documents (CodeSlayer *codeslayer
); void codeslayer_add_to_side_pane (CodeSlayer *codeslayer
,GtkWidget *widget
,const gchar *title
); void codeslayer_remove_from_side_pane (CodeSlayer *codeslayer
,GtkWidget *widget
); void codeslayer_add_to_bottom_pane (CodeSlayer *codeslayer
,GtkWidget *widget
,const gchar *title
); void codeslayer_remove_from_bottom_pane (CodeSlayer *codeslayer
,GtkWidget *widget
); void codeslayer_show_bottom_pane (CodeSlayer *codeslayer
,GtkWidget *widget
); void codeslayer_show_side_pane (CodeSlayer *codeslayer
,GtkWidget *widget
); void codeslayer_add_to_menu_bar (CodeSlayer *codeslayer
,GtkMenuItem *menu_item
); void codeslayer_remove_from_menu_bar (CodeSlayer *codeslayer
,GtkMenuItem *menu_item
); void codeslayer_add_to_projects_popup (CodeSlayer *codeslayer
,GtkMenuItem *menu_item
); void codeslayer_remove_from_projects_popup (CodeSlayer *codeslayer
,GtkMenuItem *menu_item
); void codeslayer_add_to_project_properties (CodeSlayer *codeslayer
,GtkWidget *widget
,const gchar *title
); void codeslayer_remove_from_project_properties (CodeSlayer *codeslayer
,GtkWidget *widget
); GtkAccelGroup * codeslayer_get_menu_bar_accel_group (CodeSlayer *codeslayer
); gchar * codeslayer_get_project_config_folder_path (CodeSlayer *codeslayer
,CodeSlayerProject *project
); gchar * codeslayer_get_plugins_config_folder_path (CodeSlayer *codeslayer
); gchar * codeslayer_get_profile_config_folder_path (CodeSlayer *codeslayer
); CodeSlayerProject * codeslayer_get_project_by_file_path (CodeSlayer *codeslayer
,const gchar *file_path
); CodeSlayerRegistry * codeslayer_get_registry (CodeSlayer *codeslayer
); GList * codeslayer_get_projects (CodeSlayer *codeslayer
); GtkWindow * codeslayer_get_toplevel_window (CodeSlayer *codeslayer
); gint codeslayer_add_to_process_bar (CodeSlayer *codeslayer
,const gchar *name
,StopProcessFunc func
,gpointer data
); void codeslayer_remove_from_process_bar (CodeSlayer *codeslayer
,gint id
); CodeSlayerDocumentLinker * codeslayer_create_document_linker (CodeSlayer *codeslayer
,GtkTextView *text_view
);
"document-added" :No Hooks
"document-removed" :No Hooks
"document-saved" :No Hooks
"document-switched" :No Hooks
"documents-all-saved" :No Hooks
"project-properties-opened" :No Hooks
"project-properties-saved" :No Hooks
"projects-changed" :No Hooks
CodeSlayer * codeslayer_new (GtkWindow *window
,CodeSlayerProfile *profile
,CodeSlayerProcesses *processes
,CodeSlayerMenuBar *menu_bar
,CodeSlayerNotebook *notebook
,CodeSlayerProjects *projects
,CodeSlayerProjectProperties *project_properties
,CodeSlayerSidePane *side_pane
,CodeSlayerBottomPane *bottom_pane
);
gboolean codeslayer_select_document (CodeSlayer *codeslayer
,CodeSlayerDocument *document
);
Finds the document based on the file path. First it will find the document in the tree and then open up the document in the notebook. It is Ok to call this method as much as you want because after the document is initially loaded up then subsequent calls are very efficient.
The minimum document attribute that needs to be filled in is the file_path.
|
a CodeSlayer. |
|
a CodeSlayerDocument. |
Returns : |
is TRUE if the document is able to be found in the tree. |
gboolean codeslayer_select_document_by_file_path (CodeSlayer *codeslayer
,const gchar *file_path
,gint line_number
);
Finds the document based on the file path. First it will find the document in the tree and then open up the document in the notebook. It is Ok to call this method as much as you want because after the document is initially loaded up then subsequent calls are very efficient.
|
a CodeSlayer. |
|
the path to the document to open. |
|
the line in the document to scroll to. |
Returns : |
is TRUE if the document is able to be found in the tree. |
CodeSlayerDocument * codeslayer_get_active_document (CodeSlayer *codeslayer
);
|
a CodeSlayer. |
Returns : |
The document in the notebook that has focus. Will return NULL if there is no active document. |
const gchar * codeslayer_get_active_document_file_path
(CodeSlayer *codeslayer
);
The file path for the active document.
|
a CodeSlayer. |
Returns : |
a string that is owned by the document and should not be freed. |
CodeSlayerProject * codeslayer_get_active_document_project
(CodeSlayer *codeslayer
);
This is a convenience function so that you can easily get at the project associated with the active document.
|
a CodeSlayer. |
Returns : |
The project that is associated with the active document. Will return NULL if there is no active document. |
GList * codeslayer_get_all_documents (CodeSlayer *codeslayer
);
|
a CodeSlayer. |
Returns : |
a GList of CodeSlayerSourceView. Note: you need to call g_list_free when you are done with the list. |
void codeslayer_add_to_side_pane (CodeSlayer *codeslayer
,GtkWidget *widget
,const gchar *title
);
Add the given widget to the side pane.
|
a CodeSlayer. |
|
a GtkWidget. |
|
the title for the tab. |
void codeslayer_remove_from_side_pane (CodeSlayer *codeslayer
,GtkWidget *widget
);
Remove the given widget from the side pane.
|
a CodeSlayer. |
|
a GtkWidget. |
void codeslayer_add_to_bottom_pane (CodeSlayer *codeslayer
,GtkWidget *widget
,const gchar *title
);
Add the given widget to the bottom pane.
|
a CodeSlayer. |
|
a GtkWidget. |
|
the title for the tab. |
void codeslayer_remove_from_bottom_pane (CodeSlayer *codeslayer
,GtkWidget *widget
);
Remove the given widget from the bottom pane.
|
a CodeSlayer. |
|
a GtkWidget. |
void codeslayer_show_bottom_pane (CodeSlayer *codeslayer
,GtkWidget *widget
);
Show the bottom pane and display the tab with the given widget. This should be the same widget that you added to the bottom pane.
|
a CodeSlayer. |
|
a GtkWidget. |
void codeslayer_show_side_pane (CodeSlayer *codeslayer
,GtkWidget *widget
);
Show the side pane and display the tab with the given widget. This should be the same widget that you added to the side pane.
|
a CodeSlayer. |
|
a GtkWidget. |
void codeslayer_add_to_menu_bar (CodeSlayer *codeslayer
,GtkMenuItem *menu_item
);
Add the given menu item to the menu bar tools menu.
|
a CodeSlayer. |
|
a GtkMenuItem. |
void codeslayer_remove_from_menu_bar (CodeSlayer *codeslayer
,GtkMenuItem *menu_item
);
Remove the given menu item from the menu bar tools menu.
|
a CodeSlayer. |
|
a GtkMenuItem. |
void codeslayer_add_to_projects_popup (CodeSlayer *codeslayer
,GtkMenuItem *menu_item
);
Add the given menu item to the projects tree tools menu.
|
a CodeSlayer. |
|
a GtkMenuItem. |
void codeslayer_remove_from_projects_popup (CodeSlayer *codeslayer
,GtkMenuItem *menu_item
);
Remove the given menu item from the projects tree tools menu.
|
a CodeSlayer. |
|
a GtkMenuItem. |
void codeslayer_add_to_project_properties (CodeSlayer *codeslayer
,GtkWidget *widget
,const gchar *title
);
Add the given widget to the project properties.
|
a CodeSlayer. |
|
a GtkWidget. |
|
the title for the tab. |
void codeslayer_remove_from_project_properties (CodeSlayer *codeslayer
,GtkWidget *widget
);
Remove the given widget to the project properties.
|
a CodeSlayer. |
|
a GtkWidget. |
GtkAccelGroup * codeslayer_get_menu_bar_accel_group (CodeSlayer *codeslayer
);
|
a CodeSlayer. |
Returns : |
The GtkAccelGroup associated with the menu. |
gchar * codeslayer_get_project_config_folder_path (CodeSlayer *codeslayer
,CodeSlayerProject *project
);
The folder path to where you should place project configuration files.
|
a CodeSlayer. |
|
a CodeSlayerProject. |
Returns : |
a newly-allocated string that must be freed with g_free() . |
gchar * codeslayer_get_plugins_config_folder_path
(CodeSlayer *codeslayer
);
The folder path to where you should place plugin configuration files.
|
a CodeSlayer. |
Returns : |
a newly-allocated string that must be freed with g_free() . |
gchar * codeslayer_get_profile_config_folder_path
(CodeSlayer *codeslayer
);
The folder path to where you should place profile configuration files.
|
a CodeSlayer. |
Returns : |
a newly-allocated string that must be freed with g_free() . |
CodeSlayerProject * codeslayer_get_project_by_file_path (CodeSlayer *codeslayer
,const gchar *file_path
);
|
a CodeSlayer. |
|
the file path to match against the projects folder path. |
Returns : |
The CodeSlayerProject if found, otherwise NULL. |
CodeSlayerRegistry * codeslayer_get_registry (CodeSlayer *codeslayer
);
|
a CodeSlayer. |
Returns : |
The CodeSlayerRegistry. |
GtkWindow * codeslayer_get_toplevel_window (CodeSlayer *codeslayer
);
|
a CodeSlayer. |
Returns : |
The outer most GtkWindow that codeslayer uses. |
gint codeslayer_add_to_process_bar (CodeSlayer *codeslayer
,const gchar *name
,StopProcessFunc func
,gpointer data
);
|
a CodeSlayer. |
|
the name of the process. |
|
a StopProcessFunc is a callback to request that the process be stopped |
|
user data supplied to the StopProcessFunc |
Returns : |
The identifier for the process. |
void codeslayer_remove_from_process_bar (CodeSlayer *codeslayer
,gint id
);
CodeSlayerDocumentLinker * codeslayer_create_document_linker (CodeSlayer *codeslayer
,GtkTextView *text_view
);
|
a CodeSlayer. |
|
the text_view to create the links in. |
Returns : |
Creates a new CodeSlayerDocumentLinker . You must free this with
g_object_unref() when done with it. |
"document-added"
signalvoid user_function (CodeSlayer *codeslayer,
CodeSlayerDocument *document,
gpointer user_data) : No Hooks
The ::document-added signal is emitted when the document is added to the notebook
|
the plugin that received the signal |
|
the CodeSlayerSourceView that was added |
|
user data set when the signal handler was connected. |
"document-removed"
signalvoid user_function (CodeSlayer *codeslayer,
CodeSlayerDocument *document,
gpointer user_data) : No Hooks
The ::document-removed signal is emitted when the document is removed from the notebook
|
the plugin that received the signal |
|
the CodeSlayerSourceView that was removed |
|
user data set when the signal handler was connected. |
"document-saved"
signalvoid user_function (CodeSlayer *codeslayer,
CodeSlayerDocument *document,
gpointer user_data) : No Hooks
The ::document-saved signal is emitted when an document is saved successfully
|
the plugin that received the signal |
|
the CodeSlayerSourceView that was saved |
|
user data set when the signal handler was connected. |
"document-switched"
signalvoid user_function (CodeSlayer *codeslayer,
CodeSlayerDocument *document,
gpointer user_data) : No Hooks
The ::document-switched signal is emitted when the active document is switched in the notebook
|
the plugin that received the signal |
|
the CodeSlayerSourceView switched to |
|
user data set when the signal handler was connected. |
"documents-all-saved"
signalvoid user_function (CodeSlayer *codeslayer,
gpointer documents,
gpointer user_data) : No Hooks
The ::documents-all-saved signal is emitted when all the documents have been saved successfully
|
the plugin that received the signal |
|
a GList of CodeSlayerSourceView objects that were saved |
|
user data set when the signal handler was connected. |
"project-properties-opened"
signalvoid user_function (CodeSlayer *codeslayer,
CodeSlayerProject *project_properties,
gpointer user_data) : No Hooks
The ::project-properties-opened signal is emitted when the project properties window is opened
|
the plugin that received the signal |
|
the CodeSlayerProjectProperties switched to |
|
user data set when the signal handler was connected. |
"project-properties-saved"
signalvoid user_function (CodeSlayer *codeslayer,
CodeSlayerProject *project_properties,
gpointer user_data) : No Hooks
The ::project-properties-saved signal is emitted when the project properties window is closed
|
the plugin that received the signal |
|
the CodeSlayerProjectProperties switched to |
|
user data set when the signal handler was connected. |
"projects-changed"
signalvoid user_function (CodeSlayer *codeslayer,
gpointer user_data) : No Hooks
The ::projects-changed signal is invoked when the projects structure changed.
|
the plugin that received the signal |
|
user data set when the signal handler was connected. |