Beispiel #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)
Beispiel #2
0
 def OnKillFocusEvent(self, event):
     """
     Handles wx.EVT_KILL_FOCUS
     """
     if self.editLabelId is None:
         eg.Notify("FocusChange", None)
     event.Skip(True)
Beispiel #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()
Beispiel #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()
Beispiel #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)
Beispiel #6
0
 def OnSetFocus(self, event):
     self.FocusLastItem()
     eg.Notify("FocusChange", self)
     event.Skip()
Beispiel #7
0
 def OnKillFocus(self, event):
     eg.Notify("FocusChange", None)
     event.Skip()
Beispiel #8
0
 def OnGetFocusEvent(self, event):
     """
     Handles wx.EVT_SET_FOCUS
     """
     eg.Notify("FocusChange", self)
     event.Skip(True)
Beispiel #9
0
 def SetControl(self):
     self.realControl = self.parent.GetEditControl()
     eg.Notify("FocusChange", self)
Beispiel #10
0
 def SetUndoState(self, undoState):
     self.undoState = undoState
     eg.Notify("UndoChange", undoState)
Beispiel #11
0
 def SetIsDirty(self, flag=True):
     self.isDirty = flag
     eg.Notify("DocumentChange", flag)
Beispiel #12
0
 def SetFilePath(self, filePath):
     self.filePath = filePath
     eg.Notify("DocumentFileChange", filePath)
Beispiel #13
0
 def Destroy(self):
     eg.Notify("DialogDestroy", self)
     wx.Dialog.Destroy(self)
Beispiel #14
0
 def __init__(self, *args, **kwargs):
     wx.Dialog.__init__(self, *args, **kwargs)
     eg.Notify("DialogCreate", self)
Beispiel #15
0
 def Do():
     self.document.expandedNodes.add(self)
     eg.Notify("NodeChanged", self)
Beispiel #16
0
 def Refresh(self):
     eg.Notify("NodeChanged", self.owner)