summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/layout.hxx30
-rw-r--r--sfx2/source/notebookbar/DropdownBox.cxx1
-rw-r--r--sfx2/source/notebookbar/PriorityMergedHBox.cxx1
-rw-r--r--vcl/source/window/layout.cxx30
4 files changed, 40 insertions, 22 deletions
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 7989c011cc7f..c7631e1308cb 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -11,7 +11,6 @@
#define INCLUDED_VCL_LAYOUT_HXX
#include <vcl/dllapi.h>
-#include <vcl/button.hxx>
#include <vcl/help.hxx>
#include <vcl/scrbar.hxx>
#include <vcl/split.hxx>
@@ -459,34 +458,21 @@ private:
sal_Int32 m_nTopPadding;
};
+class DisclosureButton;
+class CheckBox;
+
class VclExpander final : public VclBin
{
public:
- 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();
- }
- virtual ~VclExpander() override { disposeOnce(); }
+ VclExpander(vcl::Window *pParent);
+ virtual ~VclExpander() override;
virtual void dispose() override;
virtual vcl::Window *get_child() override;
virtual const vcl::Window *get_child() const override;
virtual bool set_property(const OString &rKey, const OUString &rValue) override;
- bool get_expanded() const
- {
- return m_pDisclosureButton->IsChecked();
- }
- void set_expanded(bool bExpanded)
- {
- m_pDisclosureButton->Check(bExpanded);
- }
- void set_label(const OUString& rLabel)
- {
- m_pDisclosureButton->SetText(rLabel);
- }
+ bool get_expanded() const;
+ void set_expanded(bool bExpanded);
+ void set_label(const OUString& rLabel);
virtual void StateChanged(StateChangedType nType) override;
void SetExpandedHdl( const Link<VclExpander&,void>& rLink ) { maExpandedHdl = rLink; }
private:
diff --git a/sfx2/source/notebookbar/DropdownBox.cxx b/sfx2/source/notebookbar/DropdownBox.cxx
index 104bb31ecb5a..450cae82a1e8 100644
--- a/sfx2/source/notebookbar/DropdownBox.cxx
+++ b/sfx2/source/notebookbar/DropdownBox.cxx
@@ -18,6 +18,7 @@
*/
#include <vcl/builderfactory.hxx>
+#include <vcl/button.hxx>
#include <vcl/layout.hxx>
#include "DropdownBox.hxx"
diff --git a/sfx2/source/notebookbar/PriorityMergedHBox.cxx b/sfx2/source/notebookbar/PriorityMergedHBox.cxx
index faebfbcd4121..8a5bcd014c4d 100644
--- a/sfx2/source/notebookbar/PriorityMergedHBox.cxx
+++ b/sfx2/source/notebookbar/PriorityMergedHBox.cxx
@@ -18,6 +18,7 @@
*/
#include <vcl/builderfactory.hxx>
+#include <vcl/button.hxx>
#include <vcl/layout.hxx>
#include <bitmaps.hlst>
#include "PriorityHBox.hxx"
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();