Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-10 10:23:49

0001 /* PageTransition.cc
0002  * Copyright (C) 2005, Net Integration Technologies, Inc.
0003  * Copyright (C) 2015, Arseniy Lartsev <arseniy@alumni.chalmers.se>
0004  * Copyright (C) 2019, 2021, Albert Astals Cid <aacid@kde.org>
0005  *
0006  * This program is free software; you can redistribute it and/or modify
0007  * it under the terms of the GNU General Public License as published by
0008  * the Free Software Foundation; either version 2, or (at your option)
0009  * any later version.
0010  *
0011  * This program is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014  * GNU General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU General Public License
0017  * along with this program; if not, write to the Free Software
0018  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
0019  */
0020 
0021 #ifndef PAGE_TRANSITION_H
0022 #define PAGE_TRANSITION_H
0023 
0024 #include "Object.h"
0025 
0026 //------------------------------------------------------------------------
0027 // PageTransition
0028 //------------------------------------------------------------------------
0029 
0030 // if changed remember to keep in sync with frontend enums
0031 enum PageTransitionType
0032 {
0033     transitionReplace = 0,
0034     transitionSplit,
0035     transitionBlinds,
0036     transitionBox,
0037     transitionWipe,
0038     transitionDissolve,
0039     transitionGlitter,
0040     transitionFly,
0041     transitionPush,
0042     transitionCover,
0043     transitionUncover,
0044     transitionFade
0045 };
0046 
0047 // if changed remember to keep in sync with frontend enums
0048 enum PageTransitionAlignment
0049 {
0050     transitionHorizontal = 0,
0051     transitionVertical
0052 };
0053 
0054 // if changed remember to keep in sync with frontend enums
0055 enum PageTransitionDirection
0056 {
0057     transitionInward = 0,
0058     transitionOutward
0059 };
0060 
0061 class POPPLER_PRIVATE_EXPORT PageTransition
0062 {
0063 public:
0064     // Construct a Page Transition.
0065     explicit PageTransition(Object *trans);
0066 
0067     // Destructor.
0068     ~PageTransition();
0069 
0070     // Was the Page Transition created successfully?
0071     bool isOk() const { return ok; }
0072 
0073     // Get type
0074     PageTransitionType getType() const { return type; }
0075 
0076     // Get duration
0077     double getDuration() const { return duration; }
0078 
0079     // Get alignment
0080     PageTransitionAlignment getAlignment() const { return alignment; }
0081 
0082     // Get direction
0083     PageTransitionDirection getDirection() const { return direction; }
0084 
0085     // Get angle
0086     int getAngle() const { return angle; }
0087 
0088     // Get scale
0089     double getScale() const { return scale; }
0090 
0091     // Is rectangular?
0092     bool isRectangular() const { return rectangular; }
0093 
0094 private:
0095     PageTransitionType type; // transition style
0096     double duration; // duration of the effect in seconds
0097     PageTransitionAlignment alignment; // dimension of the effect
0098     PageTransitionDirection direction; // direction of motion
0099     int angle; // direction in degrees
0100     double scale; // scale
0101     bool rectangular; // is the area to be flown in rectangular?
0102     bool ok; // set if created successfully
0103 };
0104 
0105 #endif /* PAGE_TRANSITION_H */