MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / MainWindowImpl

Method MainWindowImpl

src/gui/mainwindow.cc:56–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55public:
56 MainWindowImpl():
57 MainWindowGen(nullptr),
58 _logStreamBuf(
59 [this](const std::string& s)
60 {
61 if (_logWindow)
62 _logWindow->GetTextControl()->AppendText(s);
63 }),
64 _logStream(&_logStreamBuf),
65 _logRenderer(LogRenderer::create(_logStream))
66 {
67 Logger::setLogger(
68 [&](const AnyLogMessage& message)
69 {
70 if (isWorkerThread())
71 {
72 runOnUiThread(
73 [message, this]()
74 {
75 OnLogMessage(message);
76 });
77 }
78 else
79 OnLogMessage(message);
80 });
81
82 _logWindow.reset(
83 TextViewerWindow::Create(this, "Log viewer", "", false));
84 _configWindow.reset(
85 TextViewerWindow::Create(this, "Configuration viewer", "", false));
86
87 _exitTimer.Bind(wxEVT_TIMER,
88 [this](auto&)
89 {
90 wxCommandEvent e;
91 OnExit(e);
92 });
93
94 CreateStatusBar();
95
96 _statusBar->Bind(PROGRESSBAR_STOP_EVENT,
97 [this](auto&)
98 {
99 emergencyStop = true;
100 });
101
102 _panelComponents[0] = _idlePanel =
103 IdlePanel::Create(this, dataNotebook);
104 _panelComponents[1] = _imagerPanel =
105 ImagerPanel::Create(this, dataNotebook);
106 _panelComponents[2] = _browserPanel =
107 BrowserPanel::Create(this, dataNotebook);
108 _panelComponents[3] = _explorerPanel =
109 ExplorerPanel::Create(this, dataNotebook);
110
111 wxIcon icon;
112 icon.CopyFromBitmap(_idlePanel->GetBitmap());
113 SetIcon(icon);

Callers

nothing calls this directly

Calls 6

isWorkerThreadFunction · 0.85
LayoutClass · 0.85
GetBitmapMethod · 0.80
runOnUiThreadFunction · 0.70
GetTextControlMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected