diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/notebookbar/NotebookbarContextControl.hxx | 1 | ||||
-rw-r--r-- | include/sfx2/notebookbar/NotebookbarTabControl.hxx | 46 | ||||
-rw-r--r-- | include/sfx2/notebookbar/SfxNotebookBar.hxx | 2 | ||||
-rw-r--r-- | include/vcl/notebookbar.hxx | 2 | ||||
-rw-r--r-- | include/vcl/tabctrl.hxx | 12 |
5 files changed, 55 insertions, 8 deletions
diff --git a/include/sfx2/notebookbar/NotebookbarContextControl.hxx b/include/sfx2/notebookbar/NotebookbarContextControl.hxx index 348b52101df1..172b25756d8f 100644 --- a/include/sfx2/notebookbar/NotebookbarContextControl.hxx +++ b/include/sfx2/notebookbar/NotebookbarContextControl.hxx @@ -19,7 +19,6 @@ class NotebookbarContextControl public: virtual ~NotebookbarContextControl() {} virtual void SetContext( vcl::EnumContext::Context eContext ) = 0; - virtual void SetIconClickHdl( Link<NotebookBar*, void> aHdl ) = 0; }; #endif // INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARCONTEXTCONTROL_HXX diff --git a/include/sfx2/notebookbar/NotebookbarTabControl.hxx b/include/sfx2/notebookbar/NotebookbarTabControl.hxx new file mode 100644 index 000000000000..062fe9631f48 --- /dev/null +++ b/include/sfx2/notebookbar/NotebookbarTabControl.hxx @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARTABCONTROL_HXX +#define INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARTABCONTROL_HXX + +#include <vcl/toolbox.hxx> +#include <sfx2/dllapi.h> +#include <com/sun/star/frame/XLayoutManager.hpp> +#include <vcl/tabctrl.hxx> + +class ChangedUIEventListener; + +class SFX2_DLLPUBLIC NotebookbarTabControl : public NotebookbarTabControlBase +{ +friend class ChangedUIEventListener; + +public: + NotebookbarTabControl( Window* pParent ); + + virtual void StateChanged(StateChangedType nStateChange) override; + +private: + static void FillShortcutsToolBox(css::uno::Reference<css::uno::XComponentContext>& xContext, + const css::uno::Reference<css::frame::XFrame>& xFrame, + const OUString& aModuleName, + ToolBox* pShortcuts + ); + DECL_STATIC_LINK(NotebookbarTabControl, OpenNotebookbarPopupMenu, NotebookBar*, void); + + ChangedUIEventListener* m_pListener; + +protected: + bool m_bInitialized; + bool m_bInvalidate; +}; + +#endif // INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARTABCONTROL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx b/include/sfx2/notebookbar/SfxNotebookBar.hxx index 8792eecf3a4f..e87e7d928c45 100644 --- a/include/sfx2/notebookbar/SfxNotebookBar.hxx +++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx @@ -50,8 +50,6 @@ public: private: static bool m_bLock; static bool m_bHide; - - DECL_STATIC_LINK(SfxNotebookBar, OpenNotebookbarPopupMenu, NotebookBar*, void); }; } // namespace sfx2 diff --git a/include/vcl/notebookbar.hxx b/include/vcl/notebookbar.hxx index 9a41152ab505..f16b3ed38976 100644 --- a/include/vcl/notebookbar.hxx +++ b/include/vcl/notebookbar.hxx @@ -32,8 +32,6 @@ public: virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) SAL_OVERRIDE; virtual void Resize() override; - void SetIconClickHdl(Link<NotebookBar*, void> aHdl); - void SetSystemWindow(SystemWindow* pSystemWindow); const css::uno::Reference<css::ui::XContextChangeEventListener>& getContextChangeEventListener() const { return m_pEventListener; } diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx index fc7d1a8a9064..bdc1d3289a58 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -22,6 +22,7 @@ #include <vcl/dllapi.h> #include <vcl/ctrl.hxx> +#include <vcl/toolbox.hxx> #include <vcl/EnumContext.hxx> #include <sfx2/notebookbar/NotebookbarContextControl.hxx> @@ -190,14 +191,18 @@ public: class NotebookBar; -class VCL_DLLPUBLIC NotebookbarTabControl : public TabControl, +class VCL_DLLPUBLIC NotebookbarTabControlBase : public TabControl, public NotebookbarContextControl { public: - NotebookbarTabControl( vcl::Window* pParent ); + NotebookbarTabControlBase( vcl::Window* pParent ); + ~NotebookbarTabControlBase() override; + void dispose() override; void SetContext( vcl::EnumContext::Context eContext ) override; - void SetIconClickHdl( Link<NotebookBar*, void> aHdl ) override; + void SetIconClickHdl( Link<NotebookBar*, void> aHdl ); + void SetToolBox( ToolBox* pToolBox ); + ToolBox* GetToolBox() { return m_pShortcuts; } virtual sal_uInt16 GetPageId( const Point& rPos ) const override; virtual void SelectTabPage( sal_uInt16 nPageId ) override; @@ -215,6 +220,7 @@ private: vcl::EnumContext::Context eLastContext; Link<NotebookBar*,void> m_aIconClickHdl; static sal_uInt16 m_nHeaderHeight; + VclPtr<ToolBox> m_pShortcuts; }; #endif // INCLUDED_VCL_TABCTRL_HXX |