YggdrasilWM  0.1.1
A tiny window manager coded in C++
MasterLayoutManager Class Reference

#include <MasterLayoutManager.hpp>

Inheritance diagram for MasterLayoutManager:
Inheritance graph
Collaboration diagram for MasterLayoutManager:
Collaboration graph

Protected Attributes

int screen_width_
 
int screen_height_
 
int gap_
 
int border_size_
 
int space_count_
 
Display * display_
 
Window rootWindow_
 

Private Member Functions

 MasterLayoutManager (Display *display, Window root, int sizeX, int sizeY, int posX, int posY, int borderSize, int gap, int barHeight)
 
 ~MasterLayoutManager () override=default
 
void updateGeometry (unsigned int sizeX, unsigned int sizeY, unsigned int posX, unsigned int posY) override
 update the geometry of the layout used to resize the layout More...
 
void reSize (const Point &size, const Point &pos) override
 
void addClient (std::shared_ptr< Client > client) override
 add a client to the layout More...
 
void removeClient (Client *client) override
 remove a client from the layout More...
 

Private Attributes

std::unique_ptr< MasterSpacerootSpace_
 

Constructor & Destructor Documentation

◆ MasterLayoutManager()

MasterLayoutManager::MasterLayoutManager ( Display *  display,
Window  root,
int  sizeX,
int  sizeY,
int  posX,
int  posY,
int  borderSize,
int  gap,
int  barHeight 
)
private
55  :
56  LayoutManager(display,root,sizeX,sizeY,posX,posY,gap,barHeight) {
57  Point pos(posX, posY);
58  Point size(sizeX - borderSize, sizeY - borderSize);
59  this->rootSpace_ = std::make_unique<MasterSpace>(pos, size,0, true, true);
60 }
LayoutManager(Display *display, Window root, int size_x, int size_y, int pos_x, int pos_y, int gap, int border_size)
Construct a new LayoutManager object.
Definition: LayoutManager.cpp:29
std::unique_ptr< MasterSpace > rootSpace_
Definition: MasterLayoutManager.hpp:47
Point struct This struct represents a 2D point.
Definition: Point.hpp:8

References rootSpace_.

◆ ~MasterLayoutManager()

MasterLayoutManager::~MasterLayoutManager ( )
overrideprivatedefault

Member Function Documentation

◆ addClient()

void MasterLayoutManager::addClient ( std::shared_ptr< Client client)
overrideprivatevirtual

add a client to the layout

Parameters
client

Implements LayoutManager.

35  {
36 
37 }

◆ removeClient()

void MasterLayoutManager::removeClient ( Client client)
overrideprivatevirtual

remove a client from the layout

Parameters
client

Implements LayoutManager.

31  {
32 
33 }

◆ reSize()

void MasterLayoutManager::reSize ( const Point size,
const Point pos 
)
overrideprivatevirtual

Implements LayoutManager.

39  {
40 
41 }

◆ updateGeometry()

void MasterLayoutManager::updateGeometry ( unsigned int  sizeX,
unsigned int  sizeY,
unsigned int  posX,
unsigned int  posY 
)
overrideprivatevirtual

update the geometry of the layout used to resize the layout

Implements LayoutManager.

43  {
44 
45 }

Member Data Documentation

◆ border_size_

int LayoutManager::border_size_
protectedinherited

◆ display_

Display* LayoutManager::display_
protectedinherited

◆ gap_

int LayoutManager::gap_
protectedinherited

◆ rootSpace_

std::unique_ptr<MasterSpace> MasterLayoutManager::rootSpace_
private

Referenced by MasterLayoutManager().

◆ rootWindow_

Window LayoutManager::rootWindow_
protectedinherited

◆ screen_height_

int LayoutManager::screen_height_
protectedinherited

◆ screen_width_

int LayoutManager::screen_width_
protectedinherited

◆ space_count_

int LayoutManager::space_count_
protectedinherited

The documentation for this class was generated from the following files: