IDAPython 9.0
Loading...
Searching...
No Matches
interactive_graph_t Class Reference
Inheritance diagram for interactive_graph_t:
drawable_graph_t gdl_graph_t

Public Member Functions

 __init__ (self, *args, **kwargs)
 
int size (self)
 
int node_qty (self)
 
bool empty (self)
 
bool exists (self, int node)
 
int get_node_representative (self, int node)
 
int get_node_group (self, int node)
 
None set_node_group (self, int node, int group)
 
bool is_deleted_node (self, int node)
 
None set_deleted_node (self, int node)
 
bool is_subgraph_node (self, int node)
 
bool is_dot_node (self, int node)
 
bool is_group_node (self, int node)
 
bool is_displayable_node (self, int node)
 
bool is_simple_node (self, int node)
 
bool is_collapsed_node (self, int node)
 
bool is_uncollapsed_node (self, int node)
 
bool is_visible_node (self, int node)
 
int get_first_subgraph_node (self, int group)
 
int get_next_subgraph_node (self, int group, int current)
 
int create_group (self, 'intvec_t const &' nodes)
 
bool delete_group (self, int group)
 
bool change_group_visibility (self, int group, bool expand)
 
int nsucc (self, int b)
 
int npred (self, int b)
 
int succ (self, int b, int i)
 
int pred (self, int b, int i)
 
'intvec_t const &' succset (self, int b)
 
'intvec_t const &' predset (self, int b)
 
None reset (self)
 
bool redo_layout (self)
 
None resize (self, int n)
 
int add_node (self, 'rect_t' r)
 
'ssize_t' del_node (self, int n)
 
bool add_edge (self, int i, int j, 'edge_info_t' ei)
 
bool del_edge (self, int i, int j)
 
bool replace_edge (self, int i, int j, int x, int y)
 
bool refresh (self)
 
bool set_nrect (self, int n, 'rect_t' r)
 
bool set_edge (self, 'edge_t' e, 'edge_info_t' ei)
 
bool create_digraph_layout (self)
 
None del_custom_layout (self)
 
bool get_custom_layout (self)
 
None set_custom_layout (self)
 
bool get_graph_groups (self)
 
None set_graph_groups (self)
 
ida_idaapi.ea_t calc_group_ea (self, 'intvec_t const &' arg2)
 
bool is_user_graph (self)
 
- Public Member Functions inherited from drawable_graph_t
bool create_tree_layout (self)
 
bool create_circle_layout (self, 'point_t' p, int radius)
 
None set_callback (self, 'hook_cb_t *' _callback, 'void *' _ud)
 
'ssize_t' grcall (self, int code)
 
'edge_info_t *' get_edge (self, 'edge_t' e)
 
'rect_tnrect (self, int n)
 
 __disown__ (self)
 
- Public Member Functions inherited from gdl_graph_t
'char *' get_node_label (self, int n)
 
None print_graph_attributes (self, 'FILE *' fp)
 
bool print_node (self, 'FILE *' fp, int n)
 
bool print_edge (self, 'FILE *' fp, int i, int j)
 
None print_node_attributes (self, 'FILE *' fp, int n)
 
int entry (self)
 
int exit (self)
 
'bgcolor_t' get_node_color (self, int n)
 
'bgcolor_t' get_edge_color (self, int i, int j)
 
'size_t' nedge (self, int node, bool ispred)
 
int edge (self, int node, int i, bool ispred)
 
int front (self)
 
'node_iteratorbegin (self)
 
'node_iteratorend (self)
 

Static Public Attributes

str gid
 
str belongs
 
str node_flags
 
str org_succs
 
str org_preds
 
str succs
 
str preds
 
str nodes
 
str edges
 
- Static Public Attributes inherited from drawable_graph_t
str title
 
str rect_edges_made
 
str current_layout
 
str circle_center
 
str circle_radius
 
str callback_ud
 

Properties

 thisown
 
- Properties inherited from drawable_graph_t
 thisown
 
- Properties inherited from gdl_graph_t
 thisown
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args,
** kwargs )

Reimplemented from drawable_graph_t.

Member Function Documentation

◆ add_edge()

bool add_edge ( self,
int i,
int j,
'edge_info_t' ei )

◆ add_node()

int add_node ( self,
'rect_t' r )
Add a node, possibly with a specific geometry

@param r: the node geometry (can be nullptr)
@returns the new node

◆ calc_group_ea()

ida_idaapi.ea_t calc_group_ea ( self,
'intvec_t const &' arg2 )

◆ change_group_visibility()

bool change_group_visibility ( self,
int group,
bool expand )
Expand/collapse a group node

@param group: the group node
@param expand: whether to expand or collapse
@returns success

◆ create_digraph_layout()

bool create_digraph_layout ( self)

◆ create_group()

int create_group ( self,
'intvec_t const &' nodes )
Create a new group node, that will contain all the nodes in 'nodes'.

@param nodes: the nodes that will be part of the group
@returns the group node, or -1 in case of error

◆ del_custom_layout()

None del_custom_layout ( self)

◆ del_edge()

bool del_edge ( self,
int i,
int j )

◆ del_node()

'ssize_t' del_node ( self,
int n )
Delete a node

@param n: the node to delete
@returns the number of deleted edges

◆ delete_group()

bool delete_group ( self,
int group )
Delete a group node.
This deletes the group node only; it does not delete nodes that are part of the group.

