bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / sidebar / AllMasterPagesSelector.hxx
blobb3579159d8e8da71e736557c9666c2936655c5e6
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_ALLMASTERPAGESSELECTOR_HXX
21 #define INCLUDED_SD_SOURCE_UI_SIDEBAR_ALLMASTERPAGESSELECTOR_HXX
23 #include "MasterPagesSelector.hxx"
25 #include <memory>
27 namespace sd { namespace sidebar {
29 /** Show a list of all available master pages so that the user can assign
30 them to the document.
32 class AllMasterPagesSelector
33 : public MasterPagesSelector
35 friend class VclPtrInstance<AllMasterPagesSelector>;
36 public:
37 static VclPtr<vcl::Window> Create (
38 vcl::Window* pParent,
39 ViewShellBase& rViewShellBase,
40 const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
42 /** Scan the set of templates for the ones whose first master pages are
43 shown by this control and store them in the MasterPageContainer.
45 virtual void Fill (ItemList& rItemList) override;
47 protected:
48 virtual void NotifyContainerChangeEvent (const MasterPageContainerChangeEvent& rEvent) override;
50 private:
51 /** The list of master pages displayed by this class.
53 class SortedMasterPageDescriptorList;
54 ::std::unique_ptr<SortedMasterPageDescriptorList> mpSortedMasterPages;
56 AllMasterPagesSelector (
57 vcl::Window* pParent,
58 SdDrawDocument& rDocument,
59 ViewShellBase& rBase,
60 const std::shared_ptr<MasterPageContainer>& rpContainer,
61 const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
62 virtual ~AllMasterPagesSelector() override;
64 void AddItem (MasterPageContainer::Token aToken);
66 /** Add all items in the internal master page list into the given list.
68 void UpdatePageSet (ItemList& rItemList);
70 /** Update the internal list of master pages that are to show in the
71 control.
73 void UpdateMasterPageList();
75 using MasterPagesSelector::Fill;
78 } } // end of namespace sd::sidebar
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */