summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-05-02 14:32:52 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-05-03 07:13:22 +0200
commit6f7acc14866136f22d26cae1e8656d8719b58300 (patch)
treee13a946defef97c91fd1c7267ae02bb83214ddfb /include
parent3f2d56d486da2006e24444cfa6f2f63700a14fae (diff)
jsdialog: support for LinkButton as an independent widget
This adds support for the (weld)LinkButton (FixedHyperlink) as an independent widget and not part of FixedText to jsdialog. In addition add "click" event that triggers activate_link method. Change-Id: Id110b4a0fd60fc24592e00235243783d46ae4575 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166898 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/jsdialog/executor.hxx5
-rw-r--r--include/vcl/toolkit/fixed.hxx2
-rw-r--r--include/vcl/weld.hxx2
-rw-r--r--include/vcl/wintypes.hxx3
4 files changed, 10 insertions, 2 deletions
diff --git a/include/vcl/jsdialog/executor.hxx b/include/vcl/jsdialog/executor.hxx
index b60c035d587a..ef667a70ce26 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -126,6 +126,11 @@ public:
{
rNotebook.m_aLeavePageHdl.Call(rPage);
}
+
+ static bool activate_link(weld::LinkButton& rLinkButton)
+ {
+ return rLinkButton.signal_activate_link();
+ }
};
namespace jsdialog
diff --git a/include/vcl/toolkit/fixed.hxx b/include/vcl/toolkit/fixed.hxx
index f4c410c974af..313e717c5a2f 100644
--- a/include/vcl/toolkit/fixed.hxx
+++ b/include/vcl/toolkit/fixed.hxx
@@ -53,7 +53,7 @@ protected:
virtual vcl::Window* getAccessibleRelationLabelFor() const override;
public:
- explicit FixedText( vcl::Window* pParent, WinBits nStyle = 0 );
+ explicit FixedText(vcl::Window* pParent, WinBits nStyle = 0, WindowType eType = WindowType::FIXEDTEXT);
virtual ~FixedText() override;
virtual void dispose() override;
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 8b9495e9e4e8..bd394dc5d3bc 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1665,6 +1665,8 @@ class VCL_DLLPUBLIC RadioButton : virtual public CheckButton
class VCL_DLLPUBLIC LinkButton : virtual public Widget
{
+ friend class ::LOKTrigger;
+
Link<LinkButton&, bool> m_aActivateLinkHdl;
protected:
diff --git a/include/vcl/wintypes.hxx b/include/vcl/wintypes.hxx
index c025e83b0afe..d0d6208d735b 100644
--- a/include/vcl/wintypes.hxx
+++ b/include/vcl/wintypes.hxx
@@ -99,7 +99,8 @@ enum class WindowType : sal_uInt16
HEADERBAR ,
VERTICALTABCONTROL ,
PROGRESSBAR ,
- LAST = PROGRESSBAR,
+ LINK_BUTTON,
+ LAST = LINK_BUTTON,
// only used in vclxtoolkit.cxx
TOOLKIT_FRAMEWINDOW = 0x1000,
TOOLKIT_SYSTEMCHILDWINDOW = 0x1001,