Module ida_graph :: Class GraphViewer
[frames] | no frames]

Class GraphViewer

            object --+        
                     |        
ida_kernwin.View_Hooks --+    
                         |    
 ida_kernwin.CustomIDAMemo --+
                             |
                            GraphViewer

Nested Classes
  UI_Hooks_Trampoline
Instance 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.
 
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.
 
Select(self, node_id)
Selects a node on the graph
 
Show(self)
Shows an existing graph or creates a new one
 
__getitem__(self, idx)
Returns a reference to the object associated with this node id
View_Hooks
__init__(self, title, close_open=False)
Constructs the GraphView object.
 
__iter__(self)

Inherited from ida_kernwin.CustomIDAMemo: CreateGroups, DelNodesInfos, DeleteGroups, GetCurrentRendererType, GetNodeInfo, GetWidget, GetWidgetAsGraphViewer, Refresh, SetCurrentRendererType, SetGroupsVisibility, SetNodeInfo, SetNodesInfos, view_activated, view_click, view_close, view_curpos, view_dblclick, view_deactivated, view_keydown, view_loc_changed, view_mouse_moved, view_mouse_over, view_switched

Inherited from ida_kernwin.View_Hooks: __disown__, __repr__, __swig_destroy__, hook, unhook, view_created

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from ida_kernwin.View_Hooks: thisown

Inherited from object: __class__

Method Details

Close(self)

 

Closes the graph. It is possible to call Show() again (which will recreate the graph)

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.

Returns:
Returning True tells the graph viewer to use the items. Otherwise old items will be used.

Note: ***It is important to clear previous nodes before adding nodes.***

Show(self)

 

Shows an existing graph or creates a new one

Returns:
Boolean

__init__(self, title, close_open=False)
(Constructor)

 

Constructs the GraphView object. Please do not remove or rename the private fields

Parameters:
  • title - The title of the graph window
  • close_open - Should it attempt to close an existing graph (with same title) before creating this graph?
Returns: View_Hooks
Overrides: object.__init__