示例#1
0
 def __init__(self, *args, **kwargs):
     self.__lastEventId = None
     self.__done = False
     self.setupFinished = False
     wx.Dialog.__init__(self, *args, **kwargs)
     self.Bind(wx.EVT_CLOSE, self.OnClose)
     eg.Notify("DialogCreate", self)
示例#2
0
 def OnKillFocusEvent(self, event):
     """
     Handles wx.EVT_KILL_FOCUS
     """
     if self.editLabelId is None:
         eg.Notify("FocusChange", None)
     event.Skip(True)
示例#3
0
 def OnSelectionChangedEvent(self, event):
     """
     Handles wx.EVT_TREE_SEL_CHANGED
     """
     node = self.GetPyData(event.GetItem())
     self.document.selection = node
     eg.Notify("SelectionChange", node)
     event.Skip()
示例#4
0
 def OnEndLabelEditEvent(self, event):
     """
     Handles wx.EVT_TREE_END_LABEL_EDIT
     """
     self.editLabelId = None
     eg.Notify("FocusChange", self)
     itemId = event.GetItem()
     node = self.GetPyData(itemId)
     newLabel = event.GetLabel()
     if not event.IsEditCancelled() and node.GetLabel() != newLabel:
         eg.UndoHandler.Rename(self.document).Do(node, newLabel)
     event.Skip()
示例#5
0
 def SetTarget(self, target):
     if target == self.target:
         return
     if self.target:
         self.target.dependants.remove(self)
     self.target = target
     if target:
         if target.dependants is None:
             target.dependants = [self]
         else:
             target.dependants.append(self)
         self.xmlId = target.xmlId
         self.id2target[target.xmlId] = target
     eg.Notify("NodeChanged", self.owner)
示例#6
0
 def OnSetFocus(self, event):
     self.FocusLastItem()
     eg.Notify("FocusChange", self)
     event.Skip()
示例#7
0
 def OnKillFocus(self, event):
     eg.Notify("FocusChange", None)
     event.Skip()
示例#8
0
 def OnGetFocusEvent(self, event):
     """
     Handles wx.EVT_SET_FOCUS
     """
     eg.Notify("FocusChange", self)
     event.Skip(True)
示例#9
0
 def SetControl(self):
     self.realControl = self.parent.GetEditControl()
     eg.Notify("FocusChange", self)
示例#10
0
 def SetUndoState(self, undoState):
     self.undoState = undoState
     eg.Notify("UndoChange", undoState)
示例#11
0
 def SetIsDirty(self, flag=True):
     self.isDirty = flag
     eg.Notify("DocumentChange", flag)
示例#12
0
 def SetFilePath(self, filePath):
     self.filePath = filePath
     eg.Notify("DocumentFileChange", filePath)
示例#13
0
 def Destroy(self):
     eg.Notify("DialogDestroy", self)
     wx.Dialog.Destroy(self)
示例#14
0
 def __init__(self, *args, **kwargs):
     wx.Dialog.__init__(self, *args, **kwargs)
     eg.Notify("DialogCreate", self)
示例#15
0
 def Do():
     self.document.expandedNodes.add(self)
     eg.Notify("NodeChanged", self)
示例#16
0
 def Refresh(self):
     eg.Notify("NodeChanged", self.owner)