summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-01 21:30:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-02 12:33:04 +0100
commitdc9bf7ca261e91adb32af3e51a51998a402a5752 (patch)
tree347208d9ed7d4e5989d0e62152caae4efc0b8864 /vcl
parente2205c4876723876bcaf1dd5ce494debab97591a (diff)
don't include vcl/button.hxx from vcl/layout.hxx
Change-Id: I16a1b392c33734ef89f26e7ff9318573e9bfce88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87817 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/layout.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 56c93c2c3b10..2426d056a542 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -10,6 +10,7 @@
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <o3tl/enumarray.hxx>
#include <o3tl/enumrange.hxx>
+#include <vcl/button.hxx>
#include <vcl/decoview.hxx>
#include <vcl/dialog.hxx>
#include <vcl/layout.hxx>
@@ -1541,6 +1542,35 @@ bool VclAlignment::set_property(const OString &rKey, const OUString &rValue)
return true;
}
+VclExpander::VclExpander(vcl::Window *pParent)
+ : VclBin(pParent)
+ , m_bResizeTopLevel(true)
+ , m_pDisclosureButton(VclPtr<DisclosureButton>::Create(this))
+{
+ m_pDisclosureButton->SetToggleHdl(LINK(this, VclExpander, ClickHdl));
+ m_pDisclosureButton->Show();
+}
+
+VclExpander::~VclExpander()
+{
+ disposeOnce();
+}
+
+bool VclExpander::get_expanded() const
+{
+ return m_pDisclosureButton->IsChecked();
+}
+
+void VclExpander::set_expanded(bool bExpanded)
+{
+ m_pDisclosureButton->Check(bExpanded);
+}
+
+void VclExpander::set_label(const OUString& rLabel)
+{
+ m_pDisclosureButton->SetText(rLabel);
+}
+
void VclExpander::dispose()
{
m_pDisclosureButton.disposeAndClear();