Closed ioxu closed 10 months ago
move pushing handlers to Handle initialisation.
Handle
avoid doing this setup outside of Handle.__init__
Handle.__init__
handle = boxer.handles.PointHandle( ) self.test_handles.append( handle ) self.window.push_handlers( on_mouse_motion = handle.on_mouse_motion ) self.window.push_handlers( on_mouse_press = handle.on_mouse_press ) self.window.push_handlers( on_mouse_release = handle.on_mouse_release ) self.window.push_handlers( on_mouse_drag = handle.on_mouse_drag )
Well, on second thoughts, this is actually useful to control the handlers outside of initilisation.
move pushing handlers to
Handle
initialisation.avoid doing this setup outside of
Handle.__init__