Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / include / sfx2 / notebookbar / SfxNotebookBar.hxx
blob1a3babd53d9eabe5f7903ba0108627118b3e2f13
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX
11 #define INCLUDED_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX
13 #include <sfx2/dllapi.h>
14 #include <rtl/ustring.hxx>
16 namespace com::sun::star::frame { class XFrame; }
17 namespace com::sun::star::uno { template <typename > class Reference; }
19 class SfxBindings;
20 class SfxViewFrame;
21 class SystemWindow;
23 namespace sfx2 {
25 /** Helpers for easier access to NotebookBar via the sfx2 infrastructure.
27 class SFX2_DLLPUBLIC SfxNotebookBar
29 public:
30 static void CloseMethod(SfxBindings& rBindings);
31 static void CloseMethod(SystemWindow* pSysWindow);
33 static bool IsActive();
35 /// Function to be called from the sdi's ExecMethod.
36 static void ExecMethod(SfxBindings& rBindings, const OUString& rUIName);
38 /// Function to be called from the sdi's StateMethod.
39 static bool StateMethod(SfxBindings& rBindings, const OUString& rUIFile,
40 bool bReloadNotebookbar = false);
41 static bool StateMethod(SystemWindow* pSysWindow,
42 const css::uno::Reference<css::frame::XFrame>& xFrame,
43 const OUString& rUIFile, bool bReloadNotebookbar = false);
45 /// Method temporarily blocks showing of the NotebookBar
46 static void LockNotebookBar();
47 /// Method restores normal behaviour of the Notebookbar
48 static void UnlockNotebookBar();
50 static void RemoveListeners(SystemWindow const * pSysWindow);
52 /** Show menu bar in all frames of current application */
53 static void ShowMenubar(bool bShow);
54 /** Show menu bar only in current frame */
55 static void ShowMenubar(SfxViewFrame const * pViewFrame, bool bShow);
56 static void ToggleMenubar();
57 static void ReloadNotebookBar(const OUString& sUIPath);
59 private:
60 static bool m_bLock;
61 static bool m_bHide;
64 } // namespace sfx2
66 #endif // INCLUDED_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */