[PR #192] [MERGED] CtrlCore: Horizontal mouse wheel support using MouseWheelHor() #220

Closed
opened 2026-05-05 03:43:17 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ultimatepp/ultimatepp/pull/192
Author: @User0755
Created: 2/13/2024
Status: Merged
Merged: 2/14/2024
Merged by: @mirek-fidler

Base: masterHead: mousewheel3


📝 Commits (1)

  • 710a991 CtrlCore: Horizontal mouse wheel support using MouseWheelHor()

📊 Changes

4 files changed (+44 additions, -14 deletions)

View changed files

📝 uppsrc/CtrlCore/CtrlCore.h (+2 -0)
📝 uppsrc/CtrlCore/CtrlMouse.cpp (+20 -4)
📝 uppsrc/CtrlCore/GtkEvent.cpp (+20 -9)
📝 uppsrc/CtrlCore/Win32Proc.cpp (+2 -1)

📄 Description

This solution (branch mousewheel3) uses a separate mouse event (MOUSEHWHEEL) for propagating horizontal mouse wheel events. This is quite straight forward and avoids major changes in CtrlCore. Also, this will not cause compatibility issues for existing code. The Ctrls will receive the event as a call to MouseWheelHor(). K_SHIFT is not manipulated.

--

I have also created another branch (mousewheel2) that attempts to pass the mouse wheel in a Point structure. However, this path proved to behave like a snowball rolling down the hill causing a lot of changes all around. In the end, I was not able to make the call to MouseWheel() with Point delta while still supporting current MouseWheel() with int. The reason was that the default Ctrl::MouseWheel() had to exist for propagating unprocessed calls for other Ctrls. So, MouseWheel() with Point delta is not compatible with existing code base. It is worth noting that both Windows and GTK produce the vertical and horizontal wheel events separately, so passing them combined as a point would not yield much benefit. (This would only happen after event compression.)

Finally, the simplest solution of all (now available as branch mousewheel-K_SHIFT), is also available for evaluation on User0755/ultimatepp.

// Tom


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ultimatepp/ultimatepp/pull/192 **Author:** [@User0755](https://github.com/User0755) **Created:** 2/13/2024 **Status:** ✅ Merged **Merged:** 2/14/2024 **Merged by:** [@mirek-fidler](https://github.com/mirek-fidler) **Base:** `master` ← **Head:** `mousewheel3` --- ### 📝 Commits (1) - [`710a991`](https://github.com/ultimatepp/ultimatepp/commit/710a991243faec3aee66185f3ffa2ce4bfa966be) CtrlCore: Horizontal mouse wheel support using MouseWheelHor() ### 📊 Changes **4 files changed** (+44 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `uppsrc/CtrlCore/CtrlCore.h` (+2 -0) 📝 `uppsrc/CtrlCore/CtrlMouse.cpp` (+20 -4) 📝 `uppsrc/CtrlCore/GtkEvent.cpp` (+20 -9) 📝 `uppsrc/CtrlCore/Win32Proc.cpp` (+2 -1) </details> ### 📄 Description This solution (branch mousewheel3) uses a separate mouse event (MOUSEHWHEEL) for propagating horizontal mouse wheel events. This is quite straight forward and avoids major changes in CtrlCore. Also, this will not cause compatibility issues for existing code. The Ctrls will receive the event as a call to MouseWheelHor(). K_SHIFT is not manipulated. -- I have also created another branch (mousewheel2) that attempts to pass the mouse wheel in a Point structure. However, this path proved to behave like a snowball rolling down the hill causing a lot of changes all around. In the end, I was not able to make the call to MouseWheel() with Point delta while still supporting current MouseWheel() with int. The reason was that the default Ctrl::MouseWheel() had to exist for propagating unprocessed calls for other Ctrls. So, MouseWheel() with Point delta is not compatible with existing code base. It is worth noting that both Windows and GTK produce the vertical and horizontal wheel events separately, so passing them combined as a point would not yield much benefit. (This would only happen after event compression.) Finally, the simplest solution of all (now available as branch mousewheel-K_SHIFT), is also available for evaluation on User0755/ultimatepp. // Tom --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 03:43:17 -06:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#220
No description provided.