bump product version to 4.1.6.2
[LibreOffice.git] / sd / source / ui / inc / fusel.hxx
blobd26dedb0fe9d373742c4b88152cf74c4dcb72765
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 SD_FU_SELECTION_HXX
21 #define SD_FU_SELECTION_HXX
23 #include "fudraw.hxx"
25 #include <com/sun/star/media/XPlayer.hpp>
27 class SdrHdl;
28 class SdrObject;
31 namespace sd {
33 class FuSelection
34 : public FuDraw
36 public:
37 TYPEINFO();
39 static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
40 virtual void DoExecute( SfxRequest& rReq );
42 // Mouse- & Key-Events
43 virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
44 virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
45 virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
46 virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
48 virtual void Activate();
49 virtual void Deactivate();
51 virtual void SelectionHasChanged();
53 void SetEditMode(sal_uInt16 nMode);
54 sal_uInt16 GetEditMode() { return nEditMode; }
56 sal_Bool AnimateObj(SdrObject* pObj, const Point& rPos);
58 /** is called when the current function should be aborted. <p>
59 This is used when a function gets a KEY_ESCAPE but can also
60 be called directly.
62 @returns true if a active function was aborted
64 virtual bool cancel();
66 protected:
67 FuSelection (ViewShell* pViewSh,
68 ::sd::Window* pWin,
69 ::sd::View* pView,
70 SdDrawDocument* pDoc,
71 SfxRequest& rReq);
73 virtual ~FuSelection();
75 sal_Bool bTempRotation;
76 sal_Bool bSelectionChanged;
77 sal_Bool bHideAndAnimate;
78 SdrHdl* pHdl;
79 sal_Bool bSuppressChangesOfSelection;
80 sal_Bool bMirrorSide0;
81 sal_uInt16 nEditMode;
82 ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
84 private:
85 /** This pointer stores a canidate for assigning a style in the water
86 can mode between mouse button down and mouse button up.
88 SdrObject* pWaterCanCandidate;
90 /** Find the object under the given test point without selecting it.
91 @param rTestPoint
92 The coordinates at which to search for a shape.
93 @return
94 The shape at the test point. When there is no shape at this
95 position then NULL is returned.
97 SdrObject* pickObject (const Point& rTestPoint);
100 } // end of namespace sd
102 #endif // _SD_FUSEL_HXX
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */