diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-09-24 20:00:16 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-09-24 20:00:16 -0500 |
commit | 348a1bfb244288b1c78d8ce3c8d8a8cb5c1bdebc (patch) | |
tree | 2f174aab662d753f2a9994fe6d0b7a1a06723156 /src/bookmouse.hpp | |
parent | 88864f8e3a4d87566d157ac176da3cb56257ca6d (diff) |
Start app rendering.
Diffstat (limited to 'src/bookmouse.hpp')
-rw-r--r-- | src/bookmouse.hpp | 49 |
1 files changed, 15 insertions, 34 deletions
diff --git a/src/bookmouse.hpp b/src/bookmouse.hpp index b2a3a5a..58872d8 100644 --- a/src/bookmouse.hpp +++ b/src/bookmouse.hpp @@ -1,49 +1,30 @@ #ifndef BOOKMOUSE_HPP #define BOOKMOUSE_HPP -#include "archive.hpp" - -#include <QtWidgets> -#include <cstdint> -#include <vector> +#include "gl_context.hpp" +#include "imgui_context.hpp" +#include "sdl_context.hpp" +#include "sdl_main_window.hpp" namespace bookmouse { -enum class PageLayout : uint8_t { - Single, - Dual, - Manga -}; - -class Bookmouse : public QWidget { - Q_OBJECT - +class Bookmouse { public: - friend class BookmouseApp; - Bookmouse(); + Bookmouse() noexcept(false); - public slots: - void setArchive(Archive* archive); - void next(); - void back(); + int run(); private: - void setPages(); - void setPagesNormal(); - void setPagesDual(); - void setPagesManga(); - void setPages(QLabel& label1, QLabel& label2); - - QLayout* m_layout{nullptr}; - - Archive* m_archive{nullptr}; - - PageLayout m_pageLayout{PageLayout::Single}; + SDL_Event pollEvent(); + void updateState(); + void renderFrame(); - QLabel m_pageLeft{}; - QLabel m_pageRight{}; + SdlContext m_sdlContext; + SdlMainWindow m_mainWindow; + GlContext m_glContext; + ImguiContext m_imgui; - size_t m_pageNumber{0}; + bool m_running{true}; }; } // namespace bookmouse |