Ejemplo n.º 1
0
 def _fit_graph(self, graph):
     if graph:
         gv = graph.GetWidget()
         ida_graph.viewer_fit_window(gv)
         ida_graph.refresh_viewer(gv)
         return True
     return False
Ejemplo n.º 2
0
    def _center_graph(self):
        """
        Center the sub-tree graph, and set an appropriate zoom level.
        """
        widget = self.GetWidget()
        gv = ida_graph.get_graph_viewer(widget)
        g = ida_graph.get_viewer_graph(gv)

        ida_graph.viewer_fit_window(gv)
        ida_graph.refresh_viewer(gv)

        gli = ida_moves.graph_location_info_t()
        ida_graph.viewer_get_gli(gli, gv, ida_graph.GLICTL_CENTER) 
        if gli.zoom > 1.5:
            gli.zoom = 1.5
        else:
            gli.zoom = gli.zoom * 0.9

        ida_graph.viewer_set_gli(gv, gli, ida_graph.GLICTL_CENTER)
Ejemplo n.º 3
0
 def do_fit_widget_a():
     ida_graph.viewer_fit_window(widget_a)