xref: /aoo42x/main/sd/source/ui/inc/fuconbez.hxx (revision cdf0e10c)
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 SD_FU_CONSTRUCT_BEZIER_HXX
29 #define SD_FU_CONSTRUCT_BEZIER_HXX
30 
31 #include <com/sun/star/uno/Any.hxx>
32 #include "fuconstr.hxx"
33 
34 class SdDrawDocument;
35 
36 namespace sd {
37 
38 class DrawView;
39 class DrawViewShell;
40 class Window;
41 
42 
43 class FuConstructBezierPolygon
44     : public FuConstruct
45 {
46 public:
47 	TYPEINFO();
48 
49 	static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent );
50 	virtual void DoExecute( SfxRequest& rReq );
51 
52     // Mouse- & Key-Events
53 	virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
54 	virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
55 	virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
56 	virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
57 
58 	virtual void Activate();		   // Function aktivieren
59 	virtual void Deactivate();		   // Function deaktivieren
60 
61 	virtual void SelectionHasChanged();
62 
63 	void    SetEditMode(sal_uInt16 nMode);
64 	sal_uInt16  GetEditMode() { return nEditMode; }
65 
66 	// #97016#
67 	virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle);
68 
69 protected:
70 	FuConstructBezierPolygon (
71         ViewShell* pViewSh,
72         ::sd::Window* pWin,
73         ::sd::View* pView,
74         SdDrawDocument* pDoc,
75         SfxRequest& rReq);
76 
77 	sal_uInt16      nEditMode;
78 
79 	::com::sun::star::uno::Any maTargets;	// used for creating a path for custom animations
80 };
81 
82 } // end of namespace sd
83 
84 #endif
85 
86