1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef IDOCUMENTDRAWMODEL_HXX_INCLUDED
25 #define IDOCUMENTDRAWMODEL_HXX_INCLUDED
26 
27 #include <svx/svdtypes.hxx>
28 
29 class SwDrawModel;
30 class SdrPageView;
31 
32 /** IDocumentDrawModelAccess
33  */
34 class IDocumentDrawModelAccess
35 {
36 public:
37 
38     /** Draw Model and id accessors
39      */
40     virtual const SwDrawModel* GetDrawModel() const = 0;
41     virtual SwDrawModel* GetDrawModel() = 0;
42     virtual SwDrawModel* _MakeDrawModel() = 0;
43     virtual SwDrawModel* GetOrCreateDrawModel() = 0;
44     virtual SdrLayerID GetHeavenId() const = 0;
45     virtual SdrLayerID GetHellId() const = 0;
46     virtual SdrLayerID GetControlsId() const = 0;
47     virtual SdrLayerID GetInvisibleHeavenId() const = 0;
48     virtual SdrLayerID GetInvisibleHellId() const = 0;
49     virtual SdrLayerID GetInvisibleControlsId() const = 0;
50 
51     /** method to notify drawing page view about the invisible layers
52         OD 26.06.2003 #108784#
53         @author OD
54     */
55     virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView ) = 0;
56 
57     /** method to determine, if a layer ID belongs to the visible ones.
58         OD 25.06.2003 #108784#
59         Note: If given layer ID is unknown, method asserts and returns <false>.
60         @author OD
61 
62         @param _nLayerId
63         input parameter - layer ID, which has to be checked, if it belongs to
64         the visible ones.
65 
66         @return bool, indicating, if given layer ID belongs to the visible ones.
67     */
68     virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const = 0;
69 
70     /** method to determine, if the corresponding visible layer ID for a invisible one.
71 
72         OD 25.06.2003 #108784#
73         Note: If given layer ID is a visible one, method returns given layer ID.
74         Note: If given layer ID is unknown, method returns given layer ID.
75 
76         @author OD
77 
78         @param _nInvisibleLayerId
79         input parameter - invisible layer ID for which the corresponding
80         visible one has to be returned.
81 
82         @return sal_Int8, visible layer ID corresponding to given layer ID
83     */
84     virtual SdrLayerID GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId ) = 0;
85 
86     /** method to determine, if the corresponding invisible layer ID for a visible one.
87 
88         OD 25.06.2003 #108784#
89         Note: If given layer ID is a invisible one, method returns given layer ID.
90         Note: If given layer ID is unknown, method returns given layer ID.
91 
92         @author OD
93 
94         @param _nVisibleLayerId
95         input parameter - visible layer ID for which the corresponding
96         invisible one has to be returned.
97 
98         @return sal_Int8, invisible layer ID corresponding to given layer ID
99     */
100     virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId ) = 0;
101 
102 protected:
103 
~IDocumentDrawModelAccess()104     virtual ~IDocumentDrawModelAccess() {};
105 };
106 
107 #endif
108