diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-26 11:22:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-26 15:18:39 +0200 |
commit | bda370031e669d4a9b19d0a8247da0db230ebf00 (patch) | |
tree | 6863c066dfe5ad10400d5e9dbba237c653e984bd /include | |
parent | e772025f369c810fe73c2de7f45b91ffcc345152 (diff) |
extend FormattedSpinButton to allow custom input/output
Change-Id: Ie84c1d46bc6fa3e29ed97147de486911dc6ecc0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97217
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/weld.hxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index fe03d0ed3958..05d5eeeb50d4 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -1588,6 +1588,8 @@ class VCL_DLLPUBLIC FormattedSpinButton : virtual public Entry { protected: Link<FormattedSpinButton&, void> m_aValueChangedHdl; + Link<FormattedSpinButton&, void> m_aOutputHdl; + Link<double*, bool> m_aInputHdl; void signal_value_changed() { m_aValueChangedHdl.Call(*this); } @@ -1596,6 +1598,14 @@ public: virtual double get_value() const = 0; virtual void set_range(double min, double max) = 0; virtual void get_range(double& min, double& max) const = 0; + virtual void set_increments(double step, double page) = 0; + + void set_min(double min) + { + double max, dummy; + get_range(dummy, max); + set_range(min, max); + } void set_max(double max) { @@ -1617,6 +1627,9 @@ public: { m_aValueChangedHdl = rLink; } + + void connect_output(const Link<FormattedSpinButton&, void>& rLink) { m_aOutputHdl = rLink; } + void connect_input(const Link<double*, bool>& rLink) { m_aInputHdl = rLink; } }; class VCL_DLLPUBLIC Image : virtual public Widget |