Skip to content

Latest commit

 

History

History
56 lines (47 loc) · 1.27 KB

Main.cc

File metadata and controls

56 lines (47 loc) · 1.27 KB
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <gtk/gtk.h>
#include "MainWindow.h"
#include "MainNotebook.h"
#include "LightingBoard.h"
#include "Stage.h"
#include "MainMenu.h"
MainWindow *pMainWnd;
MainMenu *pMainMenu;
MainNotebook *pNotebook;
LightingBoard *pBoard;
Stage *pStage;
GtkWidget *pBoardLabel;
GtkWidget *pStageLabel;
void MainWindowDeleteEvent()
{
delete pStage;
delete pBoard;
delete pNotebook;
delete pMainMenu;
delete pMainWnd;
gtk_main_quit();
}
void InitializeInterface()
{
pMainWnd = new MainWindow(&MainWindowDeleteEvent);
pNotebook = new MainNotebook();
pBoard = new LightingBoard();
pStage = new Stage();
pMainMenu = new MainMenu();
pMainWnd->AddObject(pMainMenu);
pMainWnd->AddObject(pNotebook);
pBoardLabel = gtk_label_new("Lighting Board");
pStageLabel = gtk_label_new("Stage");
pNotebook->AddObjectWithLabel(pBoard, pBoardLabel);
pNotebook->AddObjectWithLabel(pStage, pStageLabel);
pMainWnd->Show();
}
// This is where it all begins
int main(int argc, char *argv[])
{
gtk_init(&argc, &argv); // Initialize GTK widget library
InitializeInterface(); // Load our GUI application
// Stay here until we're notified that the
// GUI is finished.
gtk_main();
return 1;
}