mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-06 00:06:00 +01:00
4729265284
* Add hyprctl 'layouts' command formatting * Add getAllLayoutNames(), move m_vLayouts back to private Formatting * clang-format
31 lines
912 B
C++
31 lines
912 B
C++
#pragma once
|
|
|
|
#include "../layout/DwindleLayout.hpp"
|
|
#include "../layout/MasterLayout.hpp"
|
|
|
|
class CLayoutManager {
|
|
public:
|
|
CLayoutManager();
|
|
|
|
IHyprLayout* getCurrentLayout();
|
|
|
|
void switchToLayout(std::string);
|
|
|
|
bool addLayout(const std::string& name, IHyprLayout* layout);
|
|
bool removeLayout(IHyprLayout* layout);
|
|
std::vector<std::string> getAllLayoutNames();
|
|
|
|
private:
|
|
enum HYPRLAYOUTS {
|
|
LAYOUT_DWINDLE = 0,
|
|
LAYOUT_MASTER
|
|
};
|
|
|
|
int m_iCurrentLayoutID = LAYOUT_DWINDLE;
|
|
|
|
CHyprDwindleLayout m_cDwindleLayout;
|
|
CHyprMasterLayout m_cMasterLayout;
|
|
std::vector<std::pair<std::string, IHyprLayout*>> m_vLayouts;
|
|
};
|
|
|
|
inline std::unique_ptr<CLayoutManager> g_pLayoutManager;
|