wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
Closing the window while dragging with unsaved changes causes a dialog box, triggering a capture-lost event. Closing the window while dragging without unsaved changes causes an assertion about destroying a window with mouse capture.
You can now choose the behavior of dragging with the
middle and right mouse buttons.
You can also choose which modifier keys to use for
panning and zooming with the scroll wheel or trackpad.
You can also customize the zoom speed, which makes
it possible to have a good zoom experience on a wider
range of input devices.
You can also now zoom by dragging with the right or
middle button if desired.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3885
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4348
GTK3 smooth scrolling is enabled by wxWidgets but not to the exclusion
of normal scroll up/down events. wxWidgets maps these both to the same
scroll handler and will fire them both if they are not handled before
being queued. Testing timestamps allows us to mark and ignore the
dupes.
This is set to GTK3 only for now as it isn't listed as a problem for
other platforms. But it shouldn't cause issues if it is enabled
elsewhere in the future.
This is done to avoid a big chunk of conditionally-compiled code
in the middle of the event function.
Also separates the zoom logic from the WX_VIEW_CONTROLS object
and isolates it in a separate class behind a clearer interface.
Add some simple tests for sane steps on GTK+3-sized scroll
steps.
Gal mode: graphic cross-air cursor moved on items when clicking on & DRC error, like in legacy mode.
Make popup menu shown when right clicking on a DRC error item working.
In the previous version the method did not work correctly
when an action was invoked from context menu. In such case,
the cursor position was obtained in the moment of selecting
the action, instead of using the right click location.
This is the right implementation of the commit b25ded4d.
Previously if there were tools launched from another tool,
the settings could be stored in a wrong TOOL_STATE object.