1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef IDOCUMENTDRAWMODEL_HXX_INCLUDED
29 #define IDOCUMENTDRAWMODEL_HXX_INCLUDED
30 
31 #include <svx/svdtypes.hxx>
32 
33 class SdrModel;
34 class SdrPageView;
35 
36 /** IDocumentDrawModelAccess
37  */
38 class IDocumentDrawModelAccess
39 {
40 public:
41 
42     /** Draw Model and id accessors
43      */
44     virtual const SdrModel* GetDrawModel() const = 0;
45     virtual SdrModel* GetDrawModel() = 0;
46     virtual SdrModel* _MakeDrawModel() = 0;
47     virtual SdrModel* GetOrCreateDrawModel() = 0;
48     virtual SdrLayerID GetHeavenId() const = 0;
49     virtual SdrLayerID GetHellId() const = 0;
50     virtual SdrLayerID GetControlsId() const = 0;
51     virtual SdrLayerID GetInvisibleHeavenId() const = 0;
52     virtual SdrLayerID GetInvisibleHellId() const = 0;
53     virtual SdrLayerID GetInvisibleControlsId() const = 0;
54 
55     /** method to notify drawing page view about the invisible layers
56         OD 26.06.2003 #108784#
57         @author OD
58     */
59     virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView ) = 0;
60 
61     /** method to determine, if a layer ID belongs to the visible ones.
62         OD 25.06.2003 #108784#
63         Note: If given layer ID is unknown, method asserts and returns <false>.
64         @author OD
65 
66         @param _nLayerId
67         input parameter - layer ID, which has to be checked, if it belongs to
68         the visible ones.
69 
70         @return bool, indicating, if given layer ID belongs to the visible ones.
71     */
72     virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const = 0;
73 
74     /** method to determine, if the corresponding visible layer ID for a invisible one.
75 
76         OD 25.06.2003 #108784#
77         Note: If given layer ID is a visible one, method returns given layer ID.
78         Note: If given layer ID is unknown, method returns given layer ID.
79 
80         @author OD
81 
82         @param _nInvisibleLayerId
83         input parameter - invisible layer ID for which the corresponding
84         visible one has to be returned.
85 
86         @return sal_Int8, visible layer ID corresponding to given layer ID
87     */
88     virtual SdrLayerID GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId ) = 0;
89 
90     /** method to determine, if the corresponding invisible layer ID for a visible one.
91 
92         OD 25.06.2003 #108784#
93         Note: If given layer ID is a invisible one, method returns given layer ID.
94         Note: If given layer ID is unknown, method returns given layer ID.
95 
96         @author OD
97 
98         @param _nVisibleLayerId
99         input parameter - visible layer ID for which the corresponding
100         invisible one has to be returned.
101 
102         @return sal_Int8, invisible layer ID corresponding to given layer ID
103     */
104     virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId ) = 0;
105 
106 protected:
107 
108     virtual ~IDocumentDrawModelAccess() {};
109 };
110 
111 #endif
112