LibreOffice Module sfx2 (master) 1
PanelLayout.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#pragma once
11
12#include <sfx2/dllapi.h>
13#include <vcl/weld.hxx>
14
16class VclSimpleEvent;
17namespace sfx2 { namespace sidebar { class Panel; } }
18namespace tools { class JsonWriter; }
19
22{
23protected:
24 std::unique_ptr<weld::Builder> m_xBuilder;
25 std::unique_ptr<weld::Container> m_xContainer;
27
28 virtual void DataChanged(const DataChangedEvent& rEvent);
29 virtual void DumpAsPropertyTree(tools::JsonWriter&);
30
31 virtual weld::Window* GetFrameWeld() const;
32
33private:
34 DECL_DLLPRIVATE_LINK(DataChangedEventListener, VclSimpleEvent&, void);
35 DECL_DLLPRIVATE_LINK(DumpAsPropertyTreeHdl, tools::JsonWriter&, void);
36
37public:
38 PanelLayout(weld::Widget* pParent, const OUString& rID, const OUString& rUIXMLDescription);
39
40 void SetPanel(sfx2::sidebar::Panel* pPanel);
41
42 virtual ~PanelLayout();
43
45 {
46 return m_xContainer->get_preferred_size();
47 }
48
49 void queue_resize();
50};
51
52/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class is the base for the Widget Layout-based sidebar panels.
Definition: PanelLayout.hxx:22
sfx2::sidebar::Panel * m_pPanel
Definition: PanelLayout.hxx:26
DECL_DLLPRIVATE_LINK(DumpAsPropertyTreeHdl, tools::JsonWriter &, void)
std::unique_ptr< weld::Builder > m_xBuilder
Definition: PanelLayout.hxx:24
Size get_preferred_size() const
Definition: PanelLayout.hxx:44
DECL_DLLPRIVATE_LINK(DataChangedEventListener, VclSimpleEvent &, void)
std::unique_ptr< weld::Container > m_xContainer
Definition: PanelLayout.hxx:25
Multiple panels form a single deck.
Definition: Panel.hxx:54
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
#define SFX2_DLLPUBLIC
Definition: dllapi.h:29
Reference< XNameAccess > m_xContainer