29 #ifndef YGGDRASILWM_TREELAYOUTMANAGER_HPP
30 #define YGGDRASILWM_TREELAYOUTMANAGER_HPP
78 void updateGeometry(
unsigned int sizeX,
unsigned int sizeY,
unsigned int posX,
unsigned int posY)
override;
106 void addClient(std::shared_ptr<Client> client)
override;
BinarySpace class header.
LayoutManager class header.
BinarySpace class This class represents a space in the layout. it's designed like a binary tree,...
Definition: BinarySpace.hpp:41
The Client class is responsible for managing the client windows. It creates a frame around the client...
Definition: Client.hpp:47
LayoutManager class Interface for the layout managers.
Definition: LayoutManager.hpp:42
TreeLayoutManager class this class is a subclass of LayoutManager it handles the tree style layout Wh...
Definition: TreeLayoutManager.hpp:44
BinarySpace * findSpace(Client *client)
find the space containing the client it looks recursively for the space containing the client
Definition: TreeLayoutManager.cpp:75
void addClient(std::shared_ptr< Client > client) override
add a client to the layout it looks for the biggest space and splits it in two
Definition: TreeLayoutManager.cpp:110
TreeLayoutManager(Display *display, Window root, int sizeX, int sizeY, int posX, int posY, int borderSize, int gap, int barHeight)
Construct a new Tree Layout Manager object the size and position of the root space should take accoun...
Definition: TreeLayoutManager.cpp:29
void addClientRecursive(std::shared_ptr< Client > client, BinarySpace *space)
Definition: TreeLayoutManager.cpp:113
void removeClientRecursive(Client *client, BinarySpace *space)
recursive method to add a client to the layout
Definition: TreeLayoutManager.cpp:85
void recursiveShrinkSiblingSpace(BinarySpace *space, int inc, bool vertical)
Definition: TreeLayoutManager.cpp:201
void recursiveResize(const Point &size, const Point &pos, BinarySpace *space)
Definition: TreeLayoutManager.cpp:222
void deleteSpace(BinarySpace *space)
Definition: TreeLayoutManager.cpp:43
~TreeLayoutManager() override
Destroy the Tree Layout Manager object.
Definition: TreeLayoutManager.cpp:52
BinarySpace * findSpaceRecursive(Client *client, BinarySpace *space)
recursive method to find the space containing the client
Definition: TreeLayoutManager.cpp:56
void updateGeometry(unsigned int sizeX, unsigned int sizeY, unsigned int posX, unsigned int posY) override
update the geometry of the layout (resize)
Definition: TreeLayoutManager.cpp:53
void removeClient(Client *client) override
remove a client from the layout use the recursive method to remove the client
Definition: TreeLayoutManager.cpp:82
std::unique_ptr< BinarySpace > rootSpace_
Definition: TreeLayoutManager.hpp:156
void reSize(const Point &size, const Point &pos) override
Definition: TreeLayoutManager.cpp:214
void growSpace(Client *client, int inc)
grow the space of the client in the x axis
Definition: TreeLayoutManager.cpp:165
void splitSpace(const std::shared_ptr< Client > &client, BinarySpace *space, bool splitAlongX)
split a space in two Move the client to the left space and the old client to the right space increase...
Definition: TreeLayoutManager.cpp:139
void placeClientInSpace(const std::shared_ptr< Client > &client, BinarySpace *space)
place a client in a space moves and resizes the client window to fit the space restack the client win...
Definition: TreeLayoutManager.cpp:132
Point struct This struct represents a 2D point.
Definition: Point.hpp:8