All (GUI):
- Added strike-through support to wxFont (Igor Korot).
+- Add support for horizontal mouse wheel events to MSW and GTK (Lauri Nurmi).
- Fix infinite loop in wxHtmlEasyPrinting when trying to page break images
taller than the page height in wxHtmlEasyPrinting (Laurent Poujoulat).
- Added wxFilePickerCtrl::SetInitialDirectory().
- Add wxActiveXContainer::QueryClientSiteInterface and implement it in
wxWebViewIE to improve the default behaviour (Allonii).
- Update stretchable spaces in wxToolBar after tool removal (Catalin Raceanu).
-- Add support for horizontal mouse wheel events (Lauri Nurmi).
- Implement wxGraphicsContext::SetInterpolationQuality() (Eric Jensen).
- Fix coordinate handling in wxDC::Blit() when source DC is a DIB.
- Fix handling of composite windows in wxToolTip (Armel Asselin).
static gboolean
window_scroll_event(GtkWidget*, GdkEventScroll* gdk_event, wxWindow* win)
{
- if (gdk_event->direction != GDK_SCROLL_UP &&
- gdk_event->direction != GDK_SCROLL_DOWN)
- {
- return false;
- }
-
wxMouseEvent event(wxEVT_MOUSEWHEEL);
InitMouseEvent(win, event, gdk_event);
// FIXME: Get these values from GTK or GDK
event.m_linesPerAction = 3;
event.m_wheelDelta = 120;
- if (gdk_event->direction == GDK_SCROLL_UP)
- event.m_wheelRotation = 120;
- else
- event.m_wheelRotation = -120;
+
+ // Determine the scroll direction.
+ switch (gdk_event->direction)
+ {
+ case GDK_SCROLL_UP:
+ case GDK_SCROLL_RIGHT:
+ event.m_wheelRotation = 120;
+ break;
+
+ case GDK_SCROLL_DOWN:
+ case GDK_SCROLL_LEFT:
+ event.m_wheelRotation = -120;
+ break;
+
+ default:
+ return false; // Unknown/unhandled direction
+ }
+
+ // And the scroll axis.
+ switch (gdk_event->direction)
+ {
+ case GDK_SCROLL_UP:
+ case GDK_SCROLL_DOWN:
+ event.m_wheelAxis = wxMOUSE_WHEEL_VERTICAL;
+ break;
+
+ case GDK_SCROLL_LEFT:
+ case GDK_SCROLL_RIGHT:
+ event.m_wheelAxis = wxMOUSE_WHEEL_HORIZONTAL;
+ break;
+ }
if (win->GTKProcessEvent(event))
return TRUE;