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/.
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
30 : public MasterPagesSelector
32 friend class VclPtrInstance
<RecentMasterPagesSelector
>;
34 static VclPtr
<vcl::Window
> Create (
36 ViewShellBase
& rViewShellBase
,
37 const css::uno::Reference
<css::ui::XSidebar
>& rxSidebar
);
40 DECL_LINK(MasterPageListListener
, void*);
41 virtual void Fill (ItemList
& rItemList
) SAL_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.
49 This master page will usually be a member of the list of all
50 available master pages as provided by the MasterPageContainer.
52 The pages to which to assign the master page. These pages may
53 be slides or master pages themselves.
55 virtual void AssignMasterPageToPageList (
57 const ::boost::shared_ptr
<std::vector
<SdPage
*> >& rpPageList
) SAL_OVERRIDE
;
59 virtual void ProcessPopupMenu (Menu
& rMenu
) SAL_OVERRIDE
;
62 RecentMasterPagesSelector (
64 SdDrawDocument
& rDocument
,
66 const ::boost::shared_ptr
<MasterPageContainer
>& rpContainer
,
67 const css::uno::Reference
<css::ui::XSidebar
>& rxSidebar
);
68 virtual ~RecentMasterPagesSelector();
69 virtual void dispose() SAL_OVERRIDE
;
71 virtual void LateInit() SAL_OVERRIDE
;
74 } } // end of namespace sd::sidebar
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */