diff options
Diffstat (limited to 'include/vcl/weldutils.hxx')
-rw-r--r-- | include/vcl/weldutils.hxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/vcl/weldutils.hxx b/include/vcl/weldutils.hxx index 9a29e89d7b5f..d956849a3292 100644 --- a/include/vcl/weldutils.hxx +++ b/include/vcl/weldutils.hxx @@ -20,6 +20,7 @@ #include <tools/time.hxx> #include <vcl/dllapi.h> #include <vcl/formatter.hxx> +#include <vcl/timer.hxx> #include <vcl/weld.hxx> class CalendarWrapper; @@ -390,6 +391,24 @@ private: DECL_DLLPRIVATE_LINK(KeyInputHdl, const KeyEvent&, bool); }; +class VCL_DLLPUBLIC ButtonPressRepeater final +{ +private: + weld::Button& m_rButton; + AutoTimer m_aRepeat; + const Link<Button&, void> m_aLink; + bool m_bModKey; + + DECL_LINK(MousePressHdl, const MouseEvent&, bool); + DECL_LINK(MouseReleaseHdl, const MouseEvent&, bool); + DECL_LINK(RepeatTimerHdl, Timer*, void); + +public: + ButtonPressRepeater(weld::Button& rButton, const Link<Button&, void>& rLink); + void Stop() { m_aRepeat.Stop(); } + bool IsModKeyPressed() const { return m_bModKey; } +}; + // get the row the iterator is on VCL_DLLPUBLIC size_t GetAbsPos(const weld::TreeView& rTreeView, const weld::TreeIter& rIter); |