1
0
mirror of synced 2024-11-25 16:20:23 +01:00
ImHex/main/include/window.hpp
WerWolv d8219ad971
build: Cleaned up cmake build structure (#399)
* build: Cleanup build process, move main application to /main folder

* build: Try fixing MacOS bundling

* build: Fixed swapped parameters

* build: One imhex -> main too much

* build: Move resources to a better location

* build: Try to fix macos bundle creation

* build: More bundle fixes

* build: Fixed syntax

* build: Another try

* build: Added macos debugging stuff

* build: Fix bundle path

* build: Removed duplicated adding of Frameworks folder to rpath

* build: Removed debugging
2022-01-15 00:14:12 +01:00

74 lines
1.6 KiB
C++

#pragma once
#include <filesystem>
#include <memory>
#include <string>
#include <list>
#include <vector>
#include <hex/views/view.hpp>
struct GLFWwindow;
struct ImGuiSettingsHandler;
namespace hex {
class Window {
public:
Window();
~Window();
void loop();
static void initNative();
private:
void setupNativeWindow();
void beginNativeWindowFrame();
void endNativeWindowFrame();
void drawTitleBar();
void frameBegin();
void frame();
void frameEnd();
void drawWelcomeScreen();
void resetLayout();
void initGLFW();
void initImGui();
void deinitGLFW();
void deinitImGui();
friend void *ImHexSettingsHandler_ReadOpenFn(ImGuiContext *ctx, ImGuiSettingsHandler *, const char *);
friend void ImHexSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsHandler *handler, void *, const char* line);
friend void ImHexSettingsHandler_WriteAll(ImGuiContext* ctx, ImGuiSettingsHandler *handler, ImGuiTextBuffer *buf);
GLFWwindow* m_window = nullptr;
double m_targetFps = 60.0;
bool m_demoWindowOpen = false;
bool m_layoutConfigured = false;
std::string m_windowTitle;
double m_lastFrameTime;
bool m_prevKeysDown[512];
std::string m_availableUpdate;
bool m_showTipOfTheDay;
std::string m_tipOfTheDay;
ImGui::Texture m_bannerTexture = { 0 };
ImGui::Texture m_logoTexture = { 0 };
fs::path m_safetyBackupPath;
std::list<std::string> m_popupsToOpen;
std::vector<int> m_pressedKeys;
};
}