xref: /trunk/main/sd/source/ui/inc/Ruler.hxx (revision 67e470da)
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 SD_RULER_HXX
25 #define SD_RULER_HXX
26 
27 
28 #include <svx/ruler.hxx>
29 
30 
31 namespace sd {
32 
33 class DrawViewShell;
34 class RulerCtrlItem;
35 class View;
36 class Window;
37 
38 /*************************************************************************
39 |*
40 |* das Fenster der Diashow leitet Mouse- und Key-Events an die SlideViewShell
41 |*
42 \************************************************************************/
43 
44 class Ruler
45     : public SvxRuler
46 {
47 public:
48 	Ruler (
49         DrawViewShell& rViewSh,
50         ::Window* pParent,
51         ::sd::Window* pWin,
52         sal_uInt16 nRulerFlags,
53         SfxBindings& rBindings,
54         WinBits nWinStyle);
55 	virtual ~Ruler (void);
56 
57 	void SetNullOffset(const Point& rOffset);
58 
IsHorizontal() const59 	sal_Bool IsHorizontal() const { return bHorz; }
60 
61 	using ::Ruler::SetNullOffset;
62 protected:
63 	::sd::View* pSdView;
64 	::sd::Window* pSdWin;
65 	DrawViewShell* pDrViewShell;
66 	RulerCtrlItem* pCtrlItem;
67 	sal_Bool bHorz;
68 
69 	virtual void	MouseButtonDown(const MouseEvent& rMEvt);
70 	virtual void	MouseButtonUp(const MouseEvent& rMEvt);
71 	virtual void	MouseMove(const MouseEvent& rMEvt);
72 	virtual void	Command(const CommandEvent& rCEvt);
73 	virtual void    ExtraDown();
74 };
75 
76 } // end of namespace sd
77 
78 #endif
79