00001 //**************************************************************************/ 00002 // Copyright (c) 1998-2006 Autodesk, Inc. 00003 // All rights reserved. 00004 // 00005 // These coded instructions, statements, and computer programs contain 00006 // unpublished proprietary information written by Autodesk, Inc., and are 00007 // protected by Federal copyright law. They may not be disclosed to third 00008 // parties or copied or duplicated in any form, in whole or in part, without 00009 // the prior written consent of Autodesk, Inc. 00010 //**************************************************************************/ 00011 #pragma once 00012 00013 #include "CoreExport.h" 00014 // for base classes 00015 #include "Noncopyable.h" 00016 #include "baseinterface.h" 00017 // for members 00018 #include "autoptr.h" 00019 #include "strclass.h" 00020 #include "AnimPropertyList.h" 00021 #include "interval.h" 00022 #include "TrackHitRecord.h" 00023 // cannot forward declare a Rect, because it gets confused with the windows Rect. 00024 #include "box2.h" 00025 #include "svcore.h" 00026 #include "FileEnumConstants.h" 00027 #include "ParamDimension.h" 00028 // Includes for constants used with the Animatable Class 00029 #include "TrackFlags.h" 00030 #include "SysNodeContext.h" 00031 #include "EditParamFlags.h" 00032 #include "AnimatableFlags.h" 00033 #include "AnimatableInterfaceIDs.h" 00034 00035 // forward declarations 00036 class IObjParam; 00037 class AnimEnum; 00038 class BitArray; 00039 class TimeMap; 00040 class TrackClipObject; 00041 class NoteTrack; 00042 class AssetEnumCallback; 00043 class INodeTab; 00044 class AppDataChunk; 00045 class IParamBlock2; 00046 class ISave; 00047 class ILoad; 00048 class ICustAttribContainer; 00049 class ParamBlockDesc2; 00050 00051 typedef UINT_PTR AnimHandle; 00052 00053 // 00054 // This solves an incompatibility between projects compiled with /clr and without. 00055 // Under /clr, _M_CEE is defined and the windows header files define GetClassName 00056 // as an inline function. Without /clr, the windows headers define GetClassName 00057 // as a macro, expanding to either GetClassNameA or GetClassNameW. The macro 00058 // affects Animatable's interface by replacing its GetClassName function, which 00059 // then causes symbol mismatches at link time. For compilations without /clr, the 00060 // following code eliminates the macro and replaces it with the inline function 00061 // defined by the window headers for /clr builds. The code is copied from 00062 // winuser.h. 00063 // 00064 #ifdef GetClassName 00065 #undef GetClassName 00066 #endif 00067 #ifndef _M_CEE 00068 __inline 00069 int 00070 GetClassName( 00071 HWND hWnd, 00072 LPTSTR lpClassName, 00073 int nMaxCount 00074 ) 00075 { 00076 #ifdef UNICODE 00077 return GetClassNameW( 00078 #else 00079 return GetClassNameA( 00080 #endif 00081 hWnd, 00082 lpClassName, 00083 nMaxCount 00084 ); 00085 } 00086 #endif 00087 00115 #pragma warning(push) 00116 #pragma warning(disable:4100) 00117 class Animatable : public InterfaceServer, public MaxSDK::Util::Noncopyable 00118 { 00120 friend class ISaveImp; 00121 friend class ILoadImp; 00122 00123 public: 00125 00128 class EnumAnimList: public MaxHeapOperators { 00129 public: 00131 virtual ~EnumAnimList() {;} 00133 00136 virtual bool proc(Animatable *theAnim)=0; 00137 }; 00138 00139 private: 00140 class AnimatableImplData; 00141 const MaxSDK::Util::AutoPtr<AnimatableImplData> mAnimatableImplData; 00142 DWORD tvflags1, tvflags2; 00143 DWORD aflag_ex; 00144 00145 protected: 00146 DWORD aflag; 00147 AnimPropertyList aprops; 00148 00150 00151 00152 00156 CoreExport virtual ~Animatable() = 0; 00157 00158 public: 00160 CoreExport Animatable(); 00161 00163 00182 CoreExport virtual void DeleteThis(); 00184 00186 00187 00188 00193 virtual void GetClassName(MSTR& s) { s = _M("Animatable"); } 00194 00196 00203 CoreExport virtual SClass_ID SuperClassID() = 0; 00204 00206 00212 CoreExport virtual Class_ID ClassID(); 00214 00216 00225 CoreExport static AnimHandle GetHandleByAnim( Animatable* anim ); 00226 00228 00238 CoreExport static Animatable* GetAnimByHandle( AnimHandle handle ); 00239 00241 00242 void SetAFlag(DWORD mask) { 00243 aflag |= mask; 00244 } 00246 00247 void ClearAFlag(DWORD mask) { 00248 aflag &= ~mask; 00249 } 00250 00252 00255 BOOL TestAFlag(DWORD mask) { 00256 return (aflag & mask ? TRUE : FALSE); 00257 } 00258 00260 00261 void SetAFlagEx(DWORD mask) { 00262 aflag_ex |= mask; 00263 } 00264 00266 00267 void ClearAFlagEx(DWORD mask) { 00268 aflag_ex &= ~mask; 00269 } 00270 00272 00275 BOOL TestAFlagEx(DWORD mask) { 00276 return (aflag_ex & mask ? TRUE : FALSE); 00277 } 00278 00280 00289 CoreExport static int RequestFlagBit(); 00290 00292 00293 CoreExport static void ReleaseFlagBit(int index); 00294 00296 00298 CoreExport bool TestFlagBit(int index); 00299 00301 00303 00306 00307 00310 00311 00314 00321 00335 00375 00394 00447 00450 00465 00530 00596 00606 00617 00626 00637 00647 00656 00664 00671 00674 00681 00696 00702 00717 00733 00743 00750 00754 00757 00760 00776 00785 00801 00808 00818 00823 00829 00850 00861 00866 00876 00901 00919 00923 00936 00945 00953 00962 00970 00980 00989 01002 01034 01046 01080 01110 01117 01127 01204 01214 01219 01235 01258 01267 01276 01282 01312 01331 01335 01341 01352 01404 01446 01457 01462 01465 01467 01494 01509 01590 01624 01639 01649 01652 01661 01664 01673 01676 01681 01684 01693 01696 01700 01709 01720 01732 01744 01753 01775 01795 01810 01823 01830 01866 01905 01939 01983 02037 02083 02137 02176 02203 02208 02227 02234 02254 02268 02272 02291 02298 02305 02309 02312 02320 02370 02379 02404 02407 02421 02426 02432 02436 02455 02457 02466 02468 02475 02477 02482 02499 02505 02514 02521 02528 02551 02561 02566 02568 02572 02605 02652 02664 02677 02700 02713 02725 02738 02743 02746 02751 02763 02780 02799 02813 02824 02838 02852 02864 02871 02881 02896 02907 02917 02934 02941 02952 02959 02971 02978 02989 02998 03000 03002 03006 03021