Zhenkai Zhu | 5c6ad57 | 2012-06-04 19:50:08 -0700 | [diff] [blame] | 1 | #ifndef TREELAYOUT_H |
| 2 | #define TREELAYOUT_H |
| 3 | #include <vector> |
| 4 | |
| 5 | class TreeLayout |
| 6 | { |
| 7 | public: |
| 8 | struct Coordinate |
| 9 | { |
| 10 | double x; |
| 11 | double y; |
| 12 | }; |
| 13 | TreeLayout(){} |
| 14 | virtual void setOneLevelLayout(std::vector<Coordinate> &childNodesCo){}; |
| 15 | void setSiblingDistance(int d) {m_siblingDistance = d;} |
| 16 | void setLevelDistance(int d) {m_levelDistance = d;} |
| 17 | int getSiblingDistance() {return m_siblingDistance;} |
| 18 | int getLevelDistance() {return m_levelDistance;} |
| 19 | virtual ~TreeLayout(){} |
| 20 | private: |
| 21 | int m_siblingDistance; |
| 22 | int m_levelDistance; |
| 23 | }; |
| 24 | |
| 25 | class OneLevelTreeLayout: public TreeLayout |
| 26 | { |
| 27 | public: |
| 28 | OneLevelTreeLayout(){} |
Zhenkai Zhu | 21d75f9 | 2012-06-04 21:23:34 -0700 | [diff] [blame] | 29 | virtual void setOneLevelLayout(std::vector<Coordinate> &childNodesCo); |
Zhenkai Zhu | 5c6ad57 | 2012-06-04 19:50:08 -0700 | [diff] [blame] | 30 | virtual ~OneLevelTreeLayout(){} |
| 31 | }; |
| 32 | #endif |