diff options
Diffstat (limited to 'vcl/source/window/layout.cxx')
-rw-r--r-- | vcl/source/window/layout.cxx | 30 |
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(); |