Hyprland/src/managers/LayoutManager.hpp
zakk4223 4729265284
hyprctl: Add 'layouts' command (#3895)
* Add hyprctl 'layouts' command

formatting

* Add getAllLayoutNames(), move m_vLayouts back to private

Formatting

* clang-format
2023-11-21 18:43:38 +00:00

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;