summaryrefslogtreecommitdiff
path: root/flowgraph.cpp
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2019-02-28 22:18:52 -0500
committerRusty Wagner <rusty@vector35.com>2019-03-20 12:58:42 -0400
commit4ed3228ecdb1a6ec5b22341ae2ddd1b090577628 (patch)
tree9acbe4a714d6929b5fc26154a82c92a48da4a44c /flowgraph.cpp
parent6e05d56c53c31ac2b87cc64b48d6b501b1ca0650 (diff)
Add flow graph options for additional UI features
Diffstat (limited to 'flowgraph.cpp')
-rw-r--r--flowgraph.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/flowgraph.cpp b/flowgraph.cpp
index df1474cd..64bfe364 100644
--- a/flowgraph.cpp
+++ b/flowgraph.cpp
@@ -148,12 +148,27 @@ Ref<Function> FlowGraph::GetFunction() const
}
+Ref<BinaryView> FlowGraph::GetView() const
+{
+ BNBinaryView* view = BNGetViewForFlowGraph(m_object);
+ if (!view)
+ return nullptr;
+ return new BinaryView(view);
+}
+
+
void FlowGraph::SetFunction(Function* func)
{
BNSetFunctionForFlowGraph(m_object, func ? func->GetObject() : nullptr);
}
+void FlowGraph::SetView(BinaryView* view)
+{
+ BNSetViewForFlowGraph(m_object, view ? view->GetObject() : nullptr);
+}
+
+
int FlowGraph::GetHorizontalNodeMargin() const
{
return BNGetHorizontalFlowGraphNodeMargin(m_object);
@@ -344,6 +359,18 @@ Ref<FlowGraph> FlowGraph::Update()
}
+void FlowGraph::SetOption(BNFlowGraphOption option, bool value)
+{
+ BNSetFlowGraphOption(m_object, option, value);
+}
+
+
+bool FlowGraph::IsOptionSet(BNFlowGraphOption option)
+{
+ return BNIsFlowGraphOptionSet(m_object, option);
+}
+
+
CoreFlowGraph::CoreFlowGraph(BNFlowGraph* graph): FlowGraph(graph)
{
}