1c45d927aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3c45d927aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4c45d927aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5c45d927aSAndrew Rist  * distributed with this work for additional information
6c45d927aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7c45d927aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8c45d927aSAndrew Rist  * "License"); you may not use this file except in compliance
9c45d927aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10c45d927aSAndrew Rist  *
11c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12c45d927aSAndrew Rist  *
13c45d927aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14c45d927aSAndrew Rist  * software distributed under the License is distributed on an
15c45d927aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16c45d927aSAndrew Rist  * KIND, either express or implied.  See the License for the
17c45d927aSAndrew Rist  * specific language governing permissions and limitations
18c45d927aSAndrew Rist  * under the License.
19c45d927aSAndrew Rist  *
20c45d927aSAndrew Rist  *************************************************************/
21c45d927aSAndrew Rist 
22c45d927aSAndrew Rist 
23cdf0e10cSrcweir 
247a32b0c8SAndre Fischer #ifndef SD_SIDEBAR_PANELS_RECENT_MASTER_PAGES_SELECTOR_HXX
257a32b0c8SAndre Fischer #define SD_SIDEBAR_PANELS_RECENT_MASTER_PAGES_SELECTOR_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "MasterPagesSelector.hxx"
28cdf0e10cSrcweir 
297a32b0c8SAndre Fischer namespace sd { namespace sidebar {
30cdf0e10cSrcweir 
31cdf0e10cSrcweir 
32cdf0e10cSrcweir /** Show the recently used master pages (that are not currently used).
33cdf0e10cSrcweir */
34cdf0e10cSrcweir class RecentMasterPagesSelector
35cdf0e10cSrcweir     : public MasterPagesSelector
36cdf0e10cSrcweir {
37cdf0e10cSrcweir public:
387a32b0c8SAndre Fischer     static MasterPagesSelector* Create (
397a32b0c8SAndre Fischer         ::Window* pParent,
407a32b0c8SAndre Fischer         ViewShellBase& rViewShellBase,
41*02c50d82SAndre Fischer         const cssu::Reference<css::ui::XSidebar>& rxSidebar);
42cdf0e10cSrcweir 
43cdf0e10cSrcweir protected:
44cdf0e10cSrcweir     DECL_LINK(MasterPageListListener, void*);
45cdf0e10cSrcweir     virtual void Fill (ItemList& rItemList);
46cdf0e10cSrcweir 
477a32b0c8SAndre Fischer 	using sd::sidebar::MasterPagesSelector::Fill;
48cdf0e10cSrcweir 
49cdf0e10cSrcweir     /** Forward this call to the base class but save and restore the
50cdf0e10cSrcweir         currently selected item.
51cdf0e10cSrcweir         Assign the given master page to the list of pages.
52cdf0e10cSrcweir         @param pMasterPage
53cdf0e10cSrcweir             This master page will usually be a member of the list of all
54cdf0e10cSrcweir             available master pages as provided by the MasterPageContainer.
55cdf0e10cSrcweir         @param rPageList
56cdf0e10cSrcweir             The pages to which to assign the master page.  These pages may
57cdf0e10cSrcweir             be slides or master pages themselves.
58cdf0e10cSrcweir     */
59cdf0e10cSrcweir     virtual void AssignMasterPageToPageList (
60cdf0e10cSrcweir         SdPage* pMasterPage,
61cdf0e10cSrcweir         const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList);
627a32b0c8SAndre Fischer 
63*02c50d82SAndre Fischer     virtual void ProcessPopupMenu (Menu& rMenu);
64*02c50d82SAndre Fischer 
657a32b0c8SAndre Fischer private:
667a32b0c8SAndre Fischer     RecentMasterPagesSelector (
677a32b0c8SAndre Fischer         ::Window* pParent,
687a32b0c8SAndre Fischer         SdDrawDocument& rDocument,
697a32b0c8SAndre Fischer         ViewShellBase& rBase,
70*02c50d82SAndre Fischer         const ::boost::shared_ptr<MasterPageContainer>& rpContainer,
71*02c50d82SAndre Fischer         const cssu::Reference<css::ui::XSidebar>& rxSidebar);
727a32b0c8SAndre Fischer     virtual ~RecentMasterPagesSelector (void);
737a32b0c8SAndre Fischer 
747a32b0c8SAndre Fischer     virtual void LateInit (void);
75cdf0e10cSrcweir };
76cdf0e10cSrcweir 
777a32b0c8SAndre Fischer } } // end of namespace sd::sidebar
78cdf0e10cSrcweir 
79cdf0e10cSrcweir #endif
80