SPH
src
gui
windows
MainWindow.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
gui/Project.h
"
4
#include "
gui/Settings.h
"
5
#include "
io/Path.h
"
6
#include "
objects/wrappers/RawPtr.h
"
7
#include <wx/frame.h>
8
9
class
wxMenu;
10
class
wxAuiManager;
11
class
wxAuiNotebook;
12
13
NAMESPACE_SPH_BEGIN
14
15
class
Controller
;
16
class
IPluginControls;
17
class
RunPage
;
18
class
NodeWindow
;
19
class
INode
;
20
21
wxAuiNotebook*
findNotebook
();
22
23
class
MainWindow
:
public
wxFrame {
24
friend
class
NodeManagerCallbacks
;
25
26
private
:
27
wxAuiNotebook* notebook;
28
NodeWindow
* nodePage;
29
30
struct
RunData {
31
AutoPtr<Controller>
controller;
32
bool
isRun;
33
};
34
35
FlatMap<RunPage*, RunData>
runs;
36
37
Path
projectPath;
38
bool
savedFlag =
true
;
39
wxMenu* runMenu;
40
41
public
:
42
MainWindow
(
const
Path
& openPath =
Path
());
43
44
private
:
45
wxMenu* createProjectMenu();
46
47
wxMenu* createRunMenu();
48
49
wxMenu* createAnalysisMenu();
50
51
wxMenu* createResultMenu();
52
53
void
addPage(
SharedPtr<INode>
node,
const
RunSettings
& globals,
const
std::string pageName);
54
55
bool
removeAll();
56
57
void
saveAs();
58
59
void
save();
60
61
void
open(
const
Path
& openPath,
const
bool
setDefaults);
62
63
void
load(
const
Path
& openPath =
Path
(
""
));
64
65
void
setProjectPath(
const
Path
& newPath);
66
67
void
markSaved(
const
bool
saved);
68
69
void
onClose(wxCloseEvent& evt);
70
71
void
enableMenus(
const
Size
id
);
72
73
void
enableRunMenu(
const
bool
enableControls,
const
bool
enableCamera);
74
75
bool
closeRun(
const
Size
id
);
76
77
int
checkUnsavedSession();
78
};
79
80
NAMESPACE_SPH_END
NAMESPACE_SPH_BEGIN
NAMESPACE_SPH_BEGIN
Definition:
BarnesHut.cpp:13
Size
uint32_t Size
Integral type used to index arrays (by default).
Definition:
Globals.h:16
findNotebook
wxAuiNotebook * findNotebook()
Definition:
MainWindow.cpp:28
NAMESPACE_SPH_END
#define NAMESPACE_SPH_END
Definition:
Object.h:12
Path.h
Object representing a path on a filesystem, similar to std::filesystem::path in c++17.
Project.h
RawPtr.h
Simple non-owning wrapper of pointer.
AutoPtr< Controller >
Controller
Main GUI class connection the simulation with UI controls.
Definition:
Controller.h:42
FlatMap< RunPage *, RunData >
INode
Provides an interface for running a simulation.
Definition:
Node.h:53
MainWindow
Definition:
MainWindow.h:23
MainWindow::MainWindow
MainWindow(const Path &openPath=Path())
Definition:
MainWindow.cpp:112
NodeManagerCallbacks
Definition:
MainWindow.cpp:92
NodeWindow
Definition:
NodePage.h:216
Path
Object representing a path on a filesystem.
Definition:
Path.h:17
RunPage
Main frame of the application.
Definition:
RunPage.h:44
Settings< RunSettingsId >
SharedPtr< INode >
Settings.h
Generated by
1.9.1