1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
11 #ifndef INCLUDED_SFX2_SIDEBAR_UNOPANEL_HXX
12 #define INCLUDED_SFX2_SIDEBAR_UNOPANEL_HXX
14 #include <com/sun/star/ui/XPanel.hpp>
17 #include <cppuhelper/implbase.hxx>
19 #include <sfx2/sidebar/Panel.hxx>
20 #include <sfx2/sidebar/Deck.hxx>
21 #include <sfx2/sidebar/ResourceManager.hxx>
23 namespace com::sun::star::awt
{ class XWindow
; }
24 namespace com::sun::star::frame
{ class XFrame
; }
25 namespace sfx2
{ namespace sidebar
{ class SidebarController
; } }
30 class SfxUnoPanel final
: public cppu::WeakImplHelper
<css::ui::XPanel
>
35 SfxUnoPanel(const css::uno::Reference
<css::frame::XFrame
>& , const OUString
&, const OUString
&);
37 virtual OUString SAL_CALL
getId() override
;
39 virtual OUString SAL_CALL
getTitle() override
;
40 virtual void SAL_CALL
setTitle( const OUString
& newTitle
) override
;
42 virtual sal_Bool SAL_CALL
isExpanded() override
;
43 virtual void SAL_CALL
expand( const sal_Bool bCollapseOther
) override
;
44 virtual void SAL_CALL
collapse( ) override
;
46 virtual sal_Int32 SAL_CALL
getOrderIndex() override
;
47 virtual void SAL_CALL
setOrderIndex( const sal_Int32 newOrderIndex
) override
;
48 virtual void SAL_CALL
moveFirst() override
;
49 virtual void SAL_CALL
moveLast() override
;
50 virtual void SAL_CALL
moveUp() override
;
51 virtual void SAL_CALL
moveDown() override
;
53 virtual css::uno::Reference
<css::awt::XWindow
> SAL_CALL
getDialog() override
;
57 const css::uno::Reference
<css::frame::XFrame
> xFrame
;
58 sfx2::sidebar::SidebarController
* getSidebarController();
60 const OUString mPanelId
;
61 const OUString mDeckId
;
63 VclPtr
<sfx2::sidebar::Deck
> mpDeck
;
64 VclPtr
<sfx2::sidebar::Panel
> mpPanel
;
66 sal_Int32
GetMaxOrderIndex(sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer aPanels
);
67 sal_Int32
GetMinOrderIndex(sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer aPanels
);
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */