summaryrefslogtreecommitdiff
path: root/vcl/inc/salvtables.hxx
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2023-03-03 12:12:50 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2023-03-03 15:47:12 +0000
commit8c5c9e943d1b754136cc1a76222fa7f84bbfd710 (patch)
tree698351c040b68a0263e09e8a2c3f71b326b2bde7 /vcl/inc/salvtables.hxx
parent620d1dc63b652db97b05eb21685dad70e6b2ab0d (diff)
Move SalInstanceLinkButton declaration to header file
Change-Id: Icd5b79f31e1839303e81c1914c9e30e078661d9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148111 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl/inc/salvtables.hxx')
-rw-r--r--vcl/inc/salvtables.hxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 25382e53a546..a6d5f4319d7c 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -18,6 +18,7 @@
#include <vcl/formatter.hxx>
#include <vcl/toolkit/spinfld.hxx>
#include <vcl/toolkit/fixed.hxx>
+#include <vcl/toolkit/fixedhyper.hxx>
#include <vcl/toolkit/lstbox.hxx>
#include <vcl/toolkit/menubtn.hxx>
#include <vcl/toolkit/combobox.hxx>
@@ -1154,6 +1155,35 @@ public:
virtual weld::Container* weld_message_area() override;
};
+class SalInstanceLinkButton : public SalInstanceWidget, public virtual weld::LinkButton
+{
+private:
+ VclPtr<FixedHyperlink> m_xButton;
+ Link<FixedHyperlink&, void> m_aOrigClickHdl;
+
+ DECL_LINK(ClickHdl, FixedHyperlink&, void);
+
+public:
+ SalInstanceLinkButton(FixedHyperlink* pButton, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
+ : SalInstanceWidget(pButton, pBuilder, bTakeOwnership)
+ , m_xButton(pButton)
+ {
+ m_aOrigClickHdl = m_xButton->GetClickHdl();
+ m_xButton->SetClickHdl(LINK(this, SalInstanceLinkButton, ClickHdl));
+ }
+
+ virtual void set_label(const OUString& rText) override { m_xButton->SetText(rText); }
+
+ virtual OUString get_label() const override { return m_xButton->GetText(); }
+
+ virtual void set_uri(const OUString& rUri) override { m_xButton->SetURL(rUri); }
+
+ virtual OUString get_uri() const override { return m_xButton->GetURL(); }
+
+ virtual ~SalInstanceLinkButton() override { m_xButton->SetClickHdl(m_aOrigClickHdl); }
+};
+
class SalInstanceCheckButton : public SalInstanceButton, public virtual weld::CheckButton
{
private: