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_SLIDESORTER_VISUAL_STATE_HXX 29 #define SD_SLIDESORTER_VISUAL_STATE_HXX 30 31 #include <sal/types.h> 32 #include <tools/gen.hxx> 33 #include <boost/function.hpp> 34 35 namespace sd { namespace slidesorter { namespace model { 36 37 class PageDescriptor; 38 39 /** This class gives access to values related to the visualization of page 40 objects. This includes animation state when blending from one state to 41 another. 42 */ 43 class VisualState 44 { 45 public: 46 enum State { 47 VS_Selected, 48 VS_Focused, 49 VS_Current, 50 VS_Excluded, 51 VS_None }; 52 53 VisualState (const sal_Int32 nPageId); 54 ~VisualState (void); 55 56 State GetCurrentVisualState (void) const; 57 State GetOldVisualState (void) const; 58 void SetVisualState (const State eState); 59 double GetVisualStateBlend (void) const; 60 void SetVisualStateBlend (const double nBlend); 61 62 void UpdateVisualState (const PageDescriptor& rDescriptor); 63 64 void SetMouseOverState (const bool bIsMouseOver); 65 66 sal_Int32 GetStateAnimationId (void) const; 67 void SetStateAnimationId (const sal_Int32 nAnimationId); 68 69 Point GetLocationOffset (void) const; 70 bool SetLocationOffset (const Point& rPoint); 71 sal_Int32 GetLocationAnimationId (void) const; 72 void SetLocationAnimationId (const sal_Int32 nAnimationId); 73 74 double GetButtonAlpha (void) const; 75 void SetButtonAlpha (const double nAlpha); 76 double GetButtonBarAlpha (void) const; 77 void SetButtonBarAlpha (const double nAlpha); 78 sal_Int32 GetButtonAlphaAnimationId (void) const; 79 void SetButtonAlphaAnimationId (const sal_Int32 nAnimationId); 80 81 sal_Int32 mnPageId; // For debugging 82 83 private: 84 State meCurrentVisualState; 85 State meOldVisualState; 86 double mnVisualStateBlend; 87 sal_Int32 mnStateAnimationId; 88 bool mbOldMouseOverState; 89 bool mbCurrentMouseOverState; 90 91 Point maLocationOffset; 92 sal_Int32 mnLocationAnimationId; 93 94 double mnButtonAlpha; 95 double mnButtonBarAlpha; 96 sal_Int32 mnButtonAlphaAnimationId; 97 }; 98 99 } } } // end of namespace ::sd::slidesorter::model 100 101 #endif 102