LibreOffice Module vcl (master)  1
notebookbar.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 #ifndef INCLUDED_VCL_NOTEBOOKBAR_HXX
11 #define INCLUDED_VCL_NOTEBOOKBAR_HXX
12 
13 #include <vcl/builder.hxx>
14 #include <vcl/ctrl.hxx>
16 #include <vcl/settings.hxx>
17 #include <set>
18 #include <vector>
19 
20 namespace com::sun::star::ui { class XContextChangeEventListener; }
21 
23 class SystemWindow;
24 
27 {
29 public:
30  NotebookBar(Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
31  const css::uno::Reference<css::frame::XFrame>& rFrame,
32  const NotebookBarAddonsItem& aNotebookBarAddonsItem);
33  virtual ~NotebookBar() override;
34  virtual void dispose() override;
35 
36  virtual bool PreNotify( NotifyEvent& rNEvt ) override;
37  virtual Size GetOptimalSize() const override;
38  virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override;
39  virtual void Resize() override;
40 
41  void SetSystemWindow(SystemWindow* pSystemWindow);
42 
43  void StateChanged(const StateChangedType nStateChange ) override;
44 
45  void DataChanged(const DataChangedEvent& rDCEvt) override;
46 
47  void ControlListenerForCurrentController(bool bListen);
48  void StopListeningAllControllers();
49 
50 private:
52  css::uno::Reference<css::ui::XContextChangeEventListener> m_pEventListener;
53  std::set<css::uno::Reference<css::frame::XController>> m_alisteningControllers;
54  std::vector<NotebookbarContextControl*> m_pContextContainers;
55  css::uno::Reference<css::frame::XFrame> mxFrame;
56 
59 
60  void UpdateBackground();
61 
62  void UpdateDefaultSettings();
63  void UpdatePersonaSettings();
64 };
65 
66 #endif // INCLUDED_VCL_NOTEBOOKBAR_HXX
67 
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AllSettings PersonaSettings
Definition: notebookbar.hxx:58
std::vector< NotebookbarContextControl * > m_pContextContainers
Definition: notebookbar.hxx:54
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
virtual void StateChanged(StateChangedType nStateChange) override
Definition: ctrl.cxx:260
PosSizeFlags
Definition: window.hxx:141
VclPtr< SystemWindow > m_pSystemWindow
Definition: notebookbar.hxx:51
StateChangedType
Definition: window.hxx:311
virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
Definition: window.cxx:2735
std::set< css::uno::Reference< css::frame::XController > > m_alisteningControllers
Definition: notebookbar.hxx:53
css::uno::Reference< css::ui::XContextChangeEventListener > m_pEventListener
Definition: notebookbar.hxx:52
virtual bool PreNotify(NotifyEvent &rNEvt)
Definition: event.cxx:51
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: ctrl.cxx:59
AllSettings DefaultSettings
Definition: notebookbar.hxx:57
virtual Size GetOptimalSize() const override
Definition: ctrl.cxx:374
virtual void Resize() override
Definition: ctrl.cxx:74
css::uno::Reference< css::frame::XFrame > mxFrame
Definition: notebookbar.hxx:55
Definition: ctrl.hxx:33
This implements Widget Layout-based notebook-like menu bar.
Definition: notebookbar.hxx:26
split from the main class since it needs different ref-counting mana
Definition: notebookbar.cxx:41
virtual void DataChanged(const DataChangedEvent &rDCEvt)
Definition: event.cxx:35