示例#1
0
 def materialize_from_selected(self):
     if hasattr(self,'mark'):
         sorts = [self.lookup_node(x).sort for x in [self.mark,self.current_node]]
         required_sort = ivy_logic.RelationSort(sorts)
         rels = [r for r in self.g.relations if r.sort == required_sort]
         items = [str(r.rel_lit) for r in rels]
         msg = "Materialize this relation from selected node:"
         uu.listbox_dialog(self.tk,self.root,msg,items,command=functools.partial(self.materialize_from_selected_aux,rels))
示例#2
0
 def listbox_dialog(self,
                    msg,
                    items,
                    command=lambda: None,
                    on_cancel=lambda: None,
                    multiple=False):
     uu.listbox_dialog(self.tk, self.frame, msg, items, command, on_cancel,
                       multiple)
示例#3
0
文件: ivy_graph_ui.py 项目: JJTRX/ivy
 def materialize_from_selected(self):
     if hasattr(self,'mark'):
         sorts = [self.lookup_node(x).sort for x in [self.mark,self.current_node]]
         required_sort = ivy_logic.RelationSort(sorts)
         rels = [r for r in self.g.relations if r.sort == required_sort]
         items = [str(r.rel_lit) for r in rels]
         msg = "Materialize this relation from selected node:"
         uu.listbox_dialog(self.tk,self.root,msg,items,command=functools.partial(self.materialize_from_selected_aux,rels))
示例#4
0
文件: tk_ui.py 项目: odedp/ivy
 def listbox_dialog(self, msg, items, command=lambda: None, on_cancel=lambda: None, multiple=False):
     uu.listbox_dialog(self.tk, self.frame, msg, items, command, on_cancel, multiple)