X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce38e440a6790c5e77306b0bb880cf7288f6bb6a..05f4dfa7268b60d2f56a685933c49f3d3d4be745:/include/wx/scrolwin.h diff --git a/include/wx/scrolwin.h b/include/wx/scrolwin.h index 1b41c43d9b..6360fd721b 100644 --- a/include/wx/scrolwin.h +++ b/include/wx/scrolwin.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: include/wx/scrolwin.h +// Name: wx/scrolwin.h // Purpose: wxScrolledWindow, wxScrolledControl and wxScrollHelper // Author: Vadim Zeitlin // Modified by: @@ -108,6 +108,17 @@ public: // actually scroll a non-constant distance virtual void EnableScrolling(bool x_scrolling, bool y_scrolling); + // Disable use of keyboard keys for scrolling. By default cursor movement + // keys (including Home, End, Page Up and Down) are used to scroll the + // window appropriately. If the derived class uses these keys for something + // else, e.g. changing the currently selected item, this function can be + // used to disable this behaviour as it's not only not necessary then but + // can actually be actively harmful if another object forwards a keyboard + // event corresponding to one of the above keys to us using + // ProcessWindowEvent() because the event will always be processed which + // can be undesirable. + void DisableKeyboardScrolling() { m_kbdScrollingEnabled = false; } + // Get the view start void GetViewStart(int *x, int *y) const { DoGetViewStart(x, y); } @@ -284,6 +295,8 @@ protected: bool m_xScrollingEnabled; bool m_yScrollingEnabled; + bool m_kbdScrollingEnabled; + #if wxUSE_MOUSEWHEEL int m_wheelRotation; #endif // wxUSE_MOUSEWHEEL