Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Shape.h

00001 #ifndef SHAPE_H
00002 #define SHAPE_H
00003 
00004 #include <afxwin.h>
00005 #include "stdafx.h"
00006 
00007 class VPoint;
00008 
00009 #include "GenericProperty.h"
00010 #include "Color.h"
00011 #include "Point.h"
00012 
00013 #include "Properties.h"
00014 
00015 #include "ScreenState.h"
00016 #include "AppState.h"
00017 
00018 #include "MoveTransform.h"
00019 #include "RotateTransform.h"
00020 #include "ScaleTransform.h"
00021 
00022 #include "Flash\F3SDK.h"
00023 
00024 
00026 class VShape  {
00027 public:
00028 
00029         struct MouseEvent {
00031                 VPoint ptstart;
00033                 VPoint ptcurrent;
00034 
00036                 VPoint ptlast;
00037                 
00039                 VShape *operand;
00040 
00042                 int internaldata;
00043 
00045                 bool changedselection;
00046 
00047         };
00048 
00049 
00050 
00051 protected:
00052         
00053 
00055         VPoint                          ptmin;
00056 
00058         VPoint                          ptmax;
00059 
00061         VPoint                          ptmidleft;
00062 
00064         VPoint                          ptmidright;
00065 
00066 
00068         CDC *pDC;
00069 
00071         int                                     currentframe;
00072 
00073 
00074 public:
00076         bool m_bActive;
00077 
00078         VMoveTransform          move;
00079         VRotateTransform        rotate;
00080         VScaleTransform         scale;
00081 
00083         VProperty_LineWidth linewidth;
00084 
00086         VProperty_ColorFill     colorfill;
00087 
00089         VProperty_ColorLine     colorline;
00090 
00092         VProperty_Opacity opacity;
00093 
00094 
00095 
00096                         VShape();
00097                         VShape(VShape*);
00098         virtual ~VShape();
00099 
00101         virtual VShape* Clone();
00102 
00104 
00105 
00107                 virtual void Draw(ScreenState*, AppState *pApp);
00108 
00110                 virtual void DrawWhileDragged(MouseEvent *, ScreenState*, AppState *);
00111 
00113 
00114 
00116 
00117 
00119                 virtual U16 FlashSDKPushFrame(FObjCollection *objsMovie, U16 uId, int nFrame, int nStartFrame, int nEndFrame, int nDepth, ScreenState *pState);
00120 
00122                 virtual FShapeRec* FlashSDKCreateShapeRecordForThisPoint(int* pnPoint, VPoint* ptCurrent);
00123 
00125                 virtual bool FlashSDKShouldIExportThisShape(int nStartFrame, int nEndFrame, ScreenState *pState);
00126 
00128                 FMatrix* FlashSDKCreateTransformationMatrix(int nFrame, int nStartFrame, int nEndFrame);
00129 
00131                 FRect* FlashSDKCreateBoundsRect( int nFrame );
00132 
00134                 bool FlashSDKDoesThisFrameWantAMorphShape(int nCurrentFrame, int nStartFrame, int nEndFrame);
00135 
00137                 bool FlashSDKShouldIGiveThisFrameAMorphShape(int nCurrentFrame, int nStartFrame, int nEndFrame);
00138                 
00140                 int FlashSDKFindLastMorphFrame(int nCurrentFrame, int nStartFrame, int nEndFrame);
00141 
00143                 int FlashSDKFindNextMorphFrame(int nCurrentFrame, int nStartFrame, int nEndFrame);
00144 
00146 
00147 
00149 
00150 
00152                 virtual bool OnClick(MouseEvent *e, ScreenState*, AppState*);
00153 
00155                 virtual bool OnRightClick(MouseEvent *e, ScreenState*, AppState*);
00156 
00158                 virtual bool OnSelect();
00159 
00161                 virtual bool OnDeSelect();
00162 
00164                 virtual bool OnDrag(MouseEvent *e, ScreenState*, AppState*);
00165 
00167                 virtual VShape* OnDragCompleted(MouseEvent *e, ScreenState*, AppState*) {return NULL;}
00168 
00169 
00171                 virtual void OnFrameChanged(int frame);
00172 
00174 
00175 
00177         virtual void UpdateControlPoints( );
00178 
00179 
00181         virtual bool InBounds( CPoint *, ScreenState *pState ) const;
00182 
00184         virtual bool InBounds( RECT *, ScreenState *pState ) const;
00185 
00186 
00188 
00189 
00191                 virtual VGenericProperty* GetProperty( int index );
00192 
00194                 virtual int PropertyCount() const;
00195 
00197 
00200 
00201 
00203                 virtual VPoint  GetPoint        ( int index ) const;
00204 
00206                 virtual void    MovePoint       ( int index, int dx, int dy);
00207 
00209                 virtual void    SetPoint        ( int index, int x, int y);
00210 
00212                 virtual unsigned int PointCount () const;
00214 
00216         void CreateBlankKeyFrame( int frame );
00217 
00219         virtual void    SetDC           (CDC*);
00220 
00222         virtual CDC*    GetDC           ();
00223 
00224 
00226         int DeterminePoint(VPoint p, ScreenState* pState, int* pDist = NULL) const;
00227 
00229         int DeterminePointOnLine(VPoint p, ScreenState* pState, int* pDist = NULL) const;
00230 
00231 
00233         virtual string Identify() const  { return string(""); }
00234 
00235 };
00236 
00237 #endif

Generated at Wed Aug 29 19:58:55 2001 for Pocket Animator by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001