Update ooo320-m1
[ooovba.git] / sd / source / ui / slidesorter / inc / controller / SlsPageObjectFactory.hxx
blob579ae1fa4e693730158d87436578390d7b9e7ede
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SlsPageObjectFactory.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SD_SLIDESORTER_PAGE_OBJECT_FACTORY_HEADER
32 #define SD_SLIDESORTER_PAGE_OBJECT_FACTORY_HEADER
34 #include <boost/shared_ptr.hpp>
35 #include "model/SlsSharedPageDescriptor.hxx"
37 class SdPage;
39 namespace sdr { namespace contact {
40 class ObjectContact;
41 class ViewContact;
42 class ViewObjectContact;
43 } }
45 namespace sd { namespace slidesorter { namespace view {
46 class PageObject;
47 } } }
49 namespace sd { namespace slidesorter { namespace cache {
50 class PageCache;
51 } } }
54 namespace sd { namespace slidesorter { namespace controller {
56 class Properties;
58 /** This class is a factory for the creation of objects that represent page
59 objects (shapes). This includes the contact objects of the drawing
60 layer.
62 <p>The factory methods are called by the model::PageDescriptor and the
63 standard implementations of the contact objects.</p>
65 <p>The factory forwars the preview cache and Properties object to page
66 objects and contact objects.</p>
68 class PageObjectFactory
70 public:
71 /** Create a new PageObjectFactory object that has references to the
72 given cache and properties.
74 PageObjectFactory (
75 const ::boost::shared_ptr<cache::PageCache>& rpCache,
76 const ::boost::shared_ptr<controller::Properties>& rpProperties);
77 PageObjectFactory (const ::boost::shared_ptr<cache::PageCache>& rpCache);
78 virtual ~PageObjectFactory (void);
80 virtual view::PageObject* CreatePageObject (
81 SdPage* pPage,
82 const model::SharedPageDescriptor& rpDescriptor) const;
84 virtual ::sdr::contact::ViewContact* CreateViewContact (
85 view::PageObject* pPageObject,
86 const model::SharedPageDescriptor& rpDescriptor) const;
88 virtual ::sdr::contact::ViewObjectContact* CreateViewObjectContact (
89 ::sdr::contact::ObjectContact& rObjectContact,
90 ::sdr::contact::ViewContact& rViewContact) const;
92 private:
93 ::boost::shared_ptr<cache::PageCache> mpPageCache;
94 ::boost::shared_ptr<controller::Properties> mpProperties;
97 } } } // end of namespace ::sd::slidesorter::controller
99 #endif