Module ida_graph
Global Variables
COLLAPSED_NODE
GLICTL_CENTER
MTG_DOT_NODE
MTG_GROUP_NODE
MTG_NON_DISPLAYABLE_NODE
NIFF_SHOW_CONTENTS
NIF_ALL
NIF_BG_COLOR
NIF_EA
NIF_FLAGS
NIF_FRAME_COLOR
NIF_TEXT
arrow_height
arrow_width
git_edge
git_elp
git_node
git_none
git_text
git_tool
grcode_attach_menu_item
grcode_calculating_layout
grcode_center_on
grcode_change_group_visibility
grcode_changed_graph
grcode_clear
grcode_clicked
grcode_create_circle_layout
grcode_create_digraph_layout
grcode_create_disasm_graph1
grcode_create_disasm_graph2
grcode_create_graph_viewer
grcode_create_group
grcode_create_interactive_graph
grcode_create_mutable_graph
grcode_create_tree_layout
grcode_create_user_graph_place
grcode_creating_group
grcode_dblclicked
grcode_del_custom_layout
grcode_del_node_info
grcode_delete_group
grcode_delete_interactive_graph
grcode_deleting_group
grcode_destroyed
grcode_edge_infos_wrapper_clear
grcode_edge_infos_wrapper_copy
grcode_empty
grcode_find_subgraph_node
grcode_fit_window
grcode_get_curnode
grcode_get_custom_layout
grcode_get_gli
grcode_get_graph_groups
grcode_get_graph_viewer
grcode_get_node_info
grcode_get_node_representative
grcode_get_selection
grcode_get_viewer_graph
grcode_gotfocus
grcode_group_visibility
grcode_is_visible_node
grcode_layout_calculated
grcode_lostfocus
grcode_node_qty
grcode_nrect
grcode_refresh_viewer
grcode_reserved
grcode_reserved2
grcode_set_custom_layout
grcode_set_edge
grcode_set_gli
grcode_set_graph_groups
grcode_set_node_info
grcode_set_titlebar_height
grcode_set_viewer_graph
grcode_user_draw
grcode_user_hint
grcode_user_refresh
grcode_user_size
grcode_user_text
grcode_user_title
grcode_viewer_create_groups
grcode_viewer_create_groups_vec
grcode_viewer_delete_groups
grcode_viewer_delete_groups_vec
grcode_viewer_groups_visibility
grcode_viewer_groups_visibility_vec
layout_circle
layout_digraph
layout_none
layout_orthogonal
layout_polar_tree
layout_radial_tree
layout_tree
xgap
ygap
Functions
calc_dist(p: point_t, q: point_t) ‑> double
calc_dist(p, q) -> double Calculate distance between p and q.
clr_node_info(gid: graph_id_t, node: int, flags: uint32) ‑> void
clr_node_info(gid, node, flags) Clear node info for the given node.
create_disasm_graph(*args) ‑> interactive_graph_t *
create_disasm_graph(ea) -> interactive_graph_t Create a graph using an arbitrary set of ranges.
create_disasm_graph(ranges) -> interactive_graph_t
create_graph_viewer(title: char const *, id: uval_t, callback: hook_cb_t *, ud: void *, title_height: int, parent: TWidget * = None) ‑> graph_viewer_t *
create_graph_viewer(title, id, callback, ud, title_height, parent=None) -> graph_viewer_t Create a custom graph viewer.
create_interactive_graph(id: uval_t) ‑> interactive_graph_t *
create_interactive_graph(id) -> interactive_graph_t Create a new empty graph with given id.
create_mutable_graph(id: uval_t) ‑> interactive_graph_t *
create_interactive_graph(id) -> interactive_graph_t Create a new empty graph with given id.
create_user_graph_place(node: int, lnnum: int) ‑> user_graph_place_t *
create_user_graph_place(node, lnnum) -> user_graph_place_t Get a copy of a user_graph_place_t (returns a pointer to static storage)
del_node_info(gid: graph_id_t, node: int) ‑> void
del_node_info(gid, node) Delete the node_info_t for the given node.
delete_interactive_graph(g: interactive_graph_t) ‑> void
delete_interactive_graph(g) Delete graph object. @warning: use this only if you are dealing with interactive_graph_t instances that have not been used together with a graph_viewer_t. If you have called set_viewer_graph() with your graph, the graph's lifecycle will be managed by the viewer, and you shouldn't interfere with it
delete_mutable_graph(g: interactive_graph_t) ‑> void
delete_interactive_graph(g) Delete graph object. @warning: use this only if you are dealing with interactive_graph_t instances that have not been used together with a graph_viewer_t. If you have called set_viewer_graph() with your graph, the graph's lifecycle will be managed by the viewer, and you shouldn't interfere with it
get_graph_viewer(parent: TWidget *) ‑> graph_viewer_t *
get_graph_viewer(parent) -> graph_viewer_t * Get custom graph viewer for given form.
get_node_info(out: node_info_t, gid: graph_id_t, node: int) ‑> bool
get_node_info(out, gid, node) -> bool Get node info.
get_viewer_graph(gv: graph_viewer_t *) ‑> interactive_graph_t *
get_viewer_graph(gv) -> interactive_graph_t Get graph object for given custom graph viewer.
pyg_close(_self: PyObject *) ‑> void
pyg_close(_self)
pyg_select_node(_self: PyObject *, nid: int) ‑> void
pyg_select_node(_self, nid)
pyg_show(_self: PyObject *) ‑> bool
pyg_show(_self) -> bool
refresh_viewer(gv: graph_viewer_t *) ‑> void
refresh_viewer(gv) Redraw the graph in the given view.
set_node_info(gid: graph_id_t, node: int, ni: node_info_t, flags: uint32) ‑> void
set_node_info(gid, node, ni, flags) Set node info.
set_viewer_graph(gv: graph_viewer_t *, g: interactive_graph_t) ‑> void
set_viewer_graph(gv, g) Set the underlying graph object for the given viewer.
viewer_attach_menu_item(g: graph_viewer_t *, name: char const *) ‑> bool
viewer_attach_menu_item(g, name) -> bool Attach a previously-registered action to the view's context menu. See kernwin.hpp for how to register actions.
viewer_center_on(gv: graph_viewer_t *, node: int) ‑> void
viewer_center_on(gv, node) Center the graph view on the given node.
viewer_create_groups(gv: graph_viewer_t *, out_group_nodes: intvec_t *, gi: groups_crinfos_t const &) ‑> bool
viewer_create_groups(gv, out_group_nodes, gi) -> bool This will perform an operation similar to what happens when a user manually selects a set of nodes, right-clicks and selects "Create group". This is a wrapper around interactive_graph_t::create_group that will, in essence:
clone the current graph
for each group_crinfo_t, attempt creating group in that new graph
if all were successful, animate to that new graph. note: this accepts parameters that allow creating of multiple groups at once; which means only one graph animation will be triggered.
viewer_del_node_info(gv: graph_viewer_t *, n: int) ‑> void
viewer_del_node_info(gv, n) Delete node info for node in given viewer (see del_node_info())
viewer_delete_groups(gv: graph_viewer_t *, groups: intvec_t const &, new_current: int = -1) ‑> bool
viewer_delete_groups(gv, groups, new_current=-1) -> bool Wrapper around interactive_graph_t::delete_group. This function will:
clone the current graph
attempt deleting the groups in that new graph
if successful, animate to that new graph.
viewer_fit_window(gv: graph_viewer_t *) ‑> void
viewer_fit_window(gv) Fit graph viewer to its parent form.
viewer_get_curnode(gv: graph_viewer_t *) ‑> int
viewer_get_curnode(gv) -> int Get number of currently selected node (-1 if none)
viewer_get_gli(out: graph_location_info_t *, gv: graph_viewer_t *, flags: uint32 = 0) ‑> bool
viewer_get_gli(out, gv, flags=0) -> bool Get location info for given graph view If flags contains GLICTL_CENTER, then the gli that will be retrieved, will be the one at the center of the view. Otherwise it will be the top-left.
viewer_get_node_info(gv: graph_viewer_t *, out: node_info_t, n: int) ‑> bool
viewer_get_node_info(gv, out, n) -> bool Get node info for node in given viewer (see get_node_info())
viewer_get_selection(gv: graph_viewer_t *, sgs: screen_graph_selection_t) ‑> bool
viewer_get_selection(gv, sgs) -> bool Get currently selected items for graph viewer.
viewer_set_gli(gv: graph_viewer_t *, gli: graph_location_info_t const *, flags: uint32 = 0) ‑> void
viewer_set_gli(gv, gli, flags=0) Set location info for given graph view If flags contains GLICTL_CENTER, then the gli will be set to be the center of the view. Otherwise it will be the top-left.
viewer_set_groups_visibility(gv: graph_viewer_t *, groups: intvec_t const &, expand: bool, new_current: int = -1) ‑> bool
viewer_set_groups_visibility(gv, groups, expand, new_current=-1) -> bool Wrapper around interactive_graph_t::change_visibility. This function will:
clone the current graph
attempt changing visibility of the groups in that new graph
if successful, animate to that new graph.
viewer_set_node_info(gv: graph_viewer_t *, n: int, ni: node_info_t, flags: uint32) ‑> void
viewer_set_node_info(gv, n, ni, flags) Set node info for node in given viewer (see set_node_info())
viewer_set_titlebar_height(gv: graph_viewer_t *, height: int) ‑> int
viewer_set_titlebar_height(gv, height) -> int Set height of node title bars (grcode_set_titlebar_height)
Classes
GraphViewer(title, close_open=False)
: Proxy of C++ View_Hooks class.
Ancestors (in MRO)
Class variables
UI_Hooks_Trampoline
Proxy of C++ UI_Hooks class.
Methods
AddCommand(self, title, shortcut)
AddEdge(self, src_node, dest_node) Creates an edge between two given node ids
AddNode(self, obj) Creates a node associated with the given object and returns the node id
Clear(self) Clears all the nodes and edges
Close(self) Closes the graph. It is possible to call Show() again (which will recreate the graph)
Count(self) Returns the node count
OnCommand(self, cmd_id)
OnPopup(self, widget, popup_handle)
OnRefresh(self) Event called when the graph is refreshed or first created. From this event you are supposed to create nodes and edges. This callback is mandatory.
note: It is important to clear previous nodes before adding nodes. return: Returning True tells the graph viewer to use the items. Otherwise old items will be used.
Select(self, node_id) Selects a node on the graph
Show(self) Shows an existing graph or creates a new one
return: Boolean
TPointDouble(*args)
: Proxy of C++ TPointDouble class.
Instance variables
x: double
x
y: double
y
Methods
add(self, r: TPointDouble) ‑> void add(self, r)
r: TPointDouble const &
negate(self) ‑> void negate(self)
sub(self, r: TPointDouble) ‑> void sub(self, r)
r: TPointDouble const &
drawable_graph_t()
: Proxy of C++ drawable_graph_t class.
Ancestors (in MRO)
Descendants
Instance variables
callback_ud: void *
callback_ud
circle_center: point_t
circle_center
circle_radius: int
circle_radius
current_layout: layout_type_t
current_layout
rect_edges_made: bool
rect_edges_made
title: qstring
title
Methods
create_circle_layout(self, p: point_t, radius: int) ‑> bool create_circle_layout(self, p, radius) -> bool
p: point_t radius: int
create_tree_layout(self) ‑> bool create_tree_layout(self) -> bool
get_edge(self, e: edge_t) ‑> edge_info_t * get_edge(self, e) -> edge_info_t
e: edge_t
grcall(self, code: int) ‑> ssize_t grcall(self, code) -> ssize_t
code: int
nrect(self, n: int) ‑> ida_graph.rect_t nrect(self, n) -> rect_t
n: int
set_callback(self, _callback: hook_cb_t *, _ud: void *) ‑> void set_callback(self, _callback, _ud)
_callback: hook_cb_t * _ud: void *
abstract_graph_t()
: Proxy of C++ drawable_graph_t class.
Ancestors (in MRO)
Descendants
Instance variables
callback_ud: void *
callback_ud
circle_center: point_t
circle_center
circle_radius: int
circle_radius
current_layout: layout_type_t
current_layout
rect_edges_made: bool
rect_edges_made
title: qstring
title
Methods
create_circle_layout(self, p: point_t, radius: int) ‑> bool create_circle_layout(self, p, radius) -> bool
p: point_t radius: int
create_tree_layout(self) ‑> bool create_tree_layout(self) -> bool
get_edge(self, e: edge_t) ‑> edge_info_t * get_edge(self, e) -> edge_info_t
e: edge_t
grcall(self, code: int) ‑> ssize_t grcall(self, code) -> ssize_t
code: int
nrect(self, n: int) ‑> ida_graph.rect_t nrect(self, n) -> rect_t
n: int
set_callback(self, _callback: hook_cb_t *, _ud: void *) ‑> void set_callback(self, _callback, _ud)
_callback: hook_cb_t * _ud: void *
edge_info_t()
: Proxy of C++ edge_info_t class.
Instance variables
color: bgcolor_t
color
dstoff: int
dstoff
layout: pointseq_t
layout
srcoff: int
srcoff
width: int
width
Methods
reverse_layout(self) ‑> void reverse_layout(self)
edge_infos_wrapper_t(*args, **kwargs)
: Proxy of C++ edge_infos_wrapper_t class.
Instance variables
ptr: edge_infos_t *
ptr
Methods
clear(self) ‑> void clear(self)
edge_layout_point_t(*args)
: Proxy of C++ edge_layout_point_t class.
Instance variables
e: ida_gdl.edge_t
e
pidx: int
pidx
Methods
compare(self, r: edge_layout_point_t) ‑> int compare(self, r) -> int
r: edge_layout_point_t const &
edge_segment_t()
: Proxy of C++ edge_segment_t class.
Instance variables
e: ida_gdl.edge_t
e
nseg: int
nseg
x0: int
x0
x1: int
x1
Methods
length(self) ‑> size_t length(self) -> size_t
toright(self) ‑> bool toright(self) -> bool
graph_item_t()
: Proxy of C++ graph_item_t class.
Instance variables
b: int
b
e: edge_t
e
elp: edge_layout_point_t
elp
n: int
n
p: point_t
p
type: graph_item_type_t
type
Methods
is_edge(self) ‑> bool is_edge(self) -> bool
is_node(self) ‑> bool is_node(self) -> bool
graph_node_visitor_t()
: Proxy of C++ graph_node_visitor_t class.
Methods
is_forbidden_edge(self, arg0: int, arg1: int) ‑> bool is_forbidden_edge(self, arg0, arg1) -> bool Should the edge between 'n' and 'm' be ignored?
arg0: int arg1: int
is_visited(self, n: int) ‑> bool is_visited(self, n) -> bool Have we already visited the given node?
n: (C++: int)
reinit(self) ‑> void reinit(self) Reset visited nodes.
set_visited(self, n: int) ‑> void set_visited(self, n) Mark node as visited.
n: (C++: int)
visit_node(self, arg0: int) ‑> int visit_node(self, arg0) -> int Implements action to take when a node is visited.
arg0: int
graph_path_visitor_t()
: Proxy of C++ graph_path_visitor_t class.
Instance variables
path: intvec_t
path
prune: bool
prune
Methods
walk_backward(self, arg0: int) ‑> int walk_backward(self, arg0) -> int
arg0: int
walk_forward(self, arg0: int) ‑> int walk_forward(self, arg0) -> int
arg0: int
graph_visitor_t()
: Proxy of C++ graph_visitor_t class.
Methods
visit_edge(self, arg2: edge_t, arg3: edge_info_t) ‑> int visit_edge(self, arg2, arg3) -> int
arg2: edge_t arg3: edge_info_t *
visit_node(self, arg2: int, arg3: rect_t) ‑> int visit_node(self, arg2, arg3) -> int
arg2: int arg3: rect_t &
group_crinfo_t()
: Proxy of C++ group_crinfo_t class.
Instance variables
nodes: intvec_t
nodes
text: qstring
text
interactive_graph_t(*args, **kwargs)
: Proxy of C++ interactive_graph_t class.
Ancestors (in MRO)
Instance variables
belongs: intvec_t
belongs
edges: edge_infos_wrapper_t
edges
gid: uval_t
gid
node_flags: bytevec_t
node_flags
nodes: interactive_graph_t::node_layout_t
nodes
org_preds: array_of_intvec_t
org_preds
org_succs: array_of_intvec_t
org_succs
preds: array_of_intvec_t
preds
succs: array_of_intvec_t
succs
Methods
add_edge(self, i: int, j: int, ei: edge_info_t) ‑> bool add_edge(self, i, j, ei) -> bool
i: int j: int ei: edge_info_t const *
add_node(self, r: rect_t) ‑> int add_node(self, r) -> int Add a node, possibly with a specific geometry
r: (C++: const rect_t *) the node geometry (can be nullptr) return: the new node
calc_group_ea(self, arg2: intvec_t const &) ‑> ea_t calc_group_ea(self, arg2) -> ea_t
arg2: intvec_t const &
change_group_visibility(self, group: int, expand: bool) ‑> bool change_group_visibility(self, group, expand) -> bool Expand/collapse a group node
group: (C++: int) the group node expand: (C++: bool) whether to expand or collapse return: success
create_digraph_layout(self) ‑> bool create_digraph_layout(self) -> bool
create_group(self, nodes: intvec_t const &) ‑> int create_group(self, nodes) -> int Create a new group node, that will contain all the nodes in 'nodes'.
nodes: (C++: const intvec_t &) the nodes that will be part of the group return: the group node, or -1 in case of error
del_custom_layout(self) ‑> void del_custom_layout(self)
del_edge(self, i: int, j: int) ‑> bool del_edge(self, i, j) -> bool
i: int j: int
del_node(self, n: int) ‑> ssize_t del_node(self, n) -> ssize_t Delete a node
n: (C++: int) the node to delete return: the number of deleted edges
delete_group(self, group: int) ‑> bool delete_group(self, group) -> bool Delete a group node.
This deletes the group node only; it does not delete nodes that are part of the group.
group: (C++: int) the group node return: success
empty(self) ‑> bool empty(self) -> bool Is the graph (visually) empty?
return: true if there are no visible nodes
exists(self, node: int) ‑> bool exists(self, node) -> bool Is the node visible?
node: (C++: int) the node number return: success
get_custom_layout(self) ‑> bool get_custom_layout(self) -> bool
get_first_subgraph_node(self, group: int) ‑> int get_first_subgraph_node(self, group) -> int
group: int
get_graph_groups(self) ‑> bool get_graph_groups(self) -> bool
get_next_subgraph_node(self, group: int, current: int) ‑> int get_next_subgraph_node(self, group, current) -> int
group: int current: int
get_node_group(self, node: int) ‑> int get_node_group(self, node) -> int
node: int
get_node_representative(self, node: int) ‑> int get_node_representative(self, node) -> int Get the node that currently visually represents 'node'. This will find the "closest" parent group node that's visible, by attempting to walk up the group nodes that contain 'node', and will stop when it finds a node that is currently visible.
See also get_group_node()
node: (C++: int) the node return: the node that represents 'node', or 'node' if it's not part of any group
is_collapsed_node(self, node: int) ‑> bool is_collapsed_node(self, node) -> bool
node: int
is_deleted_node(self, node: int) ‑> bool is_deleted_node(self, node) -> bool
node: int
is_displayable_node(self, node: int) ‑> bool is_displayable_node(self, node) -> bool
node: int
is_dot_node(self, node: int) ‑> bool is_dot_node(self, node) -> bool
node: int
is_group_node(self, node: int) ‑> bool is_group_node(self, node) -> bool
node: int
is_simple_node(self, node: int) ‑> bool is_simple_node(self, node) -> bool
node: int
is_subgraph_node(self, node: int) ‑> bool is_subgraph_node(self, node) -> bool
node: int
is_uncollapsed_node(self, node: int) ‑> bool is_uncollapsed_node(self, node) -> bool
node: int
is_user_graph(self) ‑> bool is_user_graph(self) -> bool
is_visible_node(self, node: int) ‑> bool is_visible_node(self, node) -> bool Is the node currently visible?
An invisible node is a node that's part of a group that's currently collapsed.
node: (C++: int) the node return: success
node_qty(self) ‑> int node_qty(self) -> int Get the number of visible nodes (the list can be retrieved using gdl.hpp's node_iterator)
See also size()
return: the number of visible nodes
npred(self, b: int) ‑> int npred(self, b) -> int
b: int
nsucc(self, b: int) ‑> int nsucc(self, b) -> int
b: int
pred(self, b: int, i: int) ‑> int pred(self, b, i) -> int
b: int i: int
predset(self, b: int) ‑> intvec_t const & predset(self, b) -> intvec_t const &
b: int
redo_layout(self) ‑> bool redo_layout(self) -> bool Recompute the layout, according to the value of 'current_layout'.
return: success
refresh(self) ‑> bool refresh(self) -> bool Refresh the graph
A graph needs refreshing when it's "backing data". E.g., if the number (or contents) of the objects in the above example, change.
Let's say the user's plugin ends up finding a 5th piece of scattered data. It should then add it to its internal list of known objects, and tell IDA that the graph needs to be refreshed, using refresh_viewer(). This will cause IDA to:
discard all its internal rendering information,
call interactive_graph_t::refresh() on the graph so that the user's plugin has a chance to "sync" the number of nodes & edges that this graph contains, to the information that the plugin has collected so far
re-create internal rendering information, and
repaint the view
return: success
replace_edge(self, i: int, j: int, x: int, y: int) ‑> bool replace_edge(self, i, j, x, y) -> bool
i: int j: int x: int y: int
reset(self) ‑> void reset(self)
resize(self, n: int) ‑> void resize(self, n) Resize the graph to 'n' nodes
n: (C++: int) the new size
set_custom_layout(self) ‑> void set_custom_layout(self)
set_deleted_node(self, node: int) ‑> void set_deleted_node(self, node)
node: int
set_edge(self, e: edge_t, ei: edge_info_t) ‑> bool set_edge(self, e, ei) -> bool
e: edge_t ei: edge_info_t const *
set_graph_groups(self) ‑> void set_graph_groups(self)
set_node_group(self, node: int, group: int) ‑> void set_node_group(self, node, group)
node: int group: int
set_nrect(self, n: int, r: rect_t) ‑> bool set_nrect(self, n, r) -> bool
n: int r: rect_t const &
size(self) ‑> int size(self) -> int Get the total number of nodes (including group nodes, and including hidden nodes.)
See also node_qty()
return: the total number of nodes in the graph
succ(self, b: int, i: int) ‑> int succ(self, b, i) -> int
b: int i: int
succset(self, b: int) ‑> intvec_t const & succset(self, b) -> intvec_t const &
b: int
mutable_graph_t(*args, **kwargs)
: Proxy of C++ interactive_graph_t class.
Ancestors (in MRO)
Instance variables
belongs: intvec_t
belongs
edges: edge_infos_wrapper_t
edges
gid: uval_t
gid
node_flags: bytevec_t
node_flags
nodes: interactive_graph_t::node_layout_t
nodes
org_preds: array_of_intvec_t
org_preds
org_succs: array_of_intvec_t
org_succs
preds: array_of_intvec_t
preds
succs: array_of_intvec_t
succs
Methods
add_edge(self, i: int, j: int, ei: edge_info_t) ‑> bool add_edge(self, i, j, ei) -> bool
i: int j: int ei: edge_info_t const *
add_node(self, r: rect_t) ‑> int add_node(self, r) -> int Add a node, possibly with a specific geometry
r: (C++: const rect_t *) the node geometry (can be nullptr) return: the new node
calc_group_ea(self, arg2: intvec_t const &) ‑> ea_t calc_group_ea(self, arg2) -> ea_t
arg2: intvec_t const &
change_group_visibility(self, group: int, expand: bool) ‑> bool change_group_visibility(self, group, expand) -> bool Expand/collapse a group node
group: (C++: int) the group node expand: (C++: bool) whether to expand or collapse return: success
create_digraph_layout(self) ‑> bool create_digraph_layout(self) -> bool
create_group(self, nodes: intvec_t const &) ‑> int create_group(self, nodes) -> int Create a new group node, that will contain all the nodes in 'nodes'.
nodes: (C++: const intvec_t &) the nodes that will be part of the group return: the group node, or -1 in case of error
del_custom_layout(self) ‑> void del_custom_layout(self)
del_edge(self, i: int, j: int) ‑> bool del_edge(self, i, j) -> bool
i: int j: int
del_node(self, n: int) ‑> ssize_t del_node(self, n) -> ssize_t Delete a node
n: (C++: int) the node to delete return: the number of deleted edges
delete_group(self, group: int) ‑> bool delete_group(self, group) -> bool Delete a group node.
This deletes the group node only; it does not delete nodes that are part of the group.
group: (C++: int) the group node return: success
empty(self) ‑> bool empty(self) -> bool Is the graph (visually) empty?
return: true if there are no visible nodes
exists(self, node: int) ‑> bool exists(self, node) -> bool Is the node visible?
node: (C++: int) the node number return: success
get_custom_layout(self) ‑> bool get_custom_layout(self) -> bool
get_first_subgraph_node(self, group: int) ‑> int get_first_subgraph_node(self, group) -> int
group: int
get_graph_groups(self) ‑> bool get_graph_groups(self) -> bool
get_next_subgraph_node(self, group: int, current: int) ‑> int get_next_subgraph_node(self, group, current) -> int
group: int current: int
get_node_group(self, node: int) ‑> int get_node_group(self, node) -> int
node: int
get_node_representative(self, node: int) ‑> int get_node_representative(self, node) -> int Get the node that currently visually represents 'node'. This will find the "closest" parent group node that's visible, by attempting to walk up the group nodes that contain 'node', and will stop when it finds a node that is currently visible.
See also get_group_node()
node: (C++: int) the node return: the node that represents 'node', or 'node' if it's not part of any group
is_collapsed_node(self, node: int) ‑> bool is_collapsed_node(self, node) -> bool
node: int
is_deleted_node(self, node: int) ‑> bool is_deleted_node(self, node) -> bool
node: int
is_displayable_node(self, node: int) ‑> bool is_displayable_node(self, node) -> bool
node: int
is_dot_node(self, node: int) ‑> bool is_dot_node(self, node) -> bool
node: int
is_group_node(self, node: int) ‑> bool is_group_node(self, node) -> bool
node: int
is_simple_node(self, node: int) ‑> bool is_simple_node(self, node) -> bool
node: int
is_subgraph_node(self, node: int) ‑> bool is_subgraph_node(self, node) -> bool
node: int
is_uncollapsed_node(self, node: int) ‑> bool is_uncollapsed_node(self, node) -> bool
node: int
is_user_graph(self) ‑> bool is_user_graph(self) -> bool
is_visible_node(self, node: int) ‑> bool is_visible_node(self, node) -> bool Is the node currently visible?
An invisible node is a node that's part of a group that's currently collapsed.
node: (C++: int) the node return: success
node_qty(self) ‑> int node_qty(self) -> int Get the number of visible nodes (the list can be retrieved using gdl.hpp's node_iterator)
See also size()
return: the number of visible nodes
npred(self, b: int) ‑> int npred(self, b) -> int
b: int
nsucc(self, b: int) ‑> int nsucc(self, b) -> int
b: int
pred(self, b: int, i: int) ‑> int pred(self, b, i) -> int
b: int i: int
predset(self, b: int) ‑> intvec_t const & predset(self, b) -> intvec_t const &
b: int
redo_layout(self) ‑> bool redo_layout(self) -> bool Recompute the layout, according to the value of 'current_layout'.
return: success
refresh(self) ‑> bool refresh(self) -> bool Refresh the graph
A graph needs refreshing when it's "backing data". E.g., if the number (or contents) of the objects in the above example, change.
Let's say the user's plugin ends up finding a 5th piece of scattered data. It should then add it to its internal list of known objects, and tell IDA that the graph needs to be refreshed, using refresh_viewer(). This will cause IDA to:
discard all its internal rendering information,
call interactive_graph_t::refresh() on the graph so that the user's plugin has a chance to "sync" the number of nodes & edges that this graph contains, to the information that the plugin has collected so far
re-create internal rendering information, and
repaint the view
return: success
replace_edge(self, i: int, j: int, x: int, y: int) ‑> bool replace_edge(self, i, j, x, y) -> bool
i: int j: int x: int y: int
reset(self) ‑> void reset(self)
resize(self, n: int) ‑> void resize(self, n) Resize the graph to 'n' nodes
n: (C++: int) the new size
set_custom_layout(self) ‑> void set_custom_layout(self)
set_deleted_node(self, node: int) ‑> void set_deleted_node(self, node)
node: int
set_edge(self, e: edge_t, ei: edge_info_t) ‑> bool set_edge(self, e, ei) -> bool
e: edge_t ei: edge_info_t const *
set_graph_groups(self) ‑> void set_graph_groups(self)
set_node_group(self, node: int, group: int) ‑> void set_node_group(self, node, group)
node: int group: int
set_nrect(self, n: int, r: rect_t) ‑> bool set_nrect(self, n, r) -> bool
n: int r: rect_t const &
size(self) ‑> int size(self) -> int Get the total number of nodes (including group nodes, and including hidden nodes.)
See also node_qty()
return: the total number of nodes in the graph
succ(self, b: int, i: int) ‑> int succ(self, b, i) -> int
b: int i: int
succset(self, b: int) ‑> intvec_t const & succset(self, b) -> intvec_t const &
b: int
interval_t(*args)
: Proxy of C++ interval_t class.
Instance variables
x0: int
x0
x1: int
x1
Methods
contains(self, x: int) ‑> bool contains(self, x) -> bool
x: int
empty(self) ‑> bool empty(self) -> bool
intersect(self, r: interval_t) ‑> void intersect(self, r)
r: interval_t const &
length(self) ‑> int length(self) -> int
make_union(self, r: interval_t) ‑> void make_union(self, r)
r: interval_t const &
move_by(self, shift: int) ‑> void move_by(self, shift)
shift: int
node_info_t()
: Proxy of C++ node_info_t class.
Instance variables
bg_color: bgcolor_t
bg_color
ea: ea_t
ea
flags: uint32
flags
frame_color: bgcolor_t
frame_color
text: qstring
text
Methods
get_flags_for_valid(self) ‑> uint32 get_flags_for_valid(self) -> uint32 Get combination of Node info flags describing which attributes are valid.
valid_bg_color(self) ‑> bool valid_bg_color(self) -> bool Has valid bg_color?
valid_ea(self) ‑> bool valid_ea(self) -> bool Has valid ea?
valid_flags(self) ‑> bool valid_flags(self) -> bool Has valid flags?
valid_frame_color(self) ‑> bool valid_frame_color(self) -> bool Has valid frame_color?
valid_text(self) ‑> bool valid_text(self) -> bool Has non-empty text?
node_layout_t(*args)
: Proxy of C++ qvector< rect_t > class.
Methods
add_unique(self, x: rect_t) ‑> bool add_unique(self, x) -> bool
x: rect_t const &
at(self, _idx: size_t) ‑> rect_t const & at(self, _idx) -> rect_t
_idx: size_t
back(self)
begin(self, *args) ‑> qvector< rect_t >::const_iterator begin(self) -> rect_t
capacity(self) ‑> size_t capacity(self) -> size_t
clear(self) ‑> void clear(self)
empty(self) ‑> bool empty(self) -> bool
end(self, *args) ‑> qvector< rect_t >::const_iterator end(self) -> rect_t
erase(self, *args) ‑> qvector< rect_t >::iterator erase(self, it) -> rect_t
it: qvector< rect_t >::iterator
erase(self, first, last) -> rect_t
first: qvector< rect_t >::iterator last: qvector< rect_t >::iterator
extract(self) ‑> rect_t * extract(self) -> rect_t
find(self, *args) ‑> qvector< rect_t >::const_iterator find(self, x) -> rect_t
x: rect_t const &
front(self)
grow(self, *args) ‑> void grow(self, x=rect_t())
x: rect_t const &
has(self, x: rect_t) ‑> bool has(self, x) -> bool
x: rect_t const &
inject(self, s: rect_t, len: size_t) ‑> void inject(self, s, len)
s: rect_t * len: size_t
insert(self, it: rect_t, x: rect_t) ‑> qvector< rect_t >::iterator insert(self, it, x) -> rect_t
it: qvector< rect_t >::iterator x: rect_t const &
pop_back(self) ‑> void pop_back(self)
push_back(self, *args) ‑> rect_t & push_back(self, x)
x: rect_t const &
push_back(self) -> rect_t
qclear(self) ‑> void qclear(self)
reserve(self, cnt: size_t) ‑> void reserve(self, cnt)
cnt: size_t
resize(self, *args) ‑> void resize(self, _newsize, x)
_newsize: size_t x: rect_t const &
resize(self, _newsize)
_newsize: size_t
size(self) ‑> size_t size(self) -> size_t
swap(self, r: node_layout_t) ‑> void swap(self, r)
r: qvector< rect_t > &
truncate(self) ‑> void truncate(self)
point_t(*args)
: Proxy of C++ point_t class.
Instance variables
x: int
x
y: int
y
Methods
add(self, r: point_t) ‑> point_t & add(self, r) -> point_t
r: point_t const &
negate(self) ‑> void negate(self)
sub(self, r: point_t) ‑> point_t & sub(self, r) -> point_t
r: point_t const &
pointseq_t()
: Proxy of C++ pointseq_t class.
Ancestors (in MRO)
pointvec_t(*args)
: Proxy of C++ qvector< point_t > class.
Descendants
Methods
add_unique(self, x: point_t) ‑> bool add_unique(self, x) -> bool
x: point_t const &
at(self, _idx: size_t) ‑> point_t const & at(self, _idx) -> point_t
_idx: size_t
back(self)
begin(self, *args) ‑> qvector< point_t >::const_iterator begin(self) -> point_t
capacity(self) ‑> size_t capacity(self) -> size_t
clear(self) ‑> void clear(self)
empty(self) ‑> bool empty(self) -> bool
end(self, *args) ‑> qvector< point_t >::const_iterator end(self) -> point_t
erase(self, *args) ‑> qvector< point_t >::iterator erase(self, it) -> point_t
it: qvector< point_t >::iterator
erase(self, first, last) -> point_t
first: qvector< point_t >::iterator last: qvector< point_t >::iterator
extract(self) ‑> point_t * extract(self) -> point_t
find(self, *args) ‑> qvector< point_t >::const_iterator find(self, x) -> point_t
x: point_t const &
front(self)
grow(self, *args) ‑> void grow(self, x=point_t())
x: point_t const &
has(self, x: point_t) ‑> bool has(self, x) -> bool
x: point_t const &
inject(self, s: point_t, len: size_t) ‑> void inject(self, s, len)
s: point_t * len: size_t
insert(self, it: point_t, x: point_t) ‑> qvector< point_t >::iterator insert(self, it, x) -> point_t
it: qvector< point_t >::iterator x: point_t const &
pop_back(self) ‑> void pop_back(self)
push_back(self, *args) ‑> point_t & push_back(self, x)
x: point_t const &
push_back(self) -> point_t
qclear(self) ‑> void qclear(self)
reserve(self, cnt: size_t) ‑> void reserve(self, cnt)
cnt: size_t
resize(self, *args) ‑> void resize(self, _newsize, x)
_newsize: size_t x: point_t const &
resize(self, _newsize)
_newsize: size_t
size(self) ‑> size_t size(self) -> size_t
swap(self, r: pointvec_t) ‑> void swap(self, r)
r: qvector< point_t > &
truncate(self) ‑> void truncate(self)
rect_t(*args)
: Proxy of C++ rect_t class.
Instance variables
bottom: int
bottom
left: int
left
right: int
right
top: int
top
Methods
area(self) ‑> int area(self) -> int
bottomright(self) ‑> ida_graph.point_t bottomright(self) -> point_t
center(self) ‑> ida_graph.point_t center(self) -> point_t
contains(self, p: point_t) ‑> bool contains(self, p) -> bool
p: point_t const &
empty(self) ‑> bool empty(self) -> bool
grow(self, delta: int) ‑> void grow(self, delta)
delta: int
height(self) ‑> int height(self) -> int
intersect(self, r: rect_t) ‑> void intersect(self, r)
r: rect_t const &
is_intersection_empty(self, r: rect_t) ‑> bool is_intersection_empty(self, r) -> bool
r: rect_t const &
make_union(self, r: rect_t) ‑> void make_union(self, r)
r: rect_t const &
move_by(self, p: point_t) ‑> void move_by(self, p)
p: point_t const &
move_to(self, p: point_t) ‑> void move_to(self, p)
p: point_t const &
topleft(self) ‑> ida_graph.point_t topleft(self) -> point_t
width(self) ‑> int width(self) -> int
row_info_t()
: Proxy of C++ row_info_t class.
Instance variables
bottom: int
bottom
nodes: intvec_t
nodes
top: int
top
Methods
height(self) ‑> int height(self) -> int
screen_graph_selection_base_t(*args)
: Proxy of C++ qvector< selection_item_t > class.
Descendants
Methods
add_unique(self, x: selection_item_t) ‑> bool add_unique(self, x) -> bool
x: selection_item_t const &
at(self, _idx: size_t) ‑> selection_item_t const & at(self, _idx) -> selection_item_t
_idx: size_t
back(self)
begin(self, *args) ‑> qvector< selection_item_t >::const_iterator begin(self) -> selection_item_t
capacity(self) ‑> size_t capacity(self) -> size_t
clear(self) ‑> void clear(self)
empty(self) ‑> bool empty(self) -> bool
end(self, *args) ‑> qvector< selection_item_t >::const_iterator end(self) -> selection_item_t
erase(self, *args) ‑> qvector< selection_item_t >::iterator erase(self, it) -> selection_item_t
it: qvector< selection_item_t >::iterator
erase(self, first, last) -> selection_item_t
first: qvector< selection_item_t >::iterator last: qvector< selection_item_t >::iterator
extract(self) ‑> selection_item_t * extract(self) -> selection_item_t
find(self, *args) ‑> qvector< selection_item_t >::const_iterator find(self, x) -> selection_item_t
x: selection_item_t const &