CodeSlayerEngine

CodeSlayerEngine — Central delegation class.

Synopsis

#include <codeslayer/codeslayer-engine.h>

struct              CodeSlayerEngine;
CodeSlayerEngine *  codeslayer_engine_new               (GtkWindow *window,
                                                         CodeSlayerSettings *settings,
                                                         CodeSlayerPreferences *preferences,
                                                         CodeSlayerPlugins *plugins,
                                                         CodeSlayerGroups *groups,
                                                         GtkWidget *projects,
                                                         GtkWidget *menubar,
                                                         GtkWidget *notebook_pane,
                                                         GtkWidget *side_pane,
                                                         GtkWidget *bottom_pane);
gboolean            codeslayer_engine_close_active_group
                                                        (CodeSlayerEngine *engine);
void                codeslayer_engine_open_active_group (CodeSlayerEngine *engine);

Object Hierarchy

  GObject
   +----CodeSlayerEngine

Description

The engine sits in the middle of the framework and delegates calls out to the rest of the API. For instance the "group-changed" menu command will send a signal to the engine, which in turn invokes the correct functions on the projects tree and notebook to load up the requested group. By having such a central engine we can keep various parts of the application very decoupled.

Details

struct CodeSlayerEngine

struct CodeSlayerEngine;

codeslayer_engine_new ()

CodeSlayerEngine *  codeslayer_engine_new               (GtkWindow *window,
                                                         CodeSlayerSettings *settings,
                                                         CodeSlayerPreferences *preferences,
                                                         CodeSlayerPlugins *plugins,
                                                         CodeSlayerGroups *groups,
                                                         GtkWidget *projects,
                                                         GtkWidget *menubar,
                                                         GtkWidget *notebook_pane,
                                                         GtkWidget *side_pane,
                                                         GtkWidget *bottom_pane);

Creates a new CodeSlayerEngine. There should be only one engine per application.

window :

a GtkWindow.

settings :

a CodeSlayerSettings.

preferences :

a CodeSlayerPreferences.

plugins :

a CodeSlayerPlugins.

groups :

a CodeSlayerGroups.

projects :

a CodeSlayerProjects.

menubar :

a CodeSlayerMenuBar.

notebook_pane :

a CodeSlayerNotebookPane.

side_pane :

a CodeSlayerSidePane.

bottom_pane :

a CodeSlayerBottomPane.

Returns :

a new CodeSlayerEngine.

codeslayer_engine_close_active_group ()

gboolean            codeslayer_engine_close_active_group
                                                        (CodeSlayerEngine *engine);

Close the current active CodeSlayerGroup.

engine :

a CodeSlayerEngine.

Returns :

TRUE if the active group closed successfully.

codeslayer_engine_open_active_group ()

void                codeslayer_engine_open_active_group (CodeSlayerEngine *engine);

Open the CodeSlayerGroup marked as active.

engine :

a CodeSlayerEngine.