wmi

git clone git://oldgit.suckless.org/wmi/
Log | Files | Refs | LICENSE

tree.h (848B)


      1 // Copyright (c) 2003 - 2009 Anselm R Garbe <anselm@garbe.us>
      2 // See LICENSE for license details.
      3 
      4 #ifndef __TREE_H
      5 #define __TREE_H
      6 
      7 #include "rectangle.h"
      8 
      9 class Frame;
     10 class Tree;
     11 
     12 /** Dual-Quad tree with some special WMI related functionality. */
     13 class Tree : public Rectangle {
     14 
     15 public:
     16 
     17     Tree(Tree *parent, Rectangle *rect);
     18 
     19     ~Tree();
     20 
     21     Tree *parent() const;
     22 
     23     void setParent(Tree *tree);
     24 
     25     void setFrame(Frame *frame);
     26 
     27     Frame *frame() const;
     28 
     29     Tree *first() const;
     30     Tree *last() const;
     31 
     32     void setChilds(Tree *first, Tree *last);
     33 
     34     void setHoriz(bool horiz);
     35     bool isHoriz() const;
     36 
     37     unsigned int visits() const;
     38     void setVisit(unsigned int visit);
     39 
     40 private:
     41 
     42     Tree *first_;
     43     Tree *last_;
     44     Tree *parent_;
     45     Frame *frame_;
     46     bool isHoriz_;
     47     unsigned int visits_;
     48 };
     49 
     50 #endif // __TREE_H