LibreOffice Module sd (master) 1
CurrentMasterPagesSelector.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <svl/lstner.hxx>
23
25
26namespace sd::tools { class EventMultiplexerEvent; }
27
28namespace sd::sidebar {
29
33 : public MasterPagesSelector,
34 public SfxListener
35{
37public:
38 static std::unique_ptr<PanelLayout> Create (
39 weld::Widget* pParent,
40 ViewShellBase& rViewShellBase,
41 const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
42
44 weld::Widget* pParent,
45 SdDrawDocument& rDocument,
46 ViewShellBase& rBase,
47 const std::shared_ptr<MasterPageContainer>& rpContainer,
48 const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
49 virtual ~CurrentMasterPagesSelector() override;
50
55 void UpdateSelection();
56
59 virtual void Fill (ItemList& rItemList) override;
60
62
63protected:
64 virtual OUString GetContextMenuUIFile() const override;
65
66 virtual void ProcessPopupMenu(weld::Menu& rMenu) override;
67 virtual void ExecuteCommand(const OUString &rIdent) override;
68
69private:
70 virtual void LateInit() override;
71
72 DECL_LINK(EventMultiplexerListener,sd::tools::EventMultiplexerEvent&, void);
73};
74
75} // end of namespace sd::sidebar
76
77/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
Show the master pages currently used by a SdDrawDocument.
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, ViewShellBase &rViewShellBase, const css::uno::Reference< css::ui::XSidebar > &rxSidebar)
virtual OUString GetContextMenuUIFile() const override
Give derived classes the opportunity to provide their own context menu.
virtual void ProcessPopupMenu(weld::Menu &rMenu) override
CurrentMasterPagesSelector(weld::Widget *pParent, SdDrawDocument &rDocument, ViewShellBase &rBase, const std::shared_ptr< MasterPageContainer > &rpContainer, const css::uno::Reference< css::ui::XSidebar > &rxSidebar)
virtual void ExecuteCommand(const OUString &rIdent) override
DECL_LINK(EventMultiplexerListener, sd::tools::EventMultiplexerEvent &, void)
void UpdateSelection()
Set the selection so that the master page is selected that is used by the currently selected page of ...
Base class of a menu that lets the user select from a list of templates or designs that are loaded fr...
::std::vector< MasterPageContainer::Token > ItemList