mirror of
https://github.com/usatiuk/dhfs.git
synced 2025-10-28 20:47:49 +01:00
63 lines
1.5 KiB
C++
63 lines
1.5 KiB
C++
#ifndef __LauncherAppMainFrame__
|
|
#define __LauncherAppMainFrame__
|
|
|
|
/**
|
|
@file
|
|
Subclass of MainFrame, which is generated by wxFormBuilder.
|
|
*/
|
|
|
|
#include "GLauncherApp.h"
|
|
|
|
//// end generated include
|
|
|
|
#include <wx/webview.h>
|
|
|
|
#include "DhfsGuiInstance.hpp"
|
|
|
|
static constexpr auto kJavaHomeSettingsKey = "DHFS/JavaHome";
|
|
static constexpr auto kMountPointSettingsKey = "DHFS/MountDir";
|
|
static constexpr auto kDataDirSettingsKey = "DHFS/DataDir";
|
|
|
|
wxDECLARE_EVENT(NEW_LINE_OUTPUT_EVENT, wxCommandEvent);
|
|
wxDECLARE_EVENT(DHFS_STATE_CHANGE_EVENT, wxCommandEvent);
|
|
|
|
/** Implementing MainFrame */
|
|
class LauncherAppMainFrame : public MainFrame {
|
|
protected:
|
|
// Handlers for MainFrame events.
|
|
void OnStartStopButtonClick(wxCommandEvent& event) override;
|
|
|
|
void OnJavaHomeChanged(wxFileDirPickerEvent& event) override;
|
|
|
|
void OnMountPathChanged(wxFileDirPickerEvent& event) override;
|
|
|
|
void OnDataPathChanged(wxFileDirPickerEvent& event) override;
|
|
|
|
void OnNotebookPageChanged(wxNotebookEvent& event) override;
|
|
|
|
void OnNotebookPageChanging(wxNotebookEvent& event) override;
|
|
|
|
void onNewLineOutput(wxCommandEvent& event);
|
|
|
|
void onShutdown(wxCommandEvent& event);
|
|
|
|
void updateState();
|
|
|
|
void unloadWebview();
|
|
void prepareWebview();
|
|
|
|
public:
|
|
/** Constructor */
|
|
LauncherAppMainFrame(wxWindow* parent);
|
|
|
|
//// end generated class members
|
|
|
|
private:
|
|
wxWebView* m_webView = nullptr;
|
|
wxGridSizer* m_webViewSizer;
|
|
|
|
DhfsGuiInstance _dhfsInstance{*this};
|
|
};
|
|
|
|
#endif // __LauncherAppMainFrame__
|