def removed_child_event(self, obj, *args):
     """ Notification of deletion of a layer.  object is Image object,
     userinfo dict stores layer under key "layer", parent layer under
     key "parent"
     """
     _nq = NSNotificationQueue.defaultQueue()
     if len(args) != 2:
         raise ValueError, "Invalid number of items in deleted_layer_event"
     _info = {"layer" : args[0], "parent" : args[0].getParent()}
     _obj = Globals.wrap(obj)
     _note = NSNotification.notificationWithName_object_userInfo_(Globals.LayerDeletedNotification, _obj, _info)
     _nq.enqueueNotification_postingStyle_coalesceMask_forModes_(_note, NSPostASAP, NSNotificationNoCoalescing, None)
 def deleted_object_event(self, obj, *args):
     """ Notification of point, line, etc. removed from a layer.
     object is Image object, userinfo dict stores object
     under key "item", layer it was removed from under "layer"
     """
     _nq = NSNotificationQueue.defaultQueue()
     if len(args) != 2:
         raise ValueError, "Invalid number of items in deleted_object_event"
     _info = {"layer" : args[0], "item": args[1]}
     _obj = Globals.wrap(obj)
     _note = NSNotification.notificationWithName_object_userInfo_("deleted_object", _obj, _info)
     _nq.enqueueNotification_postingStyle_coalesceMask_forModes_(_note, NSPostASAP, NSNotificationNoCoalescing, None)
Esempio n. 3
0
 def added_child_event(self, obj, *args):
     """ Notification of new layer added to drawing.
     object is Image object, userinfo dict stores new layer
     under key "layer", parent layer under key "parent"
     """
     _nq = NSNotificationQueue.defaultQueue()
     if len(args) != 2:
         raise ValueError, "Invalid number of new items in added_layer_event"
     _info = {"layer": args[0], "parent": args[0].getParent()}
     _obj = Globals.wrap(obj)
     _note = NSNotification.notificationWithName_object_userInfo_(
         Globals.LayerAddedNotification, _obj, _info)
     _nq.enqueueNotification_postingStyle_coalesceMask_forModes_(
         _note, NSPostASAP, NSNotificationNoCoalescing, None)
Esempio n. 4
0
 def deleted_object_event(self, obj, *args):
     """ Notification of point, line, etc. removed from a layer.
     object is Image object, userinfo dict stores object
     under key "item", layer it was removed from under "layer"
     """
     _nq = NSNotificationQueue.defaultQueue()
     if len(args) != 2:
         raise ValueError, "Invalid number of items in deleted_object_event"
     _info = {"layer": args[0], "item": args[1]}
     _obj = Globals.wrap(obj)
     _note = NSNotification.notificationWithName_object_userInfo_(
         "deleted_object", _obj, _info)
     _nq.enqueueNotification_postingStyle_coalesceMask_forModes_(
         _note, NSPostASAP, NSNotificationNoCoalescing, None)