1 /* === S Y N F I G ========================================================= */
3 ** \brief Template Header
5 ** $Id: editmode.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_EDITMODE_H
25 #define __SYNFIG_EDITMODE_H
27 /* === H E A D E R S ======================================================= */
29 /* === M A C R O S ========================================================= */
31 /* === T Y P E D E F S ===================================================== */
33 /* === C L A S S E S & S T R U C T S ======================================= */
42 MODE_NORMAL =0, //!< Normal editing mode. Place holder.
44 MODE_ANIMATE =(1<<0), //!< Animated editing mode.
45 MODE_ANIMATE_FUTURE =(1<<1), //!< Respect <i>future</i> keyframes
46 MODE_ANIMATE_PAST =(1<<2), //!< Respect <i>past</i> keyframes
47 MODE_ANIMATE_ALL =(3<<1), //!< Respect <i>all</i> keyframes
49 MODE_UNDEFINED =(~0) //!< Undefined Mode
50 }; // END of enum EditMode
54 operator|(const EditMode& lhs, const EditMode& rhs)
55 { return static_cast<EditMode>(int(lhs)|int(rhs)); }
59 operator-(const EditMode& lhs, const EditMode& rhs)
60 { return static_cast<EditMode>(int(lhs)&~int(rhs)); }
63 operator|=(EditMode& lhs, const EditMode& rhs)
64 { *reinterpret_cast<int*>(&lhs)|=int(rhs); return lhs; }
66 //! Flag Comparison. THIS IS NOT LESS-THAN-OR-EQUAL-TO.
67 /*! This function will return true of all of the flags
68 ** in the \a rhs are set in the \a lhs */
70 operator&(const EditMode& lhs, const EditMode& rhs)
71 { return static_cast<EditMode>(int(lhs)&int(rhs)); }
73 //! Flag Comparison. THIS IS NOT LESS-THAN-OR-EQUAL-TO.
74 /*! This function will return true of all of the flags
75 ** in the \a rhs are set in the \a lhs */
77 operator<=(const EditMode& lhs, const EditMode& rhs)
78 { return lhs&rhs==int(rhs); }
80 }; // END if namespace synfigapp
81 /* === E N D =============================================================== */