summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-02 16:44:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-03 12:44:59 +0200
commitcadd2a9ea61464c8da3536b262a09ab50691f8d6 (patch)
treee1a30ee53005c1a2fbbb6c4090ff079c47bf1fd8 /include/vcl
parent35be93f83ac866ef18f0e06853c9818cd1d1bd56 (diff)
allow welding scrollbars individually
typically a full ScrolledWindow is probably preferable, but allow individual scrollbars to be used Change-Id: Iab290b387421d7d97d3604e31f528769d822155a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137709 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/weld.hxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 11ecec27ee9a..2f5a76cb8bdb 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2493,6 +2493,31 @@ public:
void connect_menu_toggled(const Link<const OString&, void>& rLink) { m_aToggleMenuHdl = rLink; }
};
+class VCL_DLLPUBLIC Scrollbar : virtual public Widget
+{
+protected:
+ Link<Scrollbar&, void> m_aChangeHdl;
+
+ void signal_adjustment_changed() { m_aChangeHdl.Call(*this); }
+
+public:
+ virtual void adjustment_configure(int value, int lower, int upper, int step_increment,
+ int page_increment, int page_size)
+ = 0;
+ virtual int adjustment_get_value() const = 0;
+ virtual void adjustment_set_value(int value) = 0;
+ virtual int adjustment_get_upper() const = 0;
+ virtual void adjustment_set_upper(int upper) = 0;
+ virtual int adjustment_get_page_size() const = 0;
+ virtual void adjustment_set_page_size(int size) = 0;
+ virtual void adjustment_set_page_increment(int size) = 0;
+ virtual void adjustment_set_step_increment(int size) = 0;
+ virtual int adjustment_get_lower() const = 0;
+ virtual void adjustment_set_lower(int upper) = 0;
+
+ void connect_adjustment_changed(const Link<Scrollbar&, void>& rLink) { m_aChangeHdl = rLink; }
+};
+
class VCL_DLLPUBLIC SizeGroup
{
public:
@@ -2555,6 +2580,7 @@ public:
virtual std::unique_ptr<Menu> weld_menu(const OString& id) = 0;
virtual std::unique_ptr<Popover> weld_popover(const OString& id) = 0;
virtual std::unique_ptr<Toolbar> weld_toolbar(const OString& id) = 0;
+ virtual std::unique_ptr<Scrollbar> weld_scrollbar(const OString& id) = 0;
virtual std::unique_ptr<SizeGroup> create_size_group() = 0;
/* return a Dialog suitable to take a screenshot of containing the contents of the .ui file.