gui: Display the trust tree
Change-Id: Id48227b0f2e903905d7c8eb9795d038d6562794c
diff --git a/src/tree-layout.h b/src/tree-layout.h
new file mode 100644
index 0000000..99e8cca
--- /dev/null
+++ b/src/tree-layout.h
@@ -0,0 +1,55 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ * Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ * Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ * Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#ifndef TREE_LAYOUT_H
+#define TREE_LAYOUT_H
+
+#include <vector>
+#include "trust-tree-node.h"
+
+class TreeLayout
+{
+public:
+ struct Coordinate
+ {
+ double x;
+ double y;
+ };
+ TreeLayout(){}
+ virtual void setOneLevelLayout(std::vector<Coordinate> &childNodesCo){};
+ void setSiblingDistance(int d) {m_siblingDistance = d;}
+ void setLevelDistance(int d) {m_levelDistance = d;}
+ int getSiblingDistance() {return m_siblingDistance;}
+ int getLevelDistance() {return m_levelDistance;}
+ virtual ~TreeLayout(){}
+private:
+ int m_siblingDistance;
+ int m_levelDistance;
+};
+
+class OneLevelTreeLayout : public TreeLayout
+{
+public:
+ OneLevelTreeLayout(){}
+ virtual void setOneLevelLayout(std::vector<Coordinate> &childNodesCo);
+ virtual ~OneLevelTreeLayout(){}
+};
+
+class MultipleLevelTreeLayout : public TreeLayout
+{
+public:
+ MultipleLevelTreeLayout(){}
+ virtual ~MultipleLevelTreeLayout(){}
+ virtual void setMultipleLevelTreeLayout(TrustTreeNodeList& nodeList);
+};
+
+#endif // TREE_LAYOUT_H