Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2013, Regents of the University of California |
| 4 | * Yingdi Yu |
| 5 | * |
| 6 | * BSD license, See the LICENSE file for more information |
| 7 | * |
| 8 | * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu> |
| 9 | * Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 10 | */ |
| 11 | |
| 12 | #ifndef TREELAYOUT_H |
| 13 | #define TREELAYOUT_H |
| 14 | #include <vector> |
| 15 | |
| 16 | class TreeLayout |
| 17 | { |
| 18 | public: |
| 19 | struct Coordinate |
| 20 | { |
| 21 | double x; |
| 22 | double y; |
| 23 | }; |
| 24 | TreeLayout(){} |
| 25 | virtual void setOneLevelLayout(std::vector<Coordinate> &childNodesCo){}; |
| 26 | void setSiblingDistance(int d) {m_siblingDistance = d;} |
| 27 | void setLevelDistance(int d) {m_levelDistance = d;} |
| 28 | int getSiblingDistance() {return m_siblingDistance;} |
| 29 | int getLevelDistance() {return m_levelDistance;} |
| 30 | virtual ~TreeLayout(){} |
| 31 | private: |
| 32 | int m_siblingDistance; |
| 33 | int m_levelDistance; |
| 34 | }; |
| 35 | |
| 36 | class OneLevelTreeLayout: public TreeLayout |
| 37 | { |
| 38 | public: |
| 39 | OneLevelTreeLayout(){} |
| 40 | virtual void setOneLevelLayout(std::vector<Coordinate> &childNodesCo); |
| 41 | virtual ~OneLevelTreeLayout(){} |
| 42 | }; |
| 43 | #endif |