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_VCL_NOTEBOOKBAR_HXX
11 #define INCLUDED_VCL_NOTEBOOKBAR_HXX
13 #include <vcl/builder.hxx>
14 #include <vcl/ctrl.hxx>
15 #include <vcl/EnumContext.hxx>
16 #include <sfx2/notebookbar/NotebookbarContextControl.hxx>
17 #include <com/sun/star/ui/XContextChangeEventListener.hpp>
22 /// This implements Widget Layout-based notebook-like menu bar.
23 class VCL_DLLPUBLIC NotebookBar
: public Control
, public VclBuilderContainer
25 friend class NotebookBarContextChangeEventListener
;
27 NotebookBar(Window
* pParent
, const OString
& rID
, const OUString
& rUIXMLDescription
, const css::uno::Reference
<css::frame::XFrame
> &rFrame
);
28 virtual ~NotebookBar() override
;
29 virtual void dispose() SAL_OVERRIDE
;
31 virtual bool PreNotify( NotifyEvent
& rNEvt
) override
;
32 virtual Size
GetOptimalSize() const SAL_OVERRIDE
;
33 virtual void setPosSizePixel(long nX
, long nY
, long nWidth
, long nHeight
, PosSizeFlags nFlags
= PosSizeFlags::All
) SAL_OVERRIDE
;
34 virtual void Resize() override
;
36 void SetSystemWindow(SystemWindow
* pSystemWindow
);
38 const css::uno::Reference
<css::ui::XContextChangeEventListener
>& getContextChangeEventListener() const { return m_pEventListener
; }
40 void DataChanged(const DataChangedEvent
& rDCEvt
) override
;
43 VclPtr
<SystemWindow
> m_pSystemWindow
;
44 css::uno::Reference
<css::ui::XContextChangeEventListener
> m_pEventListener
;
45 std::vector
<NotebookbarContextControl
*> m_pContextContainers
;
47 void UpdateBackground();
51 #endif // INCLUDED_VCL_NOTEBOOKBAR_HXX
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */