2022-03-19 15:59:53 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "../layout/DwindleLayout.hpp"
|
2022-07-16 15:57:31 +02:00
|
|
|
#include "../layout/MasterLayout.hpp"
|
2022-03-19 15:59:53 +01:00
|
|
|
|
|
|
|
|
class CLayoutManager {
|
2022-12-16 17:17:31 +00:00
|
|
|
public:
|
2023-02-27 12:32:38 +00:00
|
|
|
CLayoutManager();
|
|
|
|
|
|
2023-11-21 13:43:38 -05:00
|
|
|
IHyprLayout* getCurrentLayout();
|
2022-03-19 15:59:53 +01:00
|
|
|
|
2023-11-21 13:43:38 -05:00
|
|
|
void switchToLayout(std::string);
|
2022-03-19 15:59:53 +01:00
|
|
|
|
2023-11-21 13:43:38 -05:00
|
|
|
bool addLayout(const std::string& name, IHyprLayout* layout);
|
|
|
|
|
bool removeLayout(IHyprLayout* layout);
|
|
|
|
|
std::vector<std::string> getAllLayoutNames();
|
2023-02-27 12:32:38 +00:00
|
|
|
|
2022-12-16 17:17:31 +00:00
|
|
|
private:
|
2024-12-07 18:51:18 +01:00
|
|
|
enum eHyprLayouts : uint8_t {
|
2022-12-26 12:05:34 +01:00
|
|
|
LAYOUT_DWINDLE = 0,
|
|
|
|
|
LAYOUT_MASTER
|
2022-03-19 15:59:53 +01:00
|
|
|
};
|
|
|
|
|
|
2025-05-02 17:07:20 +02:00
|
|
|
int m_currentLayoutID = LAYOUT_DWINDLE;
|
2023-02-27 12:32:38 +00:00
|
|
|
|
2025-05-02 17:07:20 +02:00
|
|
|
CHyprDwindleLayout m_dwindleLayout;
|
|
|
|
|
CHyprMasterLayout m_masterLayout;
|
|
|
|
|
std::vector<std::pair<std::string, IHyprLayout*>> m_layouts;
|
2022-03-19 15:59:53 +01:00
|
|
|
};
|
|
|
|
|
|
2025-01-23 21:55:41 +01:00
|
|
|
inline UP<CLayoutManager> g_pLayoutManager;
|