Version 6.1.0.2, tag libreoffice-6.1.0.2
[LibreOffice.git] / sd / source / ui / sidebar / RecentMasterPagesSelector.hxx
blob923e2ab569bd95f91c7cb3961d56da6c0ea86062
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SD_SOURCE_UI_SIDEBAR_RECENTMASTERPAGESSELECTOR_HXX
21 #define INCLUDED_SD_SOURCE_UI_SIDEBAR_RECENTMASTERPAGESSELECTOR_HXX
23 #include "MasterPagesSelector.hxx"
25 namespace sd { namespace sidebar {
27 /** Show the recently used master pages (that are not currently used).
29 class RecentMasterPagesSelector final
30 : public MasterPagesSelector
32 friend class VclPtrInstance<RecentMasterPagesSelector>;
33 public:
34 static VclPtr<vcl::Window> Create (
35 vcl::Window* pParent,
36 ViewShellBase& rViewShellBase,
37 const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
39 private:
40 DECL_LINK(MasterPageListListener, LinkParamNone*, void);
41 virtual void Fill (ItemList& rItemList) override;
43 using sd::sidebar::MasterPagesSelector::Fill;
45 /** Forward this call to the base class but save and restore the
46 currently selected item.
47 Assign the given master page to the list of pages.
48 @param pMasterPage
49 This master page will usually be a member of the list of all
50 available master pages as provided by the MasterPageContainer.
51 @param rPageList
52 The pages to which to assign the master page. These pages may
53 be slides or master pages themselves.
55 virtual void AssignMasterPageToPageList (
56 SdPage* pMasterPage,
57 const std::shared_ptr<std::vector<SdPage*> >& rpPageList) override;
59 virtual void ProcessPopupMenu (Menu& rMenu) override;
61 RecentMasterPagesSelector (
62 vcl::Window* pParent,
63 SdDrawDocument& rDocument,
64 ViewShellBase& rBase,
65 const std::shared_ptr<MasterPageContainer>& rpContainer,
66 const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
67 virtual ~RecentMasterPagesSelector() override;
68 virtual void dispose() override;
70 virtual void LateInit() override;
73 } } // end of namespace sd::sidebar
75 #endif
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */