Horizon
Loading...
Searching...
No Matches
window_state_store.hpp
1#pragma once
2#include <string>
3
4namespace Gtk {
5class Window;
6}
7
8
9namespace horizon {
10namespace SQLite {
11class Database;
12}
13
15public:
16 WindowState(int ax, int ay, int aw, int ah, bool m = false) : x(ax), y(ay), width(aw), height(ah), maximized(m){};
17 WindowState(){};
18 int x = 0;
19 int y = 0;
20 int width = 1024;
21 int height = 768;
22 bool maximized = false;
23};
24
26public:
27 WindowStateStore(Gtk::Window *w, const std::string &window_name);
28 bool get_default_set() const;
29
30private:
32 const std::string window_name;
33 Gtk::Window *win = nullptr;
34 WindowState window_state;
35
36 bool load(const std::string &win, WindowState &ws);
37 void save(const std::string &win, const WindowState &ws);
38
39 void apply(const WindowState &ws);
40 bool default_set = false;
41};
42} // namespace horizon
Definition sqlite.hpp:72
Definition window_state_store.hpp:25
Definition window_state_store.hpp:14