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

#include <MasterSpace.hpp>

Collaboration diagram for MasterSpace:
Collaboration graph

Public Member Functions

 MasterSpace (Point pos, Point size, int index, bool master, bool vertical, MasterSpace *parent=nullptr)
 
 ~MasterSpace ()
 
const PointgetPos () const
 
void setPos (const Point &pos)
 
const PointgetSize () const
 
void setSize (const Point &size)
 
bool isMaster () const
 
void setIsMaster (bool isMaster)
 
bool isVertical () const
 
void setIsVertical (bool isVertical)
 
int getIndex () const
 
void setIndex (int index)
 
int getSubspaceCount () const
 
void setSubspaceCount (int subspaceCount)
 
MasterSpacegetParent () const
 
void setParent (MasterSpace *parent)
 
MasterSpacegetMaster () const
 
void setMaster (std::unique_ptr< MasterSpace >master)
 
const std::vector< std::unique_ptr< MasterSpace > > & getSlaves () const
 
const std::weak_ptr< Client > & getClient () const
 
void setClient (const std::weak_ptr< Client > &client)
 

Private Attributes

Point pos_
 
Point size_
 
bool is_master_
 
bool is_vertical_
 
int index_
 
int subspace_count_
 
MasterSpaceparent_
 
std::unique_ptr< MasterSpacemaster_
 
std::vector< std::unique_ptr< MasterSpace > > slaves_
 
std::weak_ptr< Clientclient_
 

Constructor & Destructor Documentation

◆ MasterSpace()

MasterSpace::MasterSpace ( Point  pos,
Point  size,
int  index,
bool  master,
bool  vertical,
MasterSpace parent = nullptr 
)
34  :
35  pos_(pos),
36  size_(size),
37  index_(index),
38  is_master_(master),
39  is_vertical_(vertical),
40  subspace_count_(0){
41  if (parent) {
42  parent_ = parent;
43  }
44 }
Point size_
Definition: MasterSpace.hpp:66
bool is_vertical_
Definition: MasterSpace.hpp:68
int subspace_count_
Definition: MasterSpace.hpp:70
Point pos_
Definition: MasterSpace.hpp:65
MasterSpace * parent_
Definition: MasterSpace.hpp:71
bool is_master_
Definition: MasterSpace.hpp:67
int index_
Definition: MasterSpace.hpp:69

References parent_.

◆ ~MasterSpace()

MasterSpace::~MasterSpace ( )
default

Member Function Documentation

◆ getClient()

const std::weak_ptr< Client > & MasterSpace::getClient ( ) const
63 { return client_; }
std::weak_ptr< Client > client_
Definition: MasterSpace.hpp:74

References client_.

◆ getIndex()

int MasterSpace::getIndex ( ) const
54 { return index_; }

References index_.

◆ getMaster()

MasterSpace * MasterSpace::getMaster ( ) const
60 { return master_.get(); }
std::unique_ptr< MasterSpace > master_
Definition: MasterSpace.hpp:72

References master_.

◆ getParent()

MasterSpace * MasterSpace::getParent ( ) const
58 { return parent_; }

References parent_.

◆ getPos()

const Point & MasterSpace::getPos ( ) const
46 { return pos_; }

References pos_.

◆ getSize()

const Point & MasterSpace::getSize ( ) const
48 { return size_; }

References size_.

◆ getSlaves()

const std::vector< std::unique_ptr< MasterSpace > > & MasterSpace::getSlaves ( ) const
62 { return slaves_; }
std::vector< std::unique_ptr< MasterSpace > > slaves_
Definition: MasterSpace.hpp:73

References slaves_.

◆ getSubspaceCount()

int MasterSpace::getSubspaceCount ( ) const
56 { return subspace_count_; }

References subspace_count_.

◆ isMaster()

bool MasterSpace::isMaster ( ) const
50 { return is_master_; }

References is_master_.

Referenced by setIsMaster().

Here is the caller graph for this function:

◆ isVertical()

bool MasterSpace::isVertical ( ) const
52 { return is_vertical_; }

References is_vertical_.

Referenced by setIsVertical().

Here is the caller graph for this function:

◆ setClient()

void MasterSpace::setClient ( const std::weak_ptr< Client > &  client)
64 { client_ = client; }

References client_.

◆ setIndex()

void MasterSpace::setIndex ( int  index)
55 { index_ = index; }

References index_.

◆ setIsMaster()

void MasterSpace::setIsMaster ( bool  isMaster)
51 { is_master_ = isMaster; }
bool isMaster() const
Definition: MasterSpace.cpp:50

References is_master_, and isMaster().

Here is the call graph for this function:

◆ setIsVertical()

void MasterSpace::setIsVertical ( bool  isVertical)
bool isVertical() const
Definition: MasterSpace.cpp:52

References is_vertical_, and isVertical().

Here is the call graph for this function:

◆ setMaster()

void MasterSpace::setMaster ( std::unique_ptr< MasterSpace master)
61 { master_ = std::move(master); }

References master_.

◆ setParent()

void MasterSpace::setParent ( MasterSpace parent)
59 { parent_ = parent; }

References parent_.

◆ setPos()

void MasterSpace::setPos ( const Point pos)
47 { pos_ = pos; }

References pos_.

◆ setSize()

void MasterSpace::setSize ( const Point size)
49 { size_ = size; }

References size_.

◆ setSubspaceCount()

void MasterSpace::setSubspaceCount ( int  subspaceCount)
57 { subspace_count_ = subspaceCount; }

References subspace_count_.

Member Data Documentation

◆ client_

std::weak_ptr<Client> MasterSpace::client_
private

Referenced by getClient(), and setClient().

◆ index_

int MasterSpace::index_
private

Referenced by getIndex(), and setIndex().

◆ is_master_

bool MasterSpace::is_master_
private

Referenced by isMaster(), and setIsMaster().

◆ is_vertical_

bool MasterSpace::is_vertical_
private

Referenced by isVertical(), and setIsVertical().

◆ master_

std::unique_ptr<MasterSpace> MasterSpace::master_
private

Referenced by getMaster(), and setMaster().

◆ parent_

MasterSpace* MasterSpace::parent_
private

Referenced by getParent(), MasterSpace(), and setParent().

◆ pos_

Point MasterSpace::pos_
private

Referenced by getPos(), and setPos().

◆ size_

Point MasterSpace::size_
private

Referenced by getSize(), and setSize().

◆ slaves_

std::vector<std::unique_ptr<MasterSpace> > MasterSpace::slaves_
private

Referenced by getSlaves().

◆ subspace_count_

int MasterSpace::subspace_count_
private

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