xref: /aoo4110/main/svx/inc/svx/sdrhittesthelper.hxx (revision b1cdbd2c)
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 _SDRHITTESTHELPER_HXX
25 #define _SDRHITTESTHELPER_HXX
26 
27 #include "svx/svxdllapi.h"
28 #include <tools/string.hxx>
29 #include <tools/gen.hxx>
30 
31 /////////////////////////////////////////////////////////////////////
32 // #i101872# new Object HitTest as View-tooling
33 
34 class SdrObject;
35 class SdrPageView;
36 class SetOfByte;
37 class SdrObjList;
38 namespace sdr { namespace contact {	class ViewObjectContact; }}
39 namespace basegfx { class B2DPoint; }
40 
41 /////////////////////////////////////////////////////////////////////
42 // Wrappers for classic Sdr* Mode/View classes
43 
44 SVX_DLLPUBLIC SdrObject* SdrObjectPrimitiveHit(
45     const SdrObject& rObject,
46     const Point& rPnt,
47     sal_uInt16 nTol,
48     const SdrPageView& rSdrPageView,
49     const SetOfByte* pVisiLayer,
50     bool bTextOnly);
51 
52 SVX_DLLPUBLIC SdrObject* SdrObjListPrimitiveHit(
53     const SdrObjList& rList,
54     const Point& rPnt,
55     sal_uInt16 nTol,
56     const SdrPageView& rSdrPageView,
57     const SetOfByte* pVisiLayer,
58     bool bTextOnly);
59 
60 /////////////////////////////////////////////////////////////////////
61 // the pure HitTest based on a VOC
62 
63 SVX_DLLPUBLIC bool ViewObjectContactPrimitiveHit(
64     const sdr::contact::ViewObjectContact& rVOC,
65 	const basegfx::B2DPoint& rHitPosition,
66     double fLogicHitTolerance,
67     bool bTextOnly);
68 
69 /////////////////////////////////////////////////////////////////////
70 
71 #endif //_SDRHITTESTHELPER_HXX
72 
73 /////////////////////////////////////////////////////////////////////
74 // eof
75