ioxu / boxer

workflow tool
MIT License
1 stars 0 forks source link

Handle: better handler setup #11

Closed ioxu closed 10 months ago

ioxu commented 10 months ago

move pushing handlers to Handle initialisation.

avoid doing this setup outside of 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 )
ioxu commented 10 months ago

Well, on second thoughts, this is actually useful to control the handlers outside of initilisation.