LibreOffice Module sfx2 (master) 1
UnoPanel.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
11#pragma once
12
13#include <com/sun/star/ui/XPanel.hpp>
14
15
17
19#include <sfx2/sidebar/Deck.hxx>
21
22namespace com::sun::star::awt { class XWindow; }
23namespace com::sun::star::frame { class XFrame; }
24namespace sfx2::sidebar { class SidebarController; }
25
26
29class SfxUnoPanel final : public cppu::WeakImplHelper<css::ui::XPanel>
30{
31
32public:
33
34 SfxUnoPanel(css::uno::Reference<css::frame::XFrame>, OUString, OUString );
35
36 virtual OUString SAL_CALL getId() override;
37
38 virtual OUString SAL_CALL getTitle() override;
39 virtual void SAL_CALL setTitle( const OUString& newTitle ) override;
40
41 virtual sal_Bool SAL_CALL isExpanded() override;
42 virtual void SAL_CALL expand( const sal_Bool bCollapseOther ) override;
43 virtual void SAL_CALL collapse( ) override;
44
45 virtual sal_Int32 SAL_CALL getOrderIndex() override;
46 virtual void SAL_CALL setOrderIndex( const sal_Int32 newOrderIndex ) override;
47 virtual void SAL_CALL moveFirst() override;
48 virtual void SAL_CALL moveLast() override;
49 virtual void SAL_CALL moveUp() override;
50 virtual void SAL_CALL moveDown() override;
51
52 virtual css::uno::Reference<css::awt::XWindow> SAL_CALL getDialog() override;
53
54private:
55
56 const css::uno::Reference<css::frame::XFrame> xFrame;
58
59 const OUString mPanelId;
60 const OUString mDeckId;
61
63 std::weak_ptr<sfx2::sidebar::Panel> mxPanel;
64
67};
68
69/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
get the Panel
Definition: UnoPanel.hxx:30
VclPtr< sfx2::sidebar::Deck > mpDeck
Definition: UnoPanel.hxx:62
virtual void SAL_CALL collapse() override
Definition: UnoPanel.cxx:114
virtual sal_Int32 SAL_CALL getOrderIndex() override
Definition: UnoPanel.cxx:133
virtual sal_Bool SAL_CALL isExpanded() override
Definition: UnoPanel.cxx:81
virtual void SAL_CALL expand(const sal_Bool bCollapseOther) override
Definition: UnoPanel.cxx:90
sfx2::sidebar::SidebarController * getSidebarController()
Definition: UnoPanel.cxx:40
virtual void SAL_CALL moveDown() override
Definition: UnoPanel.cxx:234
virtual void SAL_CALL setOrderIndex(const sal_Int32 newOrderIndex) override
Definition: UnoPanel.cxx:142
virtual OUString SAL_CALL getId() override
Definition: UnoPanel.cxx:45
const OUString mDeckId
Definition: UnoPanel.hxx:60
const OUString mPanelId
Definition: UnoPanel.hxx:59
SfxUnoPanel(css::uno::Reference< css::frame::XFrame >, OUString, OUString)
Definition: UnoPanel.cxx:28
std::weak_ptr< sfx2::sidebar::Panel > mxPanel
Definition: UnoPanel.hxx:63
virtual void SAL_CALL moveUp() override
Definition: UnoPanel.cxx:203
virtual void SAL_CALL moveFirst() override
Definition: UnoPanel.cxx:157
const css::uno::Reference< css::frame::XFrame > xFrame
Definition: UnoPanel.hxx:56
virtual OUString SAL_CALL getTitle() override
Definition: UnoPanel.cxx:52
sal_Int32 GetMaxOrderIndex(const sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer &rPanels)
Definition: UnoPanel.cxx:280
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getDialog() override
Definition: UnoPanel.cxx:125
virtual void SAL_CALL moveLast() override
Definition: UnoPanel.cxx:180
virtual void SAL_CALL setTitle(const OUString &newTitle) override
Definition: UnoPanel.cxx:64
sal_Int32 GetMinOrderIndex(const sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer &rPanels)
Definition: UnoPanel.cxx:265
std::vector< PanelContextDescriptor > PanelContextDescriptorContainer
unsigned char sal_Bool