summaryrefslogtreecommitdiff
path: root/include/vcl/widgetbuilder.hxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-11-09 20:44:42 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-11-10 12:28:32 +0100
commitd18d05e2f7bfabef3d0783d4de550bf97b8937fd (patch)
tree2c0725714e44d8bf48398d29ab71a0b589c8f5ae /include/vcl/widgetbuilder.hxx
parentfa0df21584f523fad9e3454cd8245cb1ff36dba7 (diff)
tdf#130857 VclBuilder: Abstract tab control check from VCL details
In VclBuilder::handleTabChild, move casting the vcl::Window to TabControl further down to avoid vcl::Window specific code in the XML parsing logic. Introduce a new purely virtual helper method WidgetBuilder::isHorizontalTabControl, implement for VclBuilder and QtBuilder and use that in the XML parsing logic instead of directly checking whether the parent is a TabControl widget. This gets rid of one detail specific to the VCL implementation in the XML parsing part and is in preparation of further refactoring of VclBuilder::handleTabChild for reuse with QtBuilder. Change-Id: I05c637f81bce4a5cdd443960a1ad096c347df560 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176319 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'include/vcl/widgetbuilder.hxx')
-rw-r--r--include/vcl/widgetbuilder.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/vcl/widgetbuilder.hxx b/include/vcl/widgetbuilder.hxx
index aad9651fbaed..d12d68ad1cf7 100644
--- a/include/vcl/widgetbuilder.hxx
+++ b/include/vcl/widgetbuilder.hxx
@@ -298,6 +298,9 @@ protected:
virtual void setPriority(Widget* pWidget, int nPriority) = 0;
virtual void setContext(Widget* pWidget, std::vector<vcl::EnumContext::Context>&& aContext) = 0;
+ // Whether the given widget is a horizontal, i.e. non-vertical tab control
+ virtual bool isHorizontalTabControl(Widget* pWidget) = 0;
+
// These methods are currently only implemented by VclBuilder and should be
// refactored as described in the class documentation above (split into
// parsing done in this class + overridable methods that don't need XmlReader