ASAPCabinetFE
 
Loading...
Searching...
No Matches
screenshot_window.h
Go to the documentation of this file.
1
10#ifndef SCREENSHOT_WINDOW_H
11#define SCREENSHOT_WINDOW_H
12
13#include <string>
14#include <SDL2/SDL.h>
15#include <SDL2/SDL_ttf.h>
16
21class IConfigService;
22
28
39public:
48 ScreenshotWindow(IConfigService* configManager, IKeybindProvider* keybindProvider);
49
56
66 bool initialize(int width, int height);
67
73 void render();
74
80 void raiseAndFocus();
81
87 void cleanup();
88
94 SDL_Window* getWindow() const { return window_; }
95
96private:
97 IConfigService* configManager_;
98 IKeybindProvider* keybindProvider_;
99 SDL_Window* window_;
100 SDL_Renderer* renderer_;
101 TTF_Font* font_;
102 SDL_Texture* textTexture_;
103 SDL_Rect buttonRect_;
104 std::string buttonText_;
105};
106
107#endif // SCREENSHOT_WINDOW_H
Interface for configuration services (forward declaration).
Definition iconfig_service.h:30
Interface for keybind providers (forward declaration).
Definition ikeybind_provider.h:30
Manages the SDL window for screenshot capture UI.
Definition screenshot_window.h:38
SDL_Window * getWindow() const
Gets the SDL window.
Definition screenshot_window.h:94
void render()
Renders the screenshot UI.
Definition screenshot_window.cpp:91
bool initialize(int width, int height)
Initializes the SDL window and renderer.
Definition screenshot_window.cpp:25
~ScreenshotWindow()
Destroys the ScreenshotWindow instance.
Definition screenshot_window.cpp:18
void raiseAndFocus()
Raises and focuses the window.
Definition screenshot_window.cpp:102
void cleanup()
Cleans up SDL resources.
Definition screenshot_window.cpp:120