cutter/src/widgets/GraphvizLayout.h
karliss e5d7bd660a
Add more graph widgets (#2273)
* Add generic r2 graph.
* Add Callgraph widgets
* Add more graphviz layouts.
* Fix some edge cases in graphGridLayout that were more likely to appear in callgraphs
* Refactor the code moving some of the logic out of disassemblyGraphWidget making it more reusable
2020-07-16 11:05:10 +03:00

33 lines
747 B
C++

#ifndef GRAPHVIZLAYOUT_H
#define GRAPHVIZLAYOUT_H
#include "core/Cutter.h"
#include "GraphLayout.h"
class GraphvizLayout : public GraphLayout
{
public:
enum class LayoutType {
DotOrtho,
DotPolyline,
Sfdp,
Neato,
TwoPi,
Circo,
};
enum class Direction {
TB,
LR
};
GraphvizLayout(LayoutType layoutType, Direction direction = Direction::TB);
virtual void CalculateLayout(std::unordered_map<ut64, GraphBlock> &blocks,
ut64 entry,
int &width,
int &height) const override;
private:
Direction direction;
LayoutType layoutType;
};
#endif // GRAPHVIZLAYOUT_H