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 <vector>
18 
19 namespace com { namespace sun { namespace star { namespace ui { class XContextChangeEventListener; } } } }
20 
22 class SystemWindow;
23 
26 {
28 public:
29  NotebookBar(Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
30  const css::uno::Reference<css::frame::XFrame>& rFrame,
31  const NotebookBarAddonsItem& aNotebookBarAddonsItem);
32  virtual ~NotebookBar() override;
33  virtual void dispose() override;
34 
35  virtual bool PreNotify( NotifyEvent& rNEvt ) override;
36  virtual Size GetOptimalSize() const override;
37  virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override;
38  virtual void Resize() override;
39 
40  void SetSystemWindow(SystemWindow* pSystemWindow);
41 
42  const css::uno::Reference<css::ui::XContextChangeEventListener>& getContextChangeEventListener() const { return m_pEventListener; }
43 
44  void StateChanged(const StateChangedType nStateChange ) override;
45 
46  void DataChanged(const DataChangedEvent& rDCEvt) override;
47 
48  void ControlListener(bool bListen);
49 
50 private:
52  css::uno::Reference<css::ui::XContextChangeEventListener> m_pEventListener;
53  std::vector<NotebookbarContextControl*> m_pContextContainers;
54  css::uno::Reference<css::frame::XFrame> mxFrame;
55 
58 
59  void UpdateBackground();
60 
61  void UpdateDefaultSettings();
62  void UpdatePersonaSettings();
63 };
64 
65 #endif // INCLUDED_VCL_NOTEBOOKBAR_HXX
66 
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AllSettings PersonaSettings
Definition: notebookbar.hxx:57
std::vector< NotebookbarContextControl * > m_pContextContainers
Definition: notebookbar.hxx:53
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
virtual void StateChanged(StateChangedType nStateChange) override
Definition: ctrl.cxx:260
PosSizeFlags
Definition: window.hxx:141
const css::uno::Reference< css::ui::XContextChangeEventListener > & getContextChangeEventListener() const
Definition: notebookbar.hxx:42
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:2686
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:56
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:54
Definition: ctrl.hxx:33
This implements Widget Layout-based notebook-like menu bar.
Definition: notebookbar.hxx:25
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