1 /* PageTransition.cc 2 * Copyright (C) 2005, Net Integration Technologies, Inc. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2, or (at your option) 7 * any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef PAGE_TRANSITION_H 20 #define PAGE_TRANSITION_H 21 22 #ifdef USE_GCC_PRAGMAS 23 #pragma interface 24 #endif 25 26 #include "Object.h" 27 28 //------------------------------------------------------------------------ 29 // PageTransition 30 //------------------------------------------------------------------------ 31 32 // if changed remember to keep in sync with frontend enums 33 enum PageTransitionType { 34 transitionReplace = 0, 35 transitionSplit, 36 transitionBlinds, 37 transitionBox, 38 transitionWipe, 39 transitionDissolve, 40 transitionGlitter, 41 transitionFly, 42 transitionPush, 43 transitionCover, 44 transitionUncover, 45 transitionFade 46 }; 47 48 // if changed remember to keep in sync with frontend enums 49 enum PageTransitionAlignment { 50 transitionHorizontal = 0, 51 transitionVertical 52 }; 53 54 // if changed remember to keep in sync with frontend enums 55 enum PageTransitionDirection { 56 transitionInward = 0, 57 transitionOutward 58 }; 59 60 class PageTransition { 61 public: 62 // Construct a Page Transition. 63 PageTransition (Object *trans); 64 65 // Destructor. 66 ~PageTransition (); 67 68 // Was the Page Transition created successfully? isOk()69 GBool isOk() { return ok; } 70 71 // Get type getType()72 PageTransitionType getType() { return type; } 73 74 // Get duration getDuration()75 int getDuration() { return duration;} 76 77 // Get alignment getAlignment()78 PageTransitionAlignment getAlignment() { return alignment; } 79 80 // Get direction getDirection()81 PageTransitionDirection getDirection() { return direction; } 82 83 // Get angle getAngle()84 int getAngle() { return angle; } 85 86 // Get scale getScale()87 double getScale() { return scale; } 88 89 // Is rectangular? isRectangular()90 GBool isRectangular() { return rectangular; } 91 92 private: 93 94 PageTransitionType type; // transition style 95 int duration; // duration of the effect in seconds 96 PageTransitionAlignment alignment; // dimension of the effect 97 PageTransitionDirection direction; // direction of motion 98 int angle; // direction in degrees 99 double scale; // scale 100 GBool rectangular; // is the area to be flown in rectangular? 101 GBool ok; // set if created successfully 102 }; 103 104 #endif /* PAGE_TRANSITION_H */ 105