diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2022-12-06 18:23:32 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-12-16 19:49:56 +0000 |
commit | cc067789ab7fd67bdd6f6ba8ce53a6580a56d7ff (patch) | |
tree | 256a2df35e3c5c3fbdde40f7842147345785af6b /vcl/inc/jsdialog | |
parent | ae438bda3d5a0c9c9f2ed0e71104698bd2d8793d (diff) |
jsdialog: enter/leave tab page handlers
(cherry picked from commit 1257c288a0ba03fc69e7bc29fcf05642eb91d150)
Change-Id: I2cbc0fc18f716bf214db61f0729d666a1d2d172c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144344
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl/inc/jsdialog')
-rw-r--r-- | vcl/inc/jsdialog/jsdialogbuilder.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 291fd24babb7..564309a72626 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -534,6 +534,12 @@ public: class JSNotebook final : public JSWidget<SalInstanceNotebook, ::TabControl> { + Link<const OString&, bool> m_aLeavePageOverridenHdl; + Link<const OString&, void> m_aEnterPageOverridenHdl; + + DECL_LINK(LeaveHdl, const OString&, bool); + DECL_LINK(EnterHdl, const OString&, bool); + public: JSNotebook(JSDialogSender* pSender, ::TabControl* pControl, SalInstanceBuilder* pBuilder, bool bTakeOwnership); @@ -545,6 +551,17 @@ public: virtual void remove_page(const OString& rIdent) override; virtual void insert_page(const OString& rIdent, const OUString& rLabel, int nPos) override; + + void connect_leave_page(const Link<const OString&, bool>& rLink) + { + m_aLeavePageHdl = LINK(this, JSNotebook, LeaveHdl); + m_aLeavePageOverridenHdl = rLink; + } + void connect_enter_page(const Link<const OString&, void>& rLink) + { + m_aLeavePageHdl = LINK(this, JSNotebook, EnterHdl); + m_aEnterPageOverridenHdl = rLink; + } }; class JSSpinButton final : public JSWidget<SalInstanceSpinButton, ::FormattedField> |