Module ida_graph
Graph view management.
Global variables
var COLLAPSED_NODE
-
COLLAPSED_NODE = -2147483648
var GLICTL_CENTER
-
the gli should be set/get as center
var MTG_DOT_NODE
-
is dot node?
var MTG_GROUP_NODE
-
is group node?
var MTG_NON_DISPLAYABLE_NODE
-
for disassembly graphs - non-displayable nodes have a visible area that is too large to generate disassembly lines for without IDA slowing down significantly (see MAX_VISIBLE_NODE_AREA)
var NIFF_SHOW_CONTENTS
-
NIFF_SHOW_CONTENTS = 1
var NIF_ALL
-
NIF_ALL = 31
var NIF_BG_COLOR
-
node_info_t::bg_color
var NIF_EA
-
node_info_t::ea
var NIF_FLAGS
-
node_info_t::flags
var NIF_FRAME_COLOR
-
node_info_t::frame_color
var NIF_TEXT
-
node_info_t::text
var arrow_height
-
arrow_height = 10
var arrow_width
-
arrow_width = 8
var edge_back
-
edge_back = 3
var edge_cross
-
edge_cross = 4
var edge_error
-
edge_error = 0
var edge_forward
-
edge_forward = 2
var edge_subgraph
-
edge_subgraph = 5
var edge_tree
-
edge_tree = 1
var git_edge
-
edge (graph_item_t::e, graph_item_t::n. n is farthest edge endpoint)
var git_elp
-
edge layout point (graph_item_t::elp)
var git_node
-
node title (graph_item_t::n)
var git_none
-
nothing
var git_text
-
node text (graph_item_t::n, graph_item_t::p)
var git_tool
-
node title button (graph_item_t::n, graph_item_t::b)
-
grcode_attach_menu_item = 301
var grcode_calculating_layout
-
calculating user-defined graph layout.retval 0: not implementedretval 1: graph layout calculated by the plugin
var grcode_center_on
-
use viewer_center_on()
var grcode_change_group_visibility
-
use mutable_graph_t::change_group_visibility()
var grcode_changed_graph
-
new graph has been set.retval 0: must return 0
var grcode_clear
-
use mutable_graph_t::clear()
var grcode_clicked
-
graph is being clicked. this callback allows you to ignore some clicks. it occurs too early, internal graph variables are not updated yet. current_item1, current_item2 point to the same thing. item2 has more information. see also: custom_viewer_click_tretval 0: okretval 1: ignore click
var grcode_create_circle_layout
-
use abstract_graph_t::create_circle_layout()
var grcode_create_digraph_layout
-
use mutable_graph_t::create_digraph_layout()
var grcode_create_disasm_graph1
-
use create_disasm_graph(ea_t ea)
var grcode_create_disasm_graph2
-
use create_disasm_graph(const rangevec_t &ranges)
var grcode_create_graph_viewer
-
use create_graph_viewer()
var grcode_create_group
-
use mutable_graph_t::create_group()
var grcode_create_mutable_graph
-
use create_mutable_graph()
var grcode_create_tree_layout
-
use abstract_graph_t::create_tree_layout()
var grcode_create_user_graph_place
-
use create_user_graph_place()
var grcode_creating_group
-
a group is being created. this provides an opportunity for the graph to forbid creation of the group. Note that groups management is done by the mutable_graph_t instance itself: there is no need to modify the graph in this callback.retval 0: okretval 1: forbid group creation
var grcode_dblclicked
-
a graph node has been double clicked.retval 0: okretval 1: ignore click
var grcode_del_custom_layout
-
use mutable_graph_t::del_custom_layout()
var grcode_del_node_info
-
use viewer_del_node_info()
var grcode_delete_group
-
use mutable_graph_t::delete_group()
var grcode_delete_mutable_graph
-
use delete_mutable_graph()
var grcode_deleting_group
-
a group is being deleted. this provides an opportunity for the graph to forbid deletion of the group. Note that groups management is done by the mutable_graph_t instance itself: there is no need to modify the graph in this callback.retval 0: okretval 1: forbid group deletion
var grcode_destroyed
-
graph is being destroyed. Note that this doesn't mean the graph viewer is being destroyed; this only means that the graph that is being displayed by it is being destroyed, and that, e.g., any possibly cached data should be invalidated (this event can happen when, for example, the user decides to group nodes together: that operation will effectively create a new graph, that will replace the old one.) To be notified when the graph viewer itself is being destroyed, please see notification 'view_close', in kernwin.hppretval 0: must return 0
var grcode_edge_infos_wrapper_clear
-
use edge_infos_wrapper_t::clear()
var grcode_edge_infos_wrapper_copy
-
use edge_infos_wrapper_t::operator=()
var grcode_empty
-
use mutable_graph_t::empty()
var grcode_find_subgraph_node
-
use mutable_graph_t::_find_subgraph_node()
var grcode_fit_window
-
use viewer_fit_window()
var grcode_get_curnode
-
use viewer_get_curnode()
var grcode_get_custom_layout
-
use mutable_graph_t::get_custom_layout()
var grcode_get_gli
-
use viewer_get_gli()
var grcode_get_graph_groups
-
use mutable_graph_t::get_graph_groups()
var grcode_get_graph_viewer
-
use get_graph_viewer()
var grcode_get_node_info
-
use viewer_get_node_info()
var grcode_get_node_representative
-
use mutable_graph_t::get_node_representative()
var grcode_get_selection
-
use viewer_get_selection()
var grcode_get_viewer_graph
-
use get_viewer_graph()
var grcode_gotfocus
-
a graph viewer got focus.retval 0: must return 0
var grcode_group_visibility
-
a group is being collapsed/uncollapsed this provides an opportunity for the graph to forbid changing the visibility of the group. Note that groups management is done by the mutable_graph_t instance itself: there is no need to modify the graph in this callback.retval 0: okretval 1: forbid group modification
var grcode_is_visible_node
-
use mutable_graph_t::is_visible_node()
var grcode_layout_calculated
-
graph layout calculated.retval 0: must return 0
var grcode_lostfocus
-
a graph viewer lost focus.retval 0: must return 0
var grcode_node_qty
-
use mutable_graph_t::node_qty()
var grcode_nrect
-
use mutable_graph_t::nrect()
var grcode_refresh_viewer
-
use refresh_viewer()
var grcode_reserved
-
grcode_reserved = 3
var grcode_reserved2
-
grcode_reserved2 = 12
var grcode_set_custom_layout
-
use mutable_graph_t::set_custom_layout()
var grcode_set_edge
-
use mutable_graph_t::set_edge()
var grcode_set_gli
-
use viewer_set_gli()
var grcode_set_graph_groups
-
use mutable_graph_t::set_graph_groups()
var grcode_set_node_info
-
use viewer_set_node_info()
var grcode_set_titlebar_height
-
use viewer_set_titlebar_height()
var grcode_set_viewer_graph
-
use set_viewer_graph()
var grcode_user_draw
-
render node of a user-defined graph. NB: draw only on the specified DC and nowhere else!retval 0: not renderedretval 1: rendered
var grcode_user_hint
-
retrieve hint for the user-defined graph.retval 0: use default hintretval 1: use proposed hint
var grcode_user_refresh
-
refresh user-defined graph nodes and edges This is called when the UI considers that it is necessary to recreate the graph layout, and thus has to ensure that the 'mutable_graph_t' instance it is using, is up-to-date. For example:
- at graph creation-time
- if a refresh_viewer() call was made
return: success var grcode_user_size
-
calculate node size for user-defined graph.retval 0: did not calculate. ida will use node text sizeretval 1: calculated. ida will add node title to the size
var grcode_user_text
-
retrieve text for user-defined graph node. NB: do not use anything calling GDI!return: success, result must be filled
var grcode_user_title
-
render node title of a user-defined graph.retval 0: did not render, ida will fill it with title_bg_colorretval 1: rendered node title
var grcode_viewer_create_groups
-
grcode_viewer_create_groups = 292
var grcode_viewer_create_groups_vec
-
use viewer_create_groups()
var grcode_viewer_delete_groups
-
grcode_viewer_delete_groups = 293
var grcode_viewer_delete_groups_vec
-
use viewer_delete_groups()
var grcode_viewer_groups_visibility
-
grcode_viewer_groups_visibility = 294
var grcode_viewer_groups_visibility_vec
-
use viewer_set_groups_visibility()
var layout_circle
-
layout_circle = 3
var layout_digraph
-
layout_digraph = 1
var layout_none
-
layout_none = 0
var layout_orthogonal
-
layout_orthogonal = 5
var layout_polar_tree
-
layout_polar_tree = 4
var layout_radial_tree
-
layout_radial_tree = 6
var layout_tree
-
layout_tree = 2
var xgap
-
xgap = 10
var ygap
-
ygap = 30
Functions
def calc_dist(*args) ‑> double
-
calc_dist(p, q) -> doubleCalculate distance between p and q.p: (C++: point_t)q: (C++: point_t)
def clr_node_info(*args) ‑> void
-
clr_node_info(gid, node, flags)Clear node info for the given node.gid: (C++: graph_id_t) id of desired graphnode: (C++: int) node numberflags: (C++: uint32) combination of Node info flags, identifying which fields ofnode_info_t will be cleared
def create_disasm_graph(*args) ‑> mutable_graph_t *
-
create_disasm_graph(ea) -> mutable_graph_tCreate a graph using an arbitrary set of ranges.ea: ea_tcreate_disasm_graph(ranges) -> mutable_graph_tranges: rangevec_t const &
def create_graph_viewer(*args) ‑> graph_viewer_t *
-
create_graph_viewer(title, id, callback, ud, title_height, parent=None) -> graph_viewer_t *Create a custom graph viewer.title: (C++: const char *) the widget titleid: (C++: uval_t) graph idcallback: (C++: hook_cb_t *) callback to handle graph notifications (graph_notification_t)ud: (C++: void *) user data passed to callbacktitle_height: (C++: int) node title heightparent: (C++: TWidget *) the parent widget of the graph viewerreturn: new viewer
def create_mutable_graph(*args) ‑> mutable_graph_t *
-
create_mutable_graph(id) -> mutable_graph_tCreate a new empty graph with given id.id: (C++: uval_t)
def create_user_graph_place(*args) ‑> user_graph_place_t *
-
create_user_graph_place(node, lnnum) -> user_graph_place_tGet a copy of a user_graph_place_t (returns a pointer to static storage)node: (C++: int)lnnum: (C++: int)
def del_node_info(*args) ‑> void
-
del_node_info(gid, node)Delete the node_info_t for the given node.gid: (C++: graph_id_t)node: (C++: int)
def delete_mutable_graph(*args) ‑> void
-
delete_mutable_graph(g)Delete graph object.warning: use this only if you are dealing with mutable_graph_t instances thathave 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 itg: (C++: mutable_graph_t *)
def get_graph_viewer(*args) ‑> graph_viewer_t *
-
get_graph_viewer(parent) -> graph_viewer_t *Get custom graph viewer for given form.parent: (C++: TWidget *)
def get_node_info(*args) ‑> bool
-
get_node_info(out, gid, node) -> boolGet node info.out: (C++: node_info_t *) resultgid: (C++: graph_id_t) id of desired graphnode: (C++: int) node numberreturn: success
def get_viewer_graph(*args) ‑> mutable_graph_t *
-
get_viewer_graph(gv) -> mutable_graph_tGet graph object for given custom graph viewer.gv: (C++: graph_viewer_t *)
def pyg_close(*args) ‑> void
-
pyg_close(_self)self: PyObject *
def pyg_select_node(*args) ‑> void
-
pyg_select_node(_self, nid)self: PyObject *nid: int
def pyg_show(*args) ‑> bool
-
pyg_show(_self) -> boolself: PyObject *
def refresh_viewer(*args) ‑> void
-
refresh_viewer(gv)Redraw the graph in the given view.gv: (C++: graph_viewer_t *)
def set_node_info(*args) ‑> void
-
set_node_info(gid, node, ni, flags)Set node info.gid: (C++: graph_id_t) id of desired graphnode: (C++: int) node numberni: (C++: const node_info_t &) node info to useflags: (C++: uint32) combination of Node info flags, identifying which fields of 'ni'will be used
def set_viewer_graph(*args) ‑> void
-
set_viewer_graph(gv, g)Set the underlying graph object for the given viewer.gv: (C++: graph_viewer_t *)g: (C++: mutable_graph_t *)
-
viewer_attach_menu_item(g, name) -> boolAttach a previously-registered action to the view's context menu. See kernwin.hpp for how to register actions.g: (C++: graph_viewer_t *) graph viewername: (C++: const char *) action namereturn: success
def viewer_center_on(*args) ‑> void
-
viewer_center_on(gv, node)Center the graph view on the given node.gv: (C++: graph_viewer_t *)node: (C++: int)
def viewer_create_groups(*args) ‑> bool
-
viewer_create_groups(gv, out_group_nodes, gi) -> boolThis 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 mutable_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.gv: (C++: graph_viewer_t *)out_group_nodes: (C++: intvec_t *)gi: (C++: const groups_crinfos_t &) groups_crinfos_t const & def viewer_del_node_info(*args) ‑> void
-
viewer_del_node_info(gv, n)Delete node info for node in given viewer (see del_node_info())gv: (C++: graph_viewer_t *)n: (C++: int)
def viewer_delete_groups(*args) ‑> bool
-
viewer_delete_groups(gv, groups, new_current=-1) -> boolWrapper around mutable_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.
gv: (C++: graph_viewer_t *)groups: (C++: const intvec_t &) intvec_t const &new_current: (C++: int) def viewer_fit_window(*args) ‑> void
-
viewer_fit_window(gv)Fit graph viewer to its parent form.gv: (C++: graph_viewer_t *)
def viewer_get_curnode(*args) ‑> int
-
viewer_get_curnode(gv) -> intGet number of currently selected node (-1 if none)gv: (C++: graph_viewer_t *)
def viewer_get_gli(*args) ‑> bool
-
viewer_get_gli(out, gv, flags=0) -> boolGet 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.out: (C++: graph_location_info_t *)gv: (C++: graph_viewer_t *)flags: (C++: uint32)
def viewer_get_node_info(*args) ‑> bool
-
viewer_get_node_info(gv, out, n) -> boolGet node info for node in given viewer (see get_node_info())gv: (C++: graph_viewer_t *)out: (C++: node_info_t *)n: (C++: int)
def viewer_get_selection(*args) ‑> bool
-
viewer_get_selection(gv, sgs) -> boolGet currently selected items for graph viewer.gv: (C++: graph_viewer_t *)sgs: (C++: screen_graph_selection_t *)
def viewer_set_gli(*args) ‑> 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.gv: (C++: graph_viewer_t *)gli: (C++: const graph_location_info_t *) graph_location_info_t const *flags: (C++: uint32)
def viewer_set_groups_visibility(*args) ‑> bool
-
viewer_set_groups_visibility(gv, groups, expand, new_current=-1) -> boolWrapper around mutable_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.
gv: (C++: graph_viewer_t *)groups: (C++: const intvec_t &) intvec_t const &expand: (C++: bool)new_current: (C++: int) def viewer_set_node_info(*args) ‑> void
-
viewer_set_node_info(gv, n, ni, flags)Set node info for node in given viewer (see set_node_info())gv: (C++: graph_viewer_t *)n: (C++: int)ni: (C++: const node_info_t &) node_info_t const &flags: (C++: uint32)
def viewer_set_titlebar_height(*args) ‑> int
-
viewer_set_titlebar_height(gv, height) -> intSet height of node title bars (grcode_set_titlebar_height)gv: (C++: graph_viewer_t *)height: (C++: int)
Classes
class GraphViewer (title, close_open=False)
-
Proxy of C++ View_Hooks class.Constructs the GraphView object. Please do not remove or rename the private fieldstitle: The title of the graph windowclose_open: Should it attempt to close an existing graph (with same title) before creating this graph?
Ancestors
Class variables
var UI_Hooks_Trampoline
-
Proxy of C++ UI_Hooks class.
Methods
def AddCommand(self, title, shortcut)
def AddEdge(self, src_node, dest_node)
-
Creates an edge between two given node ids
def AddNode(self, obj)
-
Creates a node associated with the given object and returns the node id
def Clear(self)
-
Clears all the nodes and edges
def Close(self)
-
Closes the graph. It is possible to call Show() again (which will recreate the graph)
def Count(self)
-
Returns the node count
def OnCommand(self, cmd_id)
def OnPopup(self, widget, popup_handle)
def 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.
def Select(self, node_id)
-
Selects a node on the graph
def Show(self)
-
Shows an existing graph or creates a new onereturn: Boolean
Inherited members
CustomIDAMemo
:CreateGroups
DelNodesInfos
DeleteGroups
GetNodeInfo
GetWidget
GetWidgetAsGraphViewer
Refresh
SetCurrentRendererType
SetGroupsVisibility
SetNodeInfo
SetNodesInfos
hook
unhook
view_activated
view_click
view_close
view_created
view_curpos
view_dblclick
view_deactivated
view_keydown
view_loc_changed
view_mouse_moved
view_mouse_over
view_switched
class TPointDouble (*args)
-
Proxy of C++ TPointDouble class.__init__(self) -> TPointDouble__init__(self, a, b) -> TPointDoublea: doubleb: double__init__(self, r) -> TPointDoubler: point_t const &
Instance variables
var x
-
x
var y
-
y
Methods
def add(self, *args) ‑> void
-
add(self, r)r: TPointDouble const &
def negate(self, *args) ‑> void
-
negate(self)
def sub(self, *args) ‑> void
-
sub(self, r)r: TPointDouble const &
class abstract_graph_t (*args)
-
Proxy of C++ abstract_graph_t class.__init__(self) -> abstract_graph_tself: PyObject *
Ancestors
Subclasses
Instance variables
var callback_ud
-
user data for callback
var circle_center
-
for layout_circle
var circle_radius
-
for layout_circle
var current_layout
-
see Proximity view layouts
var rect_edges_made
-
have create rectangular edges?
var title
-
graph title
Methods
def create_circle_layout(self, *args) ‑> bool
-
create_circle_layout(self, p, radius) -> boolp: point_tradius: int
def create_tree_layout(self, *args) ‑> bool
-
create_tree_layout(self) -> bool
def get_edge(self, *args) ‑> edge_info_t *
-
get_edge(self, e) -> edge_info_te: edge_t
def grcall(self, *args) ‑> ssize_t
-
grcall(self, code) -> ssize_tcode: int
def nrect(self, *args) ‑> rect_t
-
nrect(self, n) -> rect_tn: int
def set_callback(self, *args) ‑> void
-
set_callback(self, _callback, _ud)_callback: hook_cb_t *_ud: void *
Inherited members
class edge_info_t (*args)
-
Proxy of C++ edge_info_t class.__init__(self) -> edge_info_t
Instance variables
var color
-
edge color
var dstoff
-
dstoff
var layout
-
describes geometry of edge
var srcoff
-
srcoff
var width
-
edge width
Methods
def reverse_layout(self, *args) ‑> void
-
reverse_layout(self)
class edge_infos_wrapper_t (*args, **kwargs)
-
Proxy of C++ edge_infos_wrapper_t class.
Instance variables
var ptr
-
ptr
Methods
def clear(self, *args) ‑> void
-
clear(self)
class edge_layout_point_t (*args)
-
Proxy of C++ edge_layout_point_t class.__init__(self) -> edge_layout_point_t__init__(self, _e, _pidx) -> edge_layout_point_t_e: edge_t const &_pidx: int
Instance variables
var e
-
parent edge
var pidx
-
index into edge_info_t::layout
Methods
def compare(self, *args) ‑> int
-
compare(self, r) -> intr: edge_layout_point_t const &
class edge_segment_t (*args)
-
Proxy of C++ edge_segment_t class.__init__(self) -> edge_segment_t
Instance variables
var e
-
e
var nseg
-
nseg
var x0
-
x0
var x1
-
x1
Methods
def length(self, *args) ‑> size_t
-
length(self) -> size_t
def toright(self, *args) ‑> bool
-
toright(self) -> bool
class edge_t (*args)
-
Proxy of C++ edge_t class.__init__(self) -> edge_t__init__(self, x, y) -> edge_tx: inty: int
Instance variables
var dst
-
destination node number
var src
-
source node number
class graph_item_t (*args)
-
Proxy of C++ graph_item_t class.__init__(self) -> graph_item_t
Instance variables
var b
-
button number
var e
-
edge source and destination
var elp
-
edge layout point
var n
-
node number
var p
-
text coordinates in the node
var type
-
type
Methods
def is_edge(self, *args) ‑> bool
-
is_edge(self) -> bool
def is_node(self, *args) ‑> bool
-
is_node(self) -> bool
class graph_node_visitor_t (*args)
-
Proxy of C++ graph_node_visitor_t class.__init__(self) -> graph_node_visitor_tself: PyObject *
Methods
def is_forbidden_edge(self, *args) ‑> bool
-
is_forbidden_edge(self, arg0, arg1) -> boolShould the edge between 'n' and 'm' be ignored?arg0: intarg1: int
def is_visited(self, *args) ‑> bool
-
is_visited(self, n) -> boolHave we already visited the given node?n: (C++: int)
def reinit(self, *args) ‑> void
-
reinit(self)Reset visited nodes.
def set_visited(self, *args) ‑> void
-
set_visited(self, n)Mark node as visited.n: (C++: int)
def visit_node(self, *args) ‑> int
-
visit_node(self, arg0) -> intImplements action to take when a node is visited.arg0: int
class graph_path_visitor_t (*args)
-
Proxy of C++ graph_path_visitor_t class.__init__(self) -> graph_path_visitor_tself: PyObject *
Instance variables
var path
-
current path
var prune
-
walk_forward(): prune := true means to stop the current path
Methods
def walk_backward(self, *args) ‑> int
-
walk_backward(self, arg0) -> intarg0: int
def walk_forward(self, *args) ‑> int
-
walk_forward(self, arg0) -> intarg0: int
class graph_visitor_t (*args)
-
Proxy of C++ graph_visitor_t class.__init__(self) -> graph_visitor_tself: PyObject *
Methods
def visit_edge(self, *args) ‑> int
-
visit_edge(self, arg2, arg3) -> intarg2: edge_targ3: edge_info_t *
def visit_node(self, *args) ‑> int
-
visit_node(self, arg2, arg3) -> intarg2: intarg3: rect_t &
class group_crinfo_t (*args)
-
Proxy of C++ group_crinfo_t class.__init__(self) -> group_crinfo_t
Instance variables
var nodes
-
nodes
var text
-
text
class interval_t (*args)
-
Proxy of C++ interval_t class.__init__(self) -> interval_t__init__(self, y0, y1) -> interval_ty0: inty1: int__init__(self, s) -> interval_ts: edge_segment_t const &
Instance variables
var x0
-
x0
var x1
-
x1
Methods
def contains(self, *args) ‑> bool
-
contains(self, x) -> boolx: int
def empty(self, *args) ‑> bool
-
empty(self) -> bool
def intersect(self, *args) ‑> void
-
intersect(self, r)r: interval_t const &
def length(self, *args) ‑> int
-
length(self) -> int
def make_union(self, *args) ‑> void
-
make_union(self, r)r: interval_t const &
def move_by(self, *args) ‑> void
-
move_by(self, shift)shift: int
class mutable_graph_t (*args, **kwargs)
-
Proxy of C++ mutable_graph_t class.__init__(self) -> abstract_graph_tself: PyObject *
Ancestors
Instance variables
var belongs
-
the subgraph the node belongs to INT_MAX means that the node doesn't exist sign bit means collapsed node
var edges
-
edges
var gid
-
graph id - unique for the database for flowcharts it is equal to the function start_ea
var node_flags
-
node flags
var nodes
-
nodes
var org_preds
-
org_preds
var org_succs
-
org_succs
var preds
-
preds
var succs
-
succs
Methods
def add_edge(self, *args) ‑> bool
-
add_edge(self, i, j, ei) -> booli: intj: intei: edge_info_t const *
def add_node(self, *args) ‑> int
-
add_node(self, r) -> intAdd a node, possibly with a specific geometryr: (C++: const rect_t *) the node geometry (can be nullptr)return: the new node
def calc_group_ea(self, *args) ‑> ea_t
-
calc_group_ea(self, arg2) -> ea_targ2: intvec_t const &
def change_group_visibility(self, *args) ‑> bool
-
change_group_visibility(self, group, expand) -> boolExpand/collapse a group nodegroup: (C++: int) the group nodeexpand: (C++: bool) whether to expand or collapsereturn: success
def create_digraph_layout(self, *args) ‑> bool
-
create_digraph_layout(self) -> bool
def create_group(self, *args) ‑> int
-
create_group(self, nodes) -> intCreate 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 groupreturn: the group node, or -1 in case of error
def del_custom_layout(self, *args) ‑> void
-
del_custom_layout(self)
def del_edge(self, *args) ‑> bool
-
del_edge(self, i, j) -> booli: intj: int
def del_node(self, *args) ‑> ssize_t
-
del_node(self, n) -> ssize_tDelete a noden: (C++: int) the node to deletereturn: the number of deleted edges
def delete_group(self, *args) ‑> bool
-
delete_group(self, group) -> boolDelete 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 nodereturn: success
def empty(self, *args) ‑> bool
-
empty(self) -> boolIs the graph (visually) empty?return: true if there are no visible nodes
def exists(self, *args) ‑> bool
-
exists(self, node) -> boolIs the node visible?node: (C++: int) the node numberreturn: success
def get_custom_layout(self, *args) ‑> bool
-
get_custom_layout(self) -> bool
def get_first_subgraph_node(self, *args) ‑> int
-
get_first_subgraph_node(self, group) -> intgroup: int
def get_graph_groups(self, *args) ‑> bool
-
get_graph_groups(self) -> bool
def get_next_subgraph_node(self, *args) ‑> int
-
get_next_subgraph_node(self, group, current) -> intgroup: intcurrent: int
def get_node_group(self, *args) ‑> int
-
get_node_group(self, node) -> intnode: int
def get_node_representative(self, *args) ‑> int
-
get_node_representative(self, node) -> intGet 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 nodereturn: the node that represents 'node', or 'node' if it's not part of anygroup
def is_collapsed_node(self, *args) ‑> bool
-
is_collapsed_node(self, node) -> boolnode: int
def is_deleted_node(self, *args) ‑> bool
-
is_deleted_node(self, node) -> boolnode: int
def is_displayable_node(self, *args) ‑> bool
-
is_displayable_node(self, node) -> boolnode: int
def is_dot_node(self, *args) ‑> bool
-
is_dot_node(self, node) -> boolnode: int
def is_group_node(self, *args) ‑> bool
-
is_group_node(self, node) -> boolnode: int
def is_simple_node(self, *args) ‑> bool
-
is_simple_node(self, node) -> boolnode: int
def is_subgraph_node(self, *args) ‑> bool
-
is_subgraph_node(self, node) -> boolnode: int
def is_uncollapsed_node(self, *args) ‑> bool
-
is_uncollapsed_node(self, node) -> boolnode: int
def is_user_graph(self, *args) ‑> bool
-
is_user_graph(self) -> bool
def is_visible_node(self, *args) ‑> bool
-
is_visible_node(self, node) -> boolIs the node currently visible?An invisible node is a node that's part of a group that's currently collapsed.node: (C++: int) the nodereturn: success
def node_qty(self, *args) ‑> int
-
node_qty(self) -> intGet 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
def npred(self, *args) ‑> int
-
npred(self, b) -> intb: int
def nsucc(self, *args) ‑> int
-
nsucc(self, b) -> intb: int
def pred(self, *args) ‑> int
-
pred(self, b, i) -> intb: inti: int
def predset(self, *args) ‑> intvec_t const &
-
predset(self, b) -> intvec_t const &b: int
def redo_layout(self, *args) ‑> bool
-
redo_layout(self) -> boolRecompute the layout, according to the value of 'current_layout'.return: success
def refresh(self, *args) ‑> bool
-
refresh(self) -> boolRefresh the graphA 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 mutable_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 def replace_edge(self, *args) ‑> bool
-
replace_edge(self, i, j, x, y) -> booli: intj: intx: inty: int
def reset(self, *args) ‑> void
-
reset(self)
def resize(self, *args) ‑> void
-
resize(self, n)Resize the graph to 'n' nodesn: (C++: int) the new size
def set_custom_layout(self, *args) ‑> void
-
set_custom_layout(self)
def set_deleted_node(self, *args) ‑> void
-
set_deleted_node(self, node)node: int
def set_edge(self, *args) ‑> bool
-
set_edge(self, e, ei) -> boole: edge_tei: edge_info_t const *
def set_graph_groups(self, *args) ‑> void
-
set_graph_groups(self)
def set_node_group(self, *args) ‑> void
-
set_node_group(self, node, group)node: intgroup: int
def set_nrect(self, *args) ‑> bool
-
set_nrect(self, n, r) -> booln: intr: rect_t const &
def size(self, *args) ‑> int
-
size(self) -> intGet 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
def succ(self, *args) ‑> int
-
succ(self, b, i) -> intb: inti: int
def succset(self, *args) ‑> intvec_t const &
-
succset(self, b) -> intvec_t const &b: int
Inherited members
abstract_graph_t
:begin
callback_ud
circle_center
circle_radius
create_circle_layout
create_tree_layout
current_layout
edge
end
entry
exit
front
get_edge
get_edge_color
get_node_color
get_node_label
grcall
nedge
nrect
print_edge
print_graph_attributes
print_node
print_node_attributes
rect_edges_made
set_callback
title
class node_info_t (*args)
-
Proxy of C++ node_info_t class.__init__(self) -> node_info_t
Instance variables
var bg_color
-
background color
var ea
-
address
var flags
-
flags
var frame_color
-
color of enclosing frame
var text
-
node contents
Methods
def get_flags_for_valid(self, *args) ‑> uint32
-
get_flags_for_valid(self) -> uint32Get combination of Node info flags describing which attributes are valid.
def valid_bg_color(self, *args) ‑> bool
-
valid_bg_color(self) -> boolHas valid bg_color?
def valid_ea(self, *args) ‑> bool
-
valid_ea(self) -> boolHas valid ea?
def valid_flags(self, *args) ‑> bool
-
valid_flags(self) -> boolHas valid flags?
def valid_frame_color(self, *args) ‑> bool
-
valid_frame_color(self) -> boolHas valid frame_color?
def valid_text(self, *args) ‑> bool
-
valid_text(self) -> boolHas non-empty text?
class node_layout_t (*args)
-
Proxy of C++ qvector< rect_t > class.__init__(self) -> node_layout_t__init__(self, x) -> node_layout_tx: qvector< rect_t > const &
Methods
def add_unique(self, *args) ‑> bool
-
add_unique(self, x) -> boolx: rect_t const &
def at(self, *args) ‑> rect_t const &
-
at(self, _idx) -> rect_t_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< rect_t >::const_iterator
-
begin(self) -> rect_t
def capacity(self, *args) ‑> size_t
-
capacity(self) -> size_t
def clear(self, *args) ‑> void
-
clear(self)
def empty(self, *args) ‑> bool
-
empty(self) -> bool
def end(self, *args) ‑> qvector< rect_t >::const_iterator
-
end(self) -> rect_t
def erase(self, *args) ‑> qvector< rect_t >::iterator
-
erase(self, it) -> rect_tit: qvector< rect_t >::iteratorerase(self, first, last) -> rect_tfirst: qvector< rect_t >::iteratorlast: qvector< rect_t >::iterator
def extract(self, *args) ‑> rect_t *
-
extract(self) -> rect_t
def find(self, *args) ‑> qvector< rect_t >::const_iterator
-
find(self, x) -> rect_tx: rect_t const &
def front(self)
def grow(self, *args) ‑> void
-
grow(self, x=rect_t())x: rect_t const &
def has(self, *args) ‑> bool
-
has(self, x) -> boolx: rect_t const &
def inject(self, *args) ‑> void
-
inject(self, s, len)s: rect_t *len: size_t
def insert(self, *args) ‑> qvector< rect_t >::iterator
-
insert(self, it, x) -> rect_tit: qvector< rect_t >::iteratorx: rect_t const &
def pop_back(self, *args) ‑> void
-
pop_back(self)
def push_back(self, *args) ‑> rect_t &
-
push_back(self, x)x: rect_t const &push_back(self) -> rect_t
def qclear(self, *args) ‑> void
-
qclear(self)
def reserve(self, *args) ‑> void
-
reserve(self, cnt)cnt: size_t
def resize(self, *args) ‑> void
-
resize(self, _newsize, x)_newsize: size_tx: rect_t const &resize(self, _newsize)_newsize: size_t
def size(self, *args) ‑> size_t
-
size(self) -> size_t
def swap(self, *args) ‑> void
-
swap(self, r)r: qvector< rect_t > &
def truncate(self, *args) ‑> void
-
truncate(self)
class node_ordering_t (*args)
-
Proxy of C++ node_ordering_t class.__init__(self) -> node_ordering_t
Methods
def clear(self, *args) ‑> void
-
clear(self)
def clr(self, *args) ‑> bool
-
clr(self, _node) -> bool_node: int
def node(self, *args) ‑> int
-
node(self, _order) -> int_order: size_t
def order(self, *args) ‑> int
-
order(self, _node) -> int_node: int
def resize(self, *args) ‑> void
-
resize(self, n)n: int
def set(self, *args) ‑> void
-
set(self, _node, num)_node: intnum: int
def size(self, *args) ‑> size_t
-
size(self) -> size_t
class point_t (*args)
-
Proxy of C++ point_t class.__init__(self) -> point_t__init__(self, _x, _y) -> point_t_x: int_y: int
Instance variables
var x
-
x
var y
-
y
Methods
def add(self, *args) ‑> point_t &
-
add(self, r) -> point_tr: point_t const &
def negate(self, *args) ‑> void
-
negate(self)
def sub(self, *args) ‑> point_t &
-
sub(self, r) -> point_tr: point_t const &
class pointseq_t (*args)
-
Proxy of C++ pointseq_t class.__init__(self) -> pointseq_t
Ancestors
Inherited members
class pointvec_t (*args)
-
Proxy of C++ qvector< point_t > class.__init__(self) -> pointvec_t__init__(self, x) -> pointvec_tx: qvector< point_t > const &
Subclasses
Methods
def add_unique(self, *args) ‑> bool
-
add_unique(self, x) -> boolx: point_t const &
def at(self, *args) ‑> point_t const &
-
at(self, _idx) -> point_t_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< point_t >::const_iterator
-
begin(self) -> point_t
def capacity(self, *args) ‑> size_t
-
capacity(self) -> size_t
def clear(self, *args) ‑> void
-
clear(self)
def empty(self, *args) ‑> bool
-
empty(self) -> bool
def end(self, *args) ‑> qvector< point_t >::const_iterator
-
end(self) -> point_t
def erase(self, *args) ‑> qvector< point_t >::iterator
-
erase(self, it) -> point_tit: qvector< point_t >::iteratorerase(self, first, last) -> point_tfirst: qvector< point_t >::iteratorlast: qvector< point_t >::iterator
def extract(self, *args) ‑> point_t *
-
extract(self) -> point_t
def find(self, *args) ‑> qvector< point_t >::const_iterator
-
find(self, x) -> point_tx: point_t const &
def front(self)
def grow(self, *args) ‑> void
-
grow(self, x=point_t())x: point_t const &
def has(self, *args) ‑> bool
-
has(self, x) -> boolx: point_t const &
def inject(self, *args) ‑> void
-
inject(self, s, len)s: point_t *len: size_t
def insert(self, *args) ‑> qvector< point_t >::iterator
-
insert(self, it, x) -> point_tit: qvector< point_t >::iteratorx: point_t const &
def pop_back(self, *args) ‑> void
-
pop_back(self)
def push_back(self, *args) ‑> point_t &
-
push_back(self, x)x: point_t const &push_back(self) -> point_t
def qclear(self, *args) ‑> void
-
qclear(self)
def reserve(self, *args) ‑> void
-
reserve(self, cnt)cnt: size_t
def resize(self, *args) ‑> void
-
resize(self, _newsize, x)_newsize: size_tx: point_t const &resize(self, _newsize)_newsize: size_t
def size(self, *args) ‑> size_t
-
size(self) -> size_t
def swap(self, *args) ‑> void
-
swap(self, r)r: qvector< point_t > &
def truncate(self, *args) ‑> void
-
truncate(self)
class rect_t (*args)
-
Proxy of C++ rect_t class.__init__(self) -> rect_t__init__(self, l, t, r, b) -> rect_tl: intt: intr: intb: int__init__(self, p0, p1) -> rect_tp0: point_t const &p1: point_t const &
Instance variables
var bottom
-
bottom
var left
-
left
var right
-
right
var top
-
top
Methods
def area(self, *args) ‑> int
-
area(self) -> int
def bottomright(self, *args) ‑> point_t
-
bottomright(self) -> point_t
def center(self, *args) ‑> point_t
-
center(self) -> point_t
def contains(self, *args) ‑> bool
-
contains(self, p) -> boolp: point_t const &
def empty(self, *args) ‑> bool
-
empty(self) -> bool
def grow(self, *args) ‑> void
-
grow(self, delta)delta: int
def height(self, *args) ‑> int
-
height(self) -> int
def intersect(self, *args) ‑> void
-
intersect(self, r)r: rect_t const &
def is_intersection_empty(self, *args) ‑> bool
-
is_intersection_empty(self, r) -> boolr: rect_t const &
def make_union(self, *args) ‑> void
-
make_union(self, r)r: rect_t const &
def move_by(self, *args) ‑> void
-
move_by(self, p)p: point_t const &
def move_to(self, *args) ‑> void
-
move_to(self, p)p: point_t const &
def topleft(self, *args) ‑> point_t
-
topleft(self) -> point_t
def width(self, *args) ‑> int
-
width(self) -> int
class row_info_t (*args)
-
Proxy of C++ row_info_t class.__init__(self) -> row_info_t
Instance variables
var bottom
-
bottom y coord of the row
var nodes
-
list of nodes at the row
var top
-
top y coord of the row
Methods
def height(self, *args) ‑> int
-
height(self) -> int
class screen_graph_selection_base_t (*args)
-
Proxy of C++ qvector< selection_item_t > class.__init__(self) -> screen_graph_selection_base_t__init__(self, x) -> screen_graph_selection_base_tx: qvector< selection_item_t > const &
Subclasses
Methods
def add_unique(self, *args) ‑> bool
-
add_unique(self, x) -> boolx: selection_item_t const &
def at(self, *args) ‑> selection_item_t const &
-
at(self, _idx) -> selection_item_t_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< selection_item_t >::const_iterator
-
begin(self) -> selection_item_t
def capacity(self, *args) ‑> size_t
-
capacity(self) -> size_t
def clear(self, *args) ‑> void
-
clear(self)
def empty(self, *args) ‑> bool
-
empty(self) -> bool
def end(self, *args) ‑> qvector< selection_item_t >::const_iterator
-
end(self) -> selection_item_t
def erase(self, *args) ‑> qvector< selection_item_t >::iterator
-
erase(self, it) -> selection_item_tit: qvector< selection_item_t >::iteratorerase(self, first, last) -> selection_item_tfirst: qvector< selection_item_t >::iteratorlast: qvector< selection_item_t >::iterator
def extract(self, *args) ‑> selection_item_t *
-
extract(self) -> selection_item_t
def find(self, *args) ‑> qvector< selection_item_t >::const_iterator
-
find(self, x) -> selection_item_tx: selection_item_t const &
def front(self)
def grow(self, *args) ‑> void
-
grow(self, x=selection_item_t())x: selection_item_t const &
def has(self, *args) ‑> bool
-
has(self, x) -> boolx: selection_item_t const &
def inject(self, *args) ‑> void
-
inject(self, s, len)s: selection_item_t *len: size_t
def insert(self, *args) ‑> qvector< selection_item_t >::iterator
-
insert(self, it, x) -> selection_item_tit: qvector< selection_item_t >::iteratorx: selection_item_t const &
def pop_back(self, *args) ‑> void
-
pop_back(self)
def push_back(self, *args) ‑> selection_item_t &
-
push_back(self, x)x: selection_item_t const &push_back(self) -> selection_item_t
def qclear(self, *args) ‑> void
-
qclear(self)
def reserve(self, *args) ‑> void
-
reserve(self, cnt)cnt: size_t
def resize(self, *args) ‑> void
-
resize(self, _newsize, x)_newsize: size_tx: selection_item_t const &resize(self, _newsize)_newsize: size_t
def size(self, *args) ‑> size_t
-
size(self) -> size_t
def swap(self, *args) ‑> void
-
swap(self, r)r: qvector< selection_item_t > &
def truncate(self, *args) ‑> void
-
truncate(self)
class screen_graph_selection_t (*args)
-
Proxy of C++ screen_graph_selection_t class.__init__(self) -> screen_graph_selection_t
Ancestors
Methods
def add(self, *args) ‑> void
-
add(self, s)s: screen_graph_selection_t const &
def add_node(self, *args) ‑> void
-
add_node(self, node)node: int
def add_point(self, *args) ‑> void
-
add_point(self, e, idx)e: edge_tidx: int
def del_node(self, *args) ‑> void
-
del_node(self, node)node: int
def del_point(self, *args) ‑> void
-
del_point(self, e, idx)e: edge_tidx: int
def has(self, *args) ‑> bool
-
has(self, item) -> boolitem: selection_item_t const &
def items_count(self, *args) ‑> size_t
-
items_count(self, look_for_nodes) -> size_tlook_for_nodes: bool
def nodes_count(self, *args) ‑> size_t
-
nodes_count(self) -> size_t
def points_count(self, *args) ‑> size_t
-
points_count(self) -> size_t
def sub(self, *args) ‑> void
-
sub(self, s)s: screen_graph_selection_t const &
Inherited members
class selection_item_t (*args)
-
Proxy of C++ selection_item_t class.__init__(self) -> selection_item_t__init__(self, n) -> selection_item_tn: int__init__(self, _elp) -> selection_item_t_elp: edge_layout_point_t &__init__(self, e, idx) -> selection_item_te: edge_tidx: int
Instance variables
var elp
-
edge layout point (is_node = false)
var is_node
-
represents a selected node?
var node
-
node number (is_node = true)
Methods
def compare(self, *args) ‑> int
-
compare(self, r) -> intr: selection_item_t const &
class user_graph_place_t (*args, **kwargs)
-
Proxy of C++ user_graph_place_t class.
Instance variables
var node
-
node