![]() |
![]() |
![]() |
CodeSlayer Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Signals |
#include <codeslayer/codeslayer-notebook.h> struct CodeSlayerNotebook; GtkWidget * codeslayer_notebook_new (GtkWindow *window
,CodeSlayerProfile *profile
); void codeslayer_notebook_add_document (CodeSlayerNotebook *notebook
,CodeSlayerDocument *document
); gboolean codeslayer_notebook_select_document (CodeSlayerNotebook *notebook
,CodeSlayerDocument *document
); void codeslayer_notebook_save_document (CodeSlayerNotebook *notebook
,gint page_num
); void codeslayer_notebook_save_all_documents (CodeSlayerNotebook *notebook
); gboolean codeslayer_notebook_has_unsaved_documents (CodeSlayerNotebook *notebook
); gboolean codeslayer_notebook_has_open_documents (CodeSlayerNotebook *notebook
); gboolean codeslayer_notebook_close_document (CodeSlayerNotebook *notebook
,gint page_num
); void codeslayer_notebook_close_all_documents (CodeSlayerNotebook *notebook
); GtkWidget * codeslayer_notebook_get_active_source_view (CodeSlayerNotebook *notebook
); GList * codeslayer_notebook_get_all_source_views (CodeSlayerNotebook *notebook
);
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkNotebook +----CodeSlayerNotebook
"document-saved" :No Hooks
"documents-all-saved" :No Hooks
"select-document" :No Hooks
"sync-notebook" :No Hooks
GtkWidget * codeslayer_notebook_new (GtkWindow *window
,CodeSlayerProfile *profile
);
Creates a new CodeSlayerNotebook.
|
a GtkWindow. |
|
a CodeSlayerProfile. |
Returns : |
a new CodeSlayerNotebook. |
void codeslayer_notebook_add_document (CodeSlayerNotebook *notebook
,CodeSlayerDocument *document
);
Add a new page to the notebook based on the document. This method is for internal use only.
|
a CodeSlayerNotebook. |
|
a CodeSlayerDocument. |
gboolean codeslayer_notebook_select_document (CodeSlayerNotebook *notebook
,CodeSlayerDocument *document
);
|
a CodeSlayerNotebook. |
|
a CodeSlayerDocument. |
Returns : |
is TRUE if the document is able to be found. |
void codeslayer_notebook_save_document (CodeSlayerNotebook *notebook
,gint page_num
);
|
a CodeSlayerNotebook. |
|
the notebook page to save. |
void codeslayer_notebook_save_all_documents
(CodeSlayerNotebook *notebook
);
|
a CodeSlayerNotebook. |
gboolean codeslayer_notebook_has_unsaved_documents
(CodeSlayerNotebook *notebook
);
|
a CodeSlayerNotebook. |
Returns : |
is FALSE unless there are documents that need to saved. |
gboolean codeslayer_notebook_has_open_documents
(CodeSlayerNotebook *notebook
);
|
a CodeSlayerNotebook. |
Returns : |
is TRUE if there are documents open in the notebook. |
gboolean codeslayer_notebook_close_document (CodeSlayerNotebook *notebook
,gint page_num
);
|
a CodeSlayerNotebook. |
|
the notebook page to close. Pages begin with 0 starting from the left. |
Returns : |
is TRUE unless the document needs to be saved. If the document needs to be saved then the page will not be closed and this method will return FALSE. |
void codeslayer_notebook_close_all_documents
(CodeSlayerNotebook *notebook
);
|
a CodeSlayerNotebook. |
GtkWidget * codeslayer_notebook_get_active_source_view
(CodeSlayerNotebook *notebook
);
|
a CodeSlayerNotebook. |
Returns : |
the active source view. |
GList * codeslayer_notebook_get_all_source_views
(CodeSlayerNotebook *notebook
);
|
a CodeSlayerNotebook. |
Returns : |
a GList of CodeSlayerSourceView. Note: you need to call g_list_free when you are done with the list. |
"document-saved"
signalvoid user_function (CodeSlayerNotebook *codeslayernotebook,
gpointer arg1,
gpointer user_data) : No Hooks
The ::document-saved signal is emitted when an document is saved successfully
|
the notebook that received the signal |
|
user data set when the signal handler was connected. |
"documents-all-saved"
signalvoid user_function (CodeSlayerNotebook *codeslayernotebook,
gpointer documents,
gpointer user_data) : No Hooks
The ::documents-all-saved signal is emitted when all the documents have been saved successfully
|
the notebook that received the signal |
|
a GList of CodeSlayerSourceView objects that were saved |
|
user data set when the signal handler was connected. |
"select-document"
signalvoid user_function (CodeSlayerNotebook *codeslayernotebook,
guint arg1,
gpointer user_data) : No Hooks
The ::document-saved signal is emitted when an document is saved successfully
|
the notebook that received the signal |
|
user data set when the signal handler was connected. |
"sync-notebook"
signalvoid user_function (CodeSlayerNotebook *codeslayernotebook,
gpointer user_data) : No Hooks
The ::sync-notebook signal is emitted when the notebook should sync up.
|
the notebook that received the signal |
|
user data set when the signal handler was connected. |