Commit Graph
12 Commits
Author SHA1 Message Date
Robert RoeblingandVadim Zeitlin f9d31d878d Add mouse events tests to event sample
Make it possible to easily see the events generated by (double) clicking
various mouse buttons.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
2025-10-20 00:03:56 +02:00
Alex Shvartzkop e7462d82bf Fix touch gestures test navigation in event sample.
Panning while scaled didn't pan by the correct amount.
Combination of gesture events didn't work correctly.
2024-06-21 14:25:21 +03:00
PB 8efb1bceda Fix crash due to logging bug in the event sample
The gestures frame created its own log target and deleted
the previous one but did not restore it when being closed.

This left the current log target invalid which led to a crash
when calling any wxLog*() function after gestures frame was closed.

Fix this by restoring the previous log target when gestures frame
is closed.

Closes #23767.

See #23881.
2023-09-21 22:56:49 +02:00
Vadim Zeitlin 4f4c5fcfdf Use nullptr instead of NULL in the code and documentation
This is a combination of running clang-tidy with modernize-use-nullptr
check for some ports (GTK, X11, OSX) and manual changes to the ports for
which it couldn't be used easily (MSW, DFB) and also manually updating
the docs.

Also replace NULL with null or nullptr in the comments as this is more
consistent with the use of nullptr in the code and makes it simpler to
grep for the remaining occurrences of NULL itself.

And also use null in the assert messages.

Only a few occurrences of "NULL" are still left in non-C files, mostly
corresponding to unclear comments or string output which it might not be
safe to change.
2022-10-18 01:25:25 +02:00
New Pagodi a636141b56 Use consistent letter case in log message strings 2017-12-24 18:25:26 -06:00
New Pagodi 0fa033df61 Remove newline characters from log message strings 2017-12-24 18:24:45 -06:00
New Pagodi d3fd17db04 Use wxAutoBufferedPaintDC to reduce flicker with wxMSW 2017-12-24 18:24:05 -06:00
New Pagodi ca1b76ba49 Set a minimum size for MyGestureFrame 2017-12-24 18:23:13 -06:00
Vadim Zeitlin 7535854ec4 Embed the image into the event sample
Don't load it from the image sample directory, this doesn't necessarily
work under Unix if the image sample hadn't been built.

Just embed an XPM image directly into the sample, this is good enough
for demonstration purposes.
2017-11-22 03:05:03 +01:00
Vadim Zeitlin 842dd1cfd9 Add wxWindow::EnableTouchEvents()
Don't request touch event generation for all windows by default, this
has an inherent overhead and is not needed for 99% of the application
windows, so require calling EnableTouchEvents() explicitly to do it
instead.

Note that this requires properly initializing gesture recognizers in
wxOSX now that they're not always allocated, otherwise releasing them
when destroying the window would crash.
2017-11-22 02:24:24 +01:00
Vadim Zeitlin bb2887930f Use wxPoint instead of (x,y) pair in wxPanGestureEvent
Using higher level objects makes the code generating and using this
event shorter and more clear.
2017-11-21 17:45:34 +01:00
prashantkn94 261b04b5a3 Merge multi-touch gestures event branch
This is a squashed commit of the SOC2017_GESTURES branch from
https://github.com/prashantkn94/wxWidgets.git

Closes https://github.com/wxWidgets/wxWidgets/pull/551
2017-11-17 18:06:06 +01:00