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 18:17:31 +01:00
|
|
|
public:
|
2023-02-27 13:32:38 +01:00
|
|
|
CLayoutManager();
|
|
|
|
|
2023-11-21 19:43:38 +01:00
|
|
|
IHyprLayout* getCurrentLayout();
|
2022-03-19 15:59:53 +01:00
|
|
|
|
2023-11-21 19:43:38 +01:00
|
|
|
void switchToLayout(std::string);
|
2022-03-19 15:59:53 +01:00
|
|
|
|
2023-11-21 19:43:38 +01:00
|
|
|
bool addLayout(const std::string& name, IHyprLayout* layout);
|
|
|
|
bool removeLayout(IHyprLayout* layout);
|
|
|
|
std::vector<std::string> getAllLayoutNames();
|
2023-02-27 13:32:38 +01:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
private:
|
2023-11-21 19:43:38 +01:00
|
|
|
enum HYPRLAYOUTS {
|
2022-12-26 12:05:34 +01:00
|
|
|
LAYOUT_DWINDLE = 0,
|
|
|
|
LAYOUT_MASTER
|
2022-03-19 15:59:53 +01:00
|
|
|
};
|
|
|
|
|
2023-02-27 13:32:38 +01:00
|
|
|
int m_iCurrentLayoutID = LAYOUT_DWINDLE;
|
|
|
|
|
|
|
|
CHyprDwindleLayout m_cDwindleLayout;
|
|
|
|
CHyprMasterLayout m_cMasterLayout;
|
|
|
|
std::vector<std::pair<std::string, IHyprLayout*>> m_vLayouts;
|
2022-03-19 15:59:53 +01:00
|
|
|
};
|
|
|
|
|
2023-11-21 19:43:38 +01:00
|
|
|
inline std::unique_ptr<CLayoutManager> g_pLayoutManager;
|