1*c45d927aSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c45d927aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c45d927aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c45d927aSAndrew Rist * distributed with this work for additional information 6*c45d927aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c45d927aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c45d927aSAndrew Rist * "License"); you may not use this file except in compliance 9*c45d927aSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*c45d927aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*c45d927aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c45d927aSAndrew Rist * software distributed under the License is distributed on an 15*c45d927aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c45d927aSAndrew Rist * KIND, either express or implied. See the License for the 17*c45d927aSAndrew Rist * specific language governing permissions and limitations 18*c45d927aSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*c45d927aSAndrew Rist *************************************************************/ 21*c45d927aSAndrew Rist 22*c45d927aSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SD_FU_SLIDE_SELECTION_HXX 25cdf0e10cSrcweir #define SD_FU_SLIDE_SELECTION_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "fuslid.hxx" 28cdf0e10cSrcweir #include <tools/list.hxx> 29cdf0e10cSrcweir 30cdf0e10cSrcweir class SdDrawDocument; 31cdf0e10cSrcweir class Sound; 32cdf0e10cSrcweir 33cdf0e10cSrcweir namespace sd { 34cdf0e10cSrcweir 35cdf0e10cSrcweir class SlideView; 36cdf0e10cSrcweir class SlideViewShell; 37cdf0e10cSrcweir class Window; 38cdf0e10cSrcweir 39cdf0e10cSrcweir struct FSS_IsShowingEffectInfo 40cdf0e10cSrcweir { 41cdf0e10cSrcweir sal_Bool bIsShowingEffect; // sal_True while we show a fade effect one the slide view 42cdf0e10cSrcweir sal_Bool bDisposed; // sal_True if the FuSlideSelection was deleted during fade effect 43cdf0e10cSrcweir }; 44cdf0e10cSrcweir 45cdf0e10cSrcweir 46cdf0e10cSrcweir class FuSlideSelection 47cdf0e10cSrcweir : public FuSlide 48cdf0e10cSrcweir { 49cdf0e10cSrcweir public: 50cdf0e10cSrcweir TYPEINFO(); 51cdf0e10cSrcweir 52cdf0e10cSrcweir static FunctionReference Create( SlideViewShell* pViewSh, ::sd::Window* pWin, SlideView* pView, SdDrawDocument* pDoc, SfxRequest& rReq ); 53cdf0e10cSrcweir virtual void DoExecute( SfxRequest& rReq ); 54cdf0e10cSrcweir 55cdf0e10cSrcweir // Mouse- & Key-Events 56cdf0e10cSrcweir virtual sal_Bool KeyInput(const KeyEvent& rKEvt); 57cdf0e10cSrcweir virtual sal_Bool MouseMove(const MouseEvent& rMEvt); 58cdf0e10cSrcweir virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); 59cdf0e10cSrcweir virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); 60cdf0e10cSrcweir virtual void Paint(const Rectangle& rRect, ::sd::Window* pWin); 61cdf0e10cSrcweir 62cdf0e10cSrcweir virtual void Activate(); // Function aktivieren 63cdf0e10cSrcweir virtual void Deactivate(); // Function deaktivieren 64cdf0e10cSrcweir 65cdf0e10cSrcweir virtual void ScrollStart(); 66cdf0e10cSrcweir virtual void ScrollEnd(); 67cdf0e10cSrcweir IsShowingEffect() const68cdf0e10cSrcweir sal_Bool IsShowingEffect() const { return pIsShowingEffectInfo && pIsShowingEffectInfo->bIsShowingEffect; } 69cdf0e10cSrcweir 70cdf0e10cSrcweir /** is called when the currenct function should be aborted. <p> 71cdf0e10cSrcweir This is used when a function gets a KEY_ESCAPE but can also 72cdf0e10cSrcweir be called directly. 73cdf0e10cSrcweir 74cdf0e10cSrcweir @returns true if a active function was aborted 75cdf0e10cSrcweir */ 76cdf0e10cSrcweir virtual bool cancel(); 77cdf0e10cSrcweir 78cdf0e10cSrcweir protected: 79cdf0e10cSrcweir FuSlideSelection ( 80cdf0e10cSrcweir SlideViewShell* pViewSh, 81cdf0e10cSrcweir ::sd::Window* pWin, 82cdf0e10cSrcweir SlideView* pView, 83cdf0e10cSrcweir SdDrawDocument* pDoc, 84cdf0e10cSrcweir SfxRequest& rReq); 85cdf0e10cSrcweir virtual ~FuSlideSelection (void); 86cdf0e10cSrcweir 87cdf0e10cSrcweir private: 88cdf0e10cSrcweir sal_Bool bSubstShown; 89cdf0e10cSrcweir sal_Bool bPageHit; 90cdf0e10cSrcweir List aSubstList; // Liste mit Ertsatzdarstellungen 91cdf0e10cSrcweir Point aDragPos; // hier wird die Seite angefasst 92cdf0e10cSrcweir sal_Bool bDragSelection; 93cdf0e10cSrcweir Point aDragSelRectAnchor; // fester Punkt des Selektionsrechtecks 94cdf0e10cSrcweir Rectangle aDragSelRect; 95cdf0e10cSrcweir Point aPosOfInsertMarker; 96cdf0e10cSrcweir FSS_IsShowingEffectInfo* pIsShowingEffectInfo; 97cdf0e10cSrcweir 98cdf0e10cSrcweir void DrawInsertMarker(sal_Bool bShow); 99cdf0e10cSrcweir Point CalcPosOfInsertMarker(const Point& rPoint); 100cdf0e10cSrcweir 101cdf0e10cSrcweir sal_uInt16 GetTargetPage(const Point& rPoint) const; 102cdf0e10cSrcweir 103cdf0e10cSrcweir void CreateSubst(); 104cdf0e10cSrcweir void DeleteSubst(); 105cdf0e10cSrcweir void DrawSubst() const; 106cdf0e10cSrcweir void ChangeSubstPos(const Point& rVector); 107cdf0e10cSrcweir void DrawDragSelectionRect() const; 108cdf0e10cSrcweir void ShowEffect(sal_uInt16 nPageNo); 109cdf0e10cSrcweir 110cdf0e10cSrcweir DECL_LINK( DragSlideHdl, Timer* ); 111cdf0e10cSrcweir }; 112cdf0e10cSrcweir 113cdf0e10cSrcweir } // end of namespace sd 114cdf0e10cSrcweir 115cdf0e10cSrcweir #endif 116cdf0e10cSrcweir 117