ui: switch Graph to bucket grid layouting

This change introduces bucket grid layouting, which sorts the nodes into buckets based on how they are connected. Each
bucket is then layouted individually before they are arranged next to each other. Edges go from left to right, except
for inheritance edges that go from bottom to top.
This commit is contained in:
Eberhard Graether
2015-09-24 03:12:42 +02:00
parent c18bd6a8bc
commit 5825fe77ab
15 changed files with 575 additions and 56 deletions
+5 -4
View File
@@ -5,7 +5,6 @@
#include <memory>
#include "utility/math/Vector2.h"
#include "utility/math/Vector4.h"
#include "data/graph/Node.h"
#include "data/graph/token_component/TokenComponentAccess.h"
@@ -116,10 +115,12 @@ public:
static EdgeStyle getStyleForEdgeType(Edge::EdgeType type, bool isActive, bool isFocused);
static size_t toGridSize(size_t x);
static int toGridOffset(int x);
static int toGridSize(int x);
static int toGridGap(int x);
static size_t s_gridCellSize;
static size_t s_gridCellPadding;
static int s_gridCellSize;
static int s_gridCellPadding;
private:
static std::map<Node::NodeType, float> s_charWidths;