1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #ifndef INCLUDED_SVX_SIDEBAR_PANELLAYOUT_HXX
11 #define INCLUDED_SVX_SIDEBAR_PANELLAYOUT_HXX
13 #include <svx/svxdllapi.h>
15 #include <vcl/builder.hxx>
16 #include <vcl/ctrl.hxx>
17 #include <vcl/layout.hxx>
18 #include <vcl/timer.hxx>
19 #include <vcl/idle.hxx>
20 #include <vcl/weld.hxx>
22 #include <com/sun/star/frame/XFrame.hpp>
24 /// This class is the base for the Widget Layout-based sidebar panels.
25 class SVX_DLLPUBLIC PanelLayout
: public Control
, public VclBuilderContainer
28 std::unique_ptr
<weld::Builder
> m_xBuilder
;
29 VclPtr
<VclVBox
> m_xVclContentArea
;
30 std::unique_ptr
<weld::Container
> m_xContainer
;
33 Idle m_aPanelLayoutIdle
;
35 css::uno::Reference
<css::frame::XFrame
> mxFrame
;
37 DECL_DLLPRIVATE_LINK(ImplHandlePanelLayoutTimerHdl
, Timer
*, void);
40 PanelLayout(vcl::Window
* pParent
, const OString
& rID
, const OUString
& rUIXMLDescription
,
41 const css::uno::Reference
<css::frame::XFrame
> &rFrame
, bool bInterimBuilder
= false);
42 virtual ~PanelLayout() override
;
43 virtual void dispose() override
;
45 virtual Size
GetOptimalSize() const override
;
46 virtual void setPosSizePixel(long nX
, long nY
, long nWidth
, long nHeight
, PosSizeFlags nFlags
= PosSizeFlags::All
) override
;
47 virtual void queue_resize(StateChangedType eReason
= StateChangedType::Layout
) override
;
48 virtual bool EventNotify(NotifyEvent
& rNEvt
) override
;
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */