LibreOffice Module sfx2 (master) 1
SfxNotebookBar.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_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX
11#define INCLUDED_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX
12
13#include <sfx2/dllapi.h>
14#include <rtl/ustring.hxx>
16#include <vcl/EnumContext.hxx>
17
18#include <map>
19#include <memory>
20#include <string_view>
21
23{
24class XFrame;
25}
26namespace com::sun::star::uno
27{
28template <typename> class Reference;
29}
30
31class SfxBindings;
32class SfxViewFrame;
33class SfxViewShell;
34class SystemWindow;
36
37namespace sfx2
38{
42{
43public:
44 static void CloseMethod(SfxBindings& rBindings);
45 static void CloseMethod(SystemWindow* pSysWindow);
46
47 static bool IsActive(bool bConsiderSingleToolbar = false);
48
50 static void ExecMethod(SfxBindings& rBindings, const OUString& rUIName);
51
53 static bool StateMethod(SfxBindings& rBindings, std::u16string_view rUIFile,
54 bool bReloadNotebookbar = false);
55 static bool StateMethod(SystemWindow* pSysWindow,
56 const css::uno::Reference<css::frame::XFrame>& xFrame,
57 std::u16string_view rUIFile, bool bReloadNotebookbar = false);
58
60 static void LockNotebookBar();
62 static void UnlockNotebookBar();
63
64 static void RemoveListeners(SystemWindow const* pSysWindow);
65
67 static void ShowMenubar(bool bShow);
69 static void ShowMenubar(SfxViewFrame const* pViewFrame, bool bShow);
70 static void ToggleMenubar();
71 static void ReloadNotebookBar(std::u16string_view sUIPath);
72
73private:
74 static bool m_bLock;
75 static bool m_bHide;
76
77 static std::map<const SfxViewShell*, std::shared_ptr<WeldedTabbedNotebookbar>>
79
81};
82
83} // namespace sfx2
84
85#endif // INCLUDED_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX
86
87/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
One SfxViewShell more or less represents one edit window for a document, there can be multiple ones f...
Definition: viewsh.hxx:165
Helpers for easier access to NotebookBar via the sfx2 infrastructure.
DECL_DLLPRIVATE_STATIC_LINK(SfxNotebookBar, VclDisposeHdl, const SfxViewShell *, void)
static bool StateMethod(SystemWindow *pSysWindow, const css::uno::Reference< css::frame::XFrame > &xFrame, std::u16string_view rUIFile, bool bReloadNotebookbar=false)
static std::map< const SfxViewShell *, std::shared_ptr< WeldedTabbedNotebookbar > > m_pNotebookBarWeldedWrapper
#define SFX2_DLLPUBLIC
Definition: dllapi.h:29
Reference