IDAPython 9.0
Loading...
Searching...
No Matches
GraphViewer Class Reference
Inheritance diagram for GraphViewer:
CustomIDAMemo View_Hooks

Classes

class  UI_Hooks_Trampoline
 

Public Member Functions

 __init__ (self, title, close_open=False)
 Constructs the GraphView object.
 
 AddNode (self, obj)
 Creates a node associated with the given object and returns the node id.
 
 AddEdge (self, src_node, dest_node)
 Creates an edge between two given node ids.
 
 Clear (self)
 Clears all the nodes and edges.
 
 __iter__ (self)
 
 __getitem__ (self, idx)
 Returns a reference to the object associated with this node id.
 
 Count (self)
 Returns the node count.
 
 Close (self)
 Closes the graph.
 
 Show (self)
 Shows an existing graph or creates a new one.
 
 Select (self, node_id)
 Selects a node on the graph.
 
 OnRefresh (self)
 Event called when the graph is refreshed or first created.
 
 AddCommand (self, title, shortcut)
 
 OnPopup (self, widget, popup_handle)
 
 OnCommand (self, cmd_id)
 
- Public Member Functions inherited from CustomIDAMemo
 view_activated (self, view)
 view_activated(self, view) A view is activated
 
 view_deactivated (self, view)
 view_deactivated(self, view) A view is deactivated
 
 view_keydown (self, view, key, state)
 view_keydown(self, view, key, state) Key down event
 
 view_click (self, view, ve)
 view_click(self, view, event) Click event
 
 view_dblclick (self, view, ve)
 view_dblclick(self, view, event) Double click event
 
 view_curpos (self, view, *args)
 view_curpos(self, view) Cursor position changed
 
 view_close (self, view, *args)
 view_close(self, view) View closed
 
 view_switched (self, view, rt)
 view_switched(self, view, rt) A view's renderer has changed.
 
 view_mouse_over (self, view, ve)
 view_mouse_over(self, view, event) The user moved the mouse over (or out of) a node or an edge.
 
 view_loc_changed (self, view, now, was)
 view_loc_changed(self, view, now, was) The location for the view has changed (can be either the place_t, the renderer_info_t, or both.)
 
 view_mouse_moved (self, view, ve)
 view_mouse_moved(self, view, event) The mouse moved on the view
 
 Refresh (self)
 Refreshes the view.
 
 GetCurrentRendererType (self)
 
 SetCurrentRendererType (self, rtype)
 Set the current view's renderer.
 
 SetNodeInfo (self, node_index, node_info, flags)
 Set the properties for the given node.
 
 SetNodesInfos (self, values)
 Set the properties for the given nodes.
 
 GetNodeInfo (self, *args)
 Get the properties for the given node.
 
 DelNodesInfos (self, *nodes)
 Delete the properties for the given node(s).
 
 CreateGroups (self, groups_infos)
 Send a request to modify the graph by creating a (set of) group(s), and perform an animation.
 
 DeleteGroups (self, groups, new_current=-1)
 Send a request to delete the specified groups in the graph, and perform an animation.
 
 SetGroupsVisibility (self, groups, expand, new_current=-1)
 Send a request to expand/collapse the specified groups in the graph, and perform an animation.
 
 GetWidget (self)
 Return the TWidget underlying this view.
 
 GetWidgetAsGraphViewer (self)
 Return the graph_viewer_t underlying this view.
 
- Public Member Functions inherited from View_Hooks
"bool" hook (self)
 hook(self) -> bool
 
"bool" unhook (self)
 unhook(self) -> bool
 
"void" view_created (self, "TWidget *" view)
 view_created(self, view) A view is being created.
 
 __disown__ (self)
 

Public Attributes

 ui_hooks_trampoline = self.UI_Hooks_Trampoline(self)
 

Protected Member Functions

 _OnBind (self, hook)
 
- Protected Member Functions inherited from CustomIDAMemo
 _graph_item_tuple (self, ve)
 
 _get_cb (self, view, cb_name)
 
 _get_cb_arity (self, cb)
 

Protected Attributes

 _title = title
 
list _nodes = []
 
list _edges = []
 
 _close_open = close_open
 
 _quick_commands = ida_kernwin.quick_widget_commands_t(_qccb)
 

Additional Inherited Members

- Static Protected Member Functions inherited from CustomIDAMemo
 _dummy_cb (*args)
 
- Properties inherited from View_Hooks
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
title,
close_open = False )

Please do not remove or rename the private fields

Parameters
titleThe title of the graph window
close_openShould it attempt to close an existing graph (with same title) before creating this graph?

Reimplemented from CustomIDAMemo.

Member Function Documentation

◆ __getitem__()

__getitem__ ( self,
idx )

◆ __iter__()

__iter__ ( self)

◆ _OnBind()

_OnBind ( self,
hook )
protected

Reimplemented from CustomIDAMemo.

◆ AddCommand()

AddCommand ( self,
title,
shortcut )

◆ AddEdge()

AddEdge ( self,
src_node,
dest_node )

◆ AddNode()

AddNode ( self,
obj )

◆ Clear()

Clear ( self)

◆ Close()

Close ( self)

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

◆ Count()

Count ( self)

◆ OnCommand()

OnCommand ( self,
cmd_id )

◆ OnPopup()

OnPopup ( self,
widget,
popup_handle )

◆ OnRefresh()

OnRefresh ( self)

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.
Returns
: Returning True tells the graph viewer to use the items. Otherwise old items will be used.

◆ Select()

Select ( self,
node_id )

◆ Show()

Show ( self)
Returns
: Boolean

Member Data Documentation

◆ _close_open

_close_open = close_open
protected

◆ _edges

list _edges = []
protected

◆ _nodes

list _nodes = []
protected

◆ _quick_commands

_quick_commands = ida_kernwin.quick_widget_commands_t(_qccb)
protected

◆ _title

_title = title
protected

◆ ui_hooks_trampoline

ui_hooks_trampoline = self.UI_Hooks_Trampoline(self)

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