infinipaint/src/GUIHolder.hpp

45 lines
1.7 KiB
C++
Raw Normal View History

#pragma once
#include "CustomEvents.hpp"
#include "GUIStuff/GUIManager.hpp"
2026-03-31 13:33:15 +03:00
class MainProgram;
class GUIHolder {
public:
2026-03-31 13:33:15 +03:00
GUIHolder(MainProgram& m);
GUIStuff::GUIManager gui;
void load_icons_at(const std::filesystem::path& pathToLoad);
void load_default_theme();
void save_theme(const std::filesystem::path& configPath, const std::string& themeName);
bool load_theme(const std::filesystem::path& configPath, const std::string& themeName);
void update();
void window_update();
2026-04-08 17:34:50 +03:00
void delete_cache_surface();
2026-03-31 13:33:15 +03:00
void draw(SkCanvas* canvas, bool skiaAA);
void input_paste_callback(const CustomEvents::PasteEvent& paste);
void input_text_key_callback(const InputManager::KeyCallbackArgs& key);
void input_text_callback(const InputManager::TextCallbackArgs& text);
void input_key_callback(const InputManager::KeyCallbackArgs& key);
2026-04-02 10:15:22 +03:00
void input_text_key_callback();
void input_text_input_callback();
void input_mouse_button_callback(const InputManager::MouseButtonCallbackArgs& button);
void input_mouse_motion_callback(const InputManager::MouseMotionCallbackArgs& motion);
void input_mouse_wheel_callback(const InputManager::MouseWheelCallbackArgs& wheel);
void input_finger_touch_callback(const InputManager::FingerTouchCallbackArgs& touch);
void input_finger_motion_callback(const InputManager::FingerMotionCallbackArgs& motion);
2026-03-31 13:33:15 +03:00
float final_gui_scale();
private:
void calculate_final_gui_scale();
float final_gui_scale_not_fit();
float finalCalculatedGuiScale;
MainProgram& main;
};