@param group: the group node
@returns success

◆ empty()

bool empty ( self)
Is the graph (visually) empty? 

@returns true if there are no visible nodes

Reimplemented from gdl_graph_t.

◆ exists()

bool exists ( self,
int node )
Is the node visible?

@param node: the node number
@returns success

Reimplemented from gdl_graph_t.

◆ get_custom_layout()

bool get_custom_layout ( self)

◆ get_first_subgraph_node()

int get_first_subgraph_node ( self,
int group )

◆ get_graph_groups()

bool get_graph_groups ( self)

◆ get_next_subgraph_node()

int get_next_subgraph_node ( self,
int group,
int current )

◆ get_node_group()

int get_node_group ( self,
int node )

◆ get_node_representative()

int get_node_representative ( self,
int node )
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() 

@param node: the node
@returns the node that represents 'node', or 'node' if it's not part of any group

◆ is_collapsed_node()

bool is_collapsed_node ( self,
int node )

◆ is_deleted_node()

bool is_deleted_node ( self,
int node )

◆ is_displayable_node()

bool is_displayable_node ( self,
int node )

◆ is_dot_node()

bool is_dot_node ( self,
int node )

◆ is_group_node()

bool is_group_node ( self,
int node )

◆ is_simple_node()

bool is_simple_node ( self,
int node )

◆ is_subgraph_node()

bool is_subgraph_node ( self,
int node )

◆ is_uncollapsed_node()

bool is_uncollapsed_node ( self,
int node )

◆ is_user_graph()

bool is_user_graph ( self)

◆ is_visible_node()

bool is_visible_node ( self,
int node )
Is the node currently visible?
An invisible node is a node that's part of a group that's currently collapsed.

@param node: the node
@returns success

◆ node_qty()

int node_qty ( self)
Get the number of visible nodes (the list can be retrieved using gdl.hpp's node_iterator)
See also size()

@returns the number of visible nodes

Reimplemented from gdl_graph_t.

◆ npred()

int npred ( self,
int b )

Reimplemented from gdl_graph_t.

◆ nsucc()

int nsucc ( self,
int b )

Reimplemented from gdl_graph_t.

◆ pred()

int pred ( self,
int b,
int i )

Reimplemented from gdl_graph_t.

◆ predset()

'intvec_t const &' predset ( self,
int b )

◆ redo_layout()

bool redo_layout ( self)
Recompute the layout, according to the value of 'current_layout'.

@returns success

◆ refresh()

bool refresh ( self)
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



@returns success

◆ replace_edge()

bool replace_edge ( self,
int i,
int j,
int x,
int y )

◆ reset()

None reset ( self)

◆ resize()

None resize ( self,
int n )
Resize the graph to 'n' nodes

@param n: the new size

◆ set_custom_layout()

None set_custom_layout ( self)

◆ set_deleted_node()

None set_deleted_node ( self,
int node )

◆ set_edge()

bool set_edge ( self,
'edge_t' e,
'edge_info_t' ei )

◆ set_graph_groups()

None set_graph_groups ( self)

◆ set_node_group()

None set_node_group ( self,
int node,
int group )

◆ set_nrect()

bool set_nrect ( self,
int n,
'rect_t' r )

◆ size()

int size ( self)
Get the total number of nodes (including group nodes, and including hidden nodes.)
See also node_qty()

@returns the total number of nodes in the graph

Reimplemented from gdl_graph_t.

◆ succ()

int succ ( self,
int b,
int i )

Reimplemented from gdl_graph_t.

◆ succset()

'intvec_t const &' succset ( self,
int b )

Member Data Documentation

◆ belongs

str belongs
static
Initial value:
= property(_ida_graph.
interactive_graph_t_belongs_get, _ida_graph.
interactive_graph_t_belongs_set)

◆ edges

str edges
static
Initial value:
= property(_ida_graph.
interactive_graph_t_edges_get, _ida_graph.interactive_graph_t_edges_set
)

◆ gid

str gid
static
Initial value:
= property(_ida_graph.interactive_graph_t_gid_get,
_ida_graph.interactive_graph_t_gid_set)

◆ node_flags

str node_flags
static
Initial value:
= property(_ida_graph.
interactive_graph_t_node_flags_get, _ida_graph.
interactive_graph_t_node_flags_set)

◆ nodes

str nodes
static
Initial value:
= property(_ida_graph.
interactive_graph_t_nodes_get, _ida_graph.interactive_graph_t_nodes_set
)

◆ org_preds

str org_preds
static
Initial value:
= property(_ida_graph.
interactive_graph_t_org_preds_get, _ida_graph.
interactive_graph_t_org_preds_set)

◆ org_succs

str org_succs
static
Initial value:
= property(_ida_graph.
interactive_graph_t_org_succs_get, _ida_graph.
interactive_graph_t_org_succs_set)

◆ preds

str preds
static
Initial value:
= property(_ida_graph.
interactive_graph_t_preds_get, _ida_graph.interactive_graph_t_preds_set
)

◆ succs

str succs
static
Initial value:
= property(_ida_graph.
interactive_graph_t_succs_get, _ida_graph.interactive_graph_t_succs_set
)

Property Documentation

◆ thisown

thisown
static
Initial value:
= property(lambda x: x.this.own(), lambda x, v: x.this.own(v),
doc='The membership flag')

The documentation for this class was generated from the following file: