Files
palera1n/src/wx/AppFrame.hpp
T

53 lines
1.2 KiB
C++
Raw Normal View History

2026-06-19 17:51:51 -07:00
#ifndef APPFRAME_H
#define APPFRAME_H
#ifdef WITH_GUI
#include <wx/wx.h>
2026-07-06 04:05:57 -07:00
#include "../event.hpp"
2026-06-19 17:51:51 -07:00
#include "MainPanel.hpp"
#include "SettingsPanel.hpp"
#include "RecoveryPanel.hpp"
#include "DfuPanel.hpp"
#include "ExploitPanel.hpp"
void send_device_state(MainFrame* frame, const DeviceState& state);
class MainFrame : public wxFrame
{
public:
MainFrame();
void ShowMain();
void ShowSettings();
void ShowRecovery();
void ShowDfu();
void ShowExploit();
const DeviceState& GetDeviceState() const { return m_state; }
void UpdateDeviceState(const DeviceState& state);
MainPanel* GetMainPanel() const { return m_main; }
SettingsPanel* GetSettingsPanel() const { return m_settings; }
RecoveryPanel* GetRecoveryPanel() const { return m_recovery; }
DfuPanel* GetDfuPanel() const { return m_dfu; }
ExploitPanel* GetExploitPanel() const { return m_exploit; }
private:
MainPanel* m_main = nullptr;
SettingsPanel* m_settings = nullptr;
RecoveryPanel* m_recovery = nullptr;
DfuPanel* m_dfu = nullptr;
ExploitPanel* m_exploit = nullptr;
DeviceState m_state;
};
class PalerainApp : public wxApp {
public:
bool OnInit() override;
};
#endif // WITH_GUI
#endif // APPFRAME_H