summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-03-16 09:50:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-03-16 14:02:44 +0000
commitdffde8403e0bb81d7eb3b7853cece187e1d36c62 (patch)
tree29b557823aea3d221559bc74864c7b4e28ba2ea0 /include
parent85d23f8ce86a71c8d7d2cb34e8b790dcfc8df654 (diff)
allow more than DrawingArea to report style updates
Change-Id: I791e4ad45daeeb77ca25e36ae6520168b2ece044 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148980 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/weld.hxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index e352c2e357f7..4acece25f052 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -87,6 +87,7 @@ protected:
Link<Widget&, void> m_aFocusInHdl;
Link<Widget&, void> m_aFocusOutHdl;
Link<Widget&, bool> m_aMnemonicActivateHdl;
+ Link<Widget&, void> m_aStyleUpdatedHdl;
Link<const Size&, void> m_aSizeAllocateHdl;
Link<const KeyEvent&, bool> m_aKeyPressHdl;
Link<const KeyEvent&, bool> m_aKeyReleaseHdl;
@@ -279,6 +280,12 @@ public:
m_aMouseReleaseHdl = rLink;
}
+ virtual void connect_style_updated(const Link<Widget&, void>& rLink)
+ {
+ assert(!m_aStyleUpdatedHdl.IsSet() || !rLink.IsSet());
+ m_aStyleUpdatedHdl = rLink;
+ }
+
virtual void grab_add() = 0;
virtual bool has_grab() const = 0;
virtual void grab_remove() = 0;
@@ -2274,7 +2281,6 @@ public:
protected:
Link<draw_args, void> m_aDrawHdl;
- Link<Widget&, void> m_aStyleUpdatedHdl;
Link<const CommandEvent&, bool> m_aCommandHdl;
Link<Widget&, tools::Rectangle> m_aGetFocusRectHdl;
Link<tools::Rectangle&, OUString> m_aQueryTooltipHdl;
@@ -2304,7 +2310,6 @@ protected:
public:
void connect_draw(const Link<draw_args, void>& rLink) { m_aDrawHdl = rLink; }
- void connect_style_updated(const Link<Widget&, void>& rLink) { m_aStyleUpdatedHdl = rLink; }
void connect_command(const Link<const CommandEvent&, bool>& rLink) { m_aCommandHdl = rLink; }
void connect_focus_rect(const Link<Widget&, tools::Rectangle>& rLink)
{