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 _SHADOWOVERLAYOBJECT_HXX 25 #define _SHADOWOVERLAYOBJECT_HXX 26 27 #include <svx/sdr/overlay/overlayobject.hxx> 28 29 class SwView; 30 31 namespace sw { namespace sidebarwindows { 32 33 enum ShadowState 34 { 35 SS_NORMAL, 36 SS_VIEW, 37 SS_EDIT 38 }; 39 40 class ShadowOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition 41 { 42 protected: 43 // geometry creation for OverlayObject 44 virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); 45 46 private: 47 basegfx::B2DPoint maSecondPosition; 48 ShadowState mShadowState; 49 50 ShadowOverlayObject( const basegfx::B2DPoint& rBasePos, 51 const basegfx::B2DPoint& rSecondPosition, 52 Color aBaseColor, 53 ShadowState aState ); 54 virtual ~ShadowOverlayObject(); 55 56 public: 57 void SetShadowState(ShadowState aState); GetShadowState()58 inline ShadowState GetShadowState() {return mShadowState;} 59 GetSecondPosition() const60 inline const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; } 61 void SetSecondPosition( const basegfx::B2DPoint& rNew ); 62 63 void SetPosition( const basegfx::B2DPoint& rPoint1, 64 const basegfx::B2DPoint& rPoint2 ); 65 66 static ShadowOverlayObject* CreateShadowOverlayObject( SwView& rDocView ); 67 static void DestroyShadowOverlayObject( ShadowOverlayObject* pShadow ); 68 }; 69 70 } } // end of namespace sw::sidebarwindows 71 72 #endif 73