diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-23 18:50:55 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-23 18:55:40 +0900 |
commit | ef934abf7d222035e4261474c322de603bd001da (patch) | |
tree | a84b2295ebbc97ccc0a8c0a2d273f31366afa1c8 /include | |
parent | 60ef5920d3ad89e0839f26488481ded8157ebbe9 (diff) |
support linking a Slider with a NumericField
Change-Id: I5cfd28d278cc21884eb9bf1b0e5a619c871f6bd2
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/slider.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/vcl/slider.hxx b/include/vcl/slider.hxx index a3d3fdbea427..9a96f3a4462e 100644 --- a/include/vcl/slider.hxx +++ b/include/vcl/slider.hxx @@ -23,6 +23,7 @@ #include <vcl/dllapi.h> #include <vcl/ctrl.hxx> #include <vcl/scrbar.hxx> +#include <vcl/field.hxx> class VCL_DLLPUBLIC Slider : public Control { @@ -51,9 +52,14 @@ private: ScrollType meScrollType; bool mbCalcSize; bool mbFullDrag; + + NumericField* mpLinkedField; + Link<> maSlideHdl; Link<> maEndSlideHdl; + DECL_LINK(LinkedFieldModifyHdl, NumericField*); + using Control::ImplInitSettings; using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); @@ -70,6 +76,8 @@ private: SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, bool bCallAction = true ); SAL_DLLPRIVATE long ImplDoSlide( long nNewPos ); SAL_DLLPRIVATE long ImplDoSlideAction( ScrollType eScrollType ); + SAL_DLLPRIVATE void ImplSetFieldLink(const Link<>& rLink); + SAL_DLLPRIVATE void ImplUpdateLinkedField(); public: Slider( vcl::Window* pParent, WinBits nStyle = WB_HORZ ); @@ -108,6 +116,8 @@ public: Size CalcWindowSizePixel(); + void SetLinkedField(NumericField* pField); + void SetSlideHdl( const Link<>& rLink ) { maSlideHdl = rLink; } const Link<>& GetSlideHdl() const { return maSlideHdl; } void SetEndSlideHdl( const Link<>& rLink ) { maEndSlideHdl = rLink; } |