← Back to team overview

kicad-developers team mailing list archive

Re: Kicad Tool Framework


> I find track laying impossible without mouse warping... there is an
> option to disable it. But how could you *emulate* it, if there is no way
> to physically move the pointer? 

The OS+native windowing system will move the mouse coordinates in the next mouse move event.

Your tool, if pushed onto the wxEvtHandler stack, I am thinking should have first access
to ALL events, (~captured mouse) so as long as you retain state information the next call
to ProcessEvent(), possibly routed to TOOL::OnMouseMove(), you can/could in there redraw
the mouse cursor at the new desired location, or not.

See wxEventLoopBase in http://docs.wxwidgets.org/trunk/classwx_event_loop_base.html

This class sucks events out of the os queue, and gets first dibs on any events, it is the
first recipient of any OS events when it is alive, and dispatching happens from here.

If simply residing topmost on the wxEvtHandler stack does not give you enough control,
then there is the option to create another wxEventLoopBase temporarily.

Follow ups