include/vcl/scrbar.hxx | 10 ---------- include/vcl/vclenum.hxx | 8 ++++++++ include/vcl/weld.hxx | 2 ++ vcl/source/app/salvtables.cxx | 2 ++ vcl/unx/gtk3/gtkinst.cxx | 5 +++++ 5 files changed, 17 insertions(+), 10 deletions(-)
New commits: commit e40f9ec9680a350e8e44dcbbd7decbe9603bcc51 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Aug 3 11:03:02 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Aug 3 15:42:34 2022 +0200 export scroll type when possible Change-Id: I1c343507d7db4b0805c20eabb68bf58a4432d33f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137746 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/scrbar.hxx b/include/vcl/scrbar.hxx index 77cbbb657b5a..240a1c7e8aa9 100644 --- a/include/vcl/scrbar.hxx +++ b/include/vcl/scrbar.hxx @@ -24,16 +24,6 @@ #include <vcl/ctrl.hxx> #include <memory> - -enum class ScrollType -{ - DontKnow, - LineUp, LineDown, - PageUp, PageDown, - Drag -}; - - struct ImplScrollBarData; class VCL_DLLPUBLIC ScrollBar : public Control diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx index 9f1a3c8f6b08..11fa32791a5f 100644 --- a/include/vcl/vclenum.hxx +++ b/include/vcl/vclenum.hxx @@ -374,6 +374,14 @@ namespace o3tl template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x1107> {}; } +enum class ScrollType +{ + DontKnow, + LineUp, LineDown, + PageUp, PageDown, + Drag +}; + #endif // INCLUDED_VCL_VCLENUM_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 2f5a76cb8bdb..1c3f19ab94ae 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -2515,6 +2515,8 @@ public: virtual int adjustment_get_lower() const = 0; virtual void adjustment_set_lower(int upper) = 0; + virtual ScrollType get_scroll_type() const = 0; + void connect_adjustment_changed(const Link<Scrollbar&, void>& rLink) { m_aChangeHdl = rLink; } }; diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 2f5d542b0fc5..3f35337339cd 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2551,6 +2551,8 @@ public: return m_xScrollBar->SetLineSize(size); } + virtual ScrollType get_scroll_type() const override { return m_xScrollBar->GetType(); } + virtual ~SalInstanceScrollbar() override { m_xScrollBar->SetScrollHdl(m_aOrigScrollHdl); } }; } diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 7412c0c0742d..57e76f4f2eed 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -8510,6 +8510,11 @@ public: g_signal_handler_unblock(m_pAdjustment, m_nAdjustChangedSignalId); } + virtual ScrollType get_scroll_type() const override + { + return ScrollType::DontKnow; + } + virtual ~GtkInstanceScrollbar() override { g_signal_handler_disconnect(m_pAdjustment, m_nAdjustChangedSignalId);