CodeSlayerNotebook

CodeSlayerNotebook — Contains the pages.

Synopsis

#include <codeslayer/codeslayer-notebook.h>

struct              CodeSlayerNotebook;
GtkWidget *         codeslayer_notebook_new             (GtkWindow *window,
                                                         CodeSlayerPreferences *preferences,
                                                         CodeSlayerSettings *settings);
void                codeslayer_notebook_add_editor      (CodeSlayerNotebook *notebook,
                                                         CodeSlayerDocument *document);
void                codeslayer_notebook_save_editor     (CodeSlayerNotebook *notebook,
                                                         gint page_num);
void                codeslayer_notebook_save_all_editors
                                                        (CodeSlayerNotebook *notebook);
gboolean            codeslayer_notebook_has_unsaved_editors
                                                        (CodeSlayerNotebook *notebook);
gboolean            codeslayer_notebook_close_editor    (CodeSlayerNotebook *notebook,
                                                         gint page_num);
void                codeslayer_notebook_close_all_editors
                                                        (CodeSlayerNotebook *notebook);
GtkWidget *         codeslayer_notebook_get_active_editor
                                                        (CodeSlayerNotebook *notebook);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkNotebook
                           +----CodeSlayerNotebook

Implemented Interfaces

CodeSlayerNotebook implements AtkImplementorIface and GtkBuildable.

Signals

  "editor-saved"                                   : No Hooks
  "editors-all-saved"                              : No Hooks
  "select-editor"                                  : No Hooks

Description

A notebook which contains pages of documents to edit.

Details

struct CodeSlayerNotebook

struct CodeSlayerNotebook;

codeslayer_notebook_new ()

GtkWidget *         codeslayer_notebook_new             (GtkWindow *window,
                                                         CodeSlayerPreferences *preferences,
                                                         CodeSlayerSettings *settings);

Creates a new CodeSlayerNotebook.

window :

a GtkWindow.

preferences :

a CodeSlayerPreferences.

settings :

a CodeSlayerSettings.

Returns :

a new CodeSlayerNotebook.

codeslayer_notebook_add_editor ()

void                codeslayer_notebook_add_editor      (CodeSlayerNotebook *notebook,
                                                         CodeSlayerDocument *document);

Add a new page to the notebook based on the document. This method is for internal use only. The correct way for plugins to add a page is to call the codeslayer_projects_select_document() method. That will select the document in the tree and then call this method to add the page to the notebook.

notebook :

a CodeSlayerNotebook.

document :

a CodeSlayerDocument.

codeslayer_notebook_save_editor ()

void                codeslayer_notebook_save_editor     (CodeSlayerNotebook *notebook,
                                                         gint page_num);

notebook :

a CodeSlayerNotebook.

page_num :

the notebook page to save. Pages begin with 0 starting from the left.

codeslayer_notebook_save_all_editors ()

void                codeslayer_notebook_save_all_editors
                                                        (CodeSlayerNotebook *notebook);

notebook :

a CodeSlayerNotebook.

codeslayer_notebook_has_unsaved_editors ()

gboolean            codeslayer_notebook_has_unsaved_editors
                                                        (CodeSlayerNotebook *notebook);

codeslayer_notebook_close_editor ()

gboolean            codeslayer_notebook_close_editor    (CodeSlayerNotebook *notebook,
                                                         gint page_num);

notebook :

a CodeSlayerNotebook.

page_num :

the notebook page to close. Pages begin with 0 starting from the left.

Returns :

is TRUE unless the editor needs to be saved. If the editor needs to be saved then the page will not be closed and this method will return FALSE.

codeslayer_notebook_close_all_editors ()

void                codeslayer_notebook_close_all_editors
                                                        (CodeSlayerNotebook *notebook);

notebook :

a CodeSlayerNotebook.

codeslayer_notebook_get_active_editor ()

GtkWidget *         codeslayer_notebook_get_active_editor
                                                        (CodeSlayerNotebook *notebook);

notebook :

a CodeSlayerNotebook.

Returns :

the active editor.

Signal Details

The "editor-saved" signal

void                user_function                      (CodeSlayerNotebook *codeslayernotebook,
                                                        gpointer            arg1,
                                                        gpointer            user_data)               : No Hooks

The ::editor-saved signal is emitted when an editor is saved successfully

codeslayernotebook :

the notebook that received the signal

user_data :

user data set when the signal handler was connected.

The "editors-all-saved" signal

void                user_function                      (CodeSlayerNotebook *codeslayernotebook,
                                                        gpointer            editors,
                                                        gpointer            user_data)               : No Hooks

The ::editors-all-saved signal is emitted when all the editors have been saved successfully

codeslayernotebook :

the notebook that received the signal

editors :

a GList of CodeSlayerEditor objects that were saved

user_data :

user data set when the signal handler was connected.

The "select-editor" signal

void                user_function                      (CodeSlayerNotebook *codeslayernotebook,
                                                        guint               arg1,
                                                        gpointer            user_data)               : No Hooks

The ::editor-saved signal is emitted when an editor is saved successfully

codeslayernotebook :

the notebook that received the signal

user_data :

user data set when the signal handler was connected.