bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / inc / fusel.hxx
blobfd59ea6d5ffc66d5eb28db1f6bbf26a0d8c36336
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SD_SOURCE_UI_INC_FUSEL_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_FUSEL_HXX
23 #include "fudraw.hxx"
25 #include <com/sun/star/media/XPlayer.hpp>
27 class SdrHdl;
28 class SdrObject;
30 namespace sd {
32 class FuSelection
33 : public FuDraw
35 public:
36 TYPEINFO_OVERRIDE();
38 static rtl::Reference<FuPoor> Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
39 virtual void DoExecute( SfxRequest& rReq ) SAL_OVERRIDE;
41 // Mouse- & Key-Events
42 virtual bool KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE;
43 virtual bool MouseMove(const MouseEvent& rMEvt) SAL_OVERRIDE;
44 virtual bool MouseButtonUp(const MouseEvent& rMEvt) SAL_OVERRIDE;
45 virtual bool MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE;
47 virtual void Activate() SAL_OVERRIDE;
48 virtual void Deactivate() SAL_OVERRIDE;
50 virtual void SelectionHasChanged() SAL_OVERRIDE;
52 void SetEditMode(sal_uInt16 nMode);
53 sal_uInt16 GetEditMode() { return nEditMode; }
55 bool AnimateObj(SdrObject* pObj, const Point& rPos);
57 /** is called when the current function should be aborted. <p>
58 This is used when a function gets a KEY_ESCAPE but can also
59 be called directly.
61 @returns true if a active function was aborted
63 virtual bool cancel() SAL_OVERRIDE;
65 //let mouse cursor move
66 virtual void ForcePointer(const MouseEvent* pMEvt = NULL) SAL_OVERRIDE;
67 protected:
68 FuSelection (ViewShell* pViewSh,
69 ::sd::Window* pWin,
70 ::sd::View* pView,
71 SdDrawDocument* pDoc,
72 SfxRequest& rReq);
74 virtual ~FuSelection();
76 bool bTempRotation;
77 bool bSelectionChanged;
78 bool bHideAndAnimate;
79 SdrHdl* pHdl;
80 bool bSuppressChangesOfSelection;
81 bool bMirrorSide0;
82 sal_uInt16 nEditMode;
83 ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
85 private:
86 /** This pointer stores a canidate for assigning a style in the water
87 can mode between mouse button down and mouse button up.
89 SdrObject* pWaterCanCandidate;
91 /** Find the object under the given test point without selecting it.
92 @param rTestPoint
93 The coordinates at which to search for a shape.
94 @return
95 The shape at the test point. When there is no shape at this
96 position then NULL is returned.
98 SdrObject* pickObject (const Point& rTestPoint);
99 //Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
100 //and SHIFT+ENTER key to decide the position and draw the new insert point
101 bool bBeginInsertPoint;
102 Point oldPoint;
103 //let mouse cursor move
104 bool bMovedToCenterPoint;
107 } // end of namespace sd
109 #endif // _SD_FUSEL_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */