Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef FV_BASE_H
00021 #define FV_BASE_H
00022
00023 typedef enum _FV_DragWhat
00024 {
00025 FV_DragNothing,
00026 FV_DragTopLeftCorner,
00027 FV_DragTopRightCorner,
00028 FV_DragBotLeftCorner,
00029 FV_DragBotRightCorner,
00030 FV_DragLeftEdge,
00031 FV_DragTopEdge,
00032 FV_DragRightEdge,
00033 FV_DragBotEdge,
00034 FV_DragWhole
00035 } FV_DragWhat;
00036
00037 class FL_DocLayout;
00038 class PD_Document;
00039 class GR_Graphics;
00040 class FV_View;
00041 class GR_Image;
00042 class fp_Page;
00043
00047 class ABI_EXPORT FV_Base
00048 {
00049 public:
00050 FV_Base( FV_View* pView );
00051 virtual ~FV_Base();
00052 PD_Document * getDoc(void) const;
00053 FL_DocLayout * getLayout(void) const;
00054 GR_Graphics * getGraphics(void) const;
00055 inline FV_View * getView(void) const
00056 { return m_pView;}
00057 UT_sint32 getGlobCount(void) const;
00058 void mouseDrag(UT_sint32 x, UT_sint32 y);
00059 FV_DragWhat getDragWhat(void) const
00060 { return m_iDraggingWhat; }
00061 void setDragWhat( FV_DragWhat iDragWhat )
00062 { m_iDraggingWhat = iDragWhat; }
00063
00064 protected:
00065 FV_View * m_pView;
00066 UT_sint32 m_iGlobCount;
00067 UT_Rect m_recCurFrame;
00068 bool m_bFirstDragDone;
00069 UT_sint32 m_iFirstEverX;
00070 UT_sint32 m_iFirstEverY;
00071 UT_sint32 m_xLastMouse;
00072 UT_sint32 m_yLastMouse;
00073
00074 void _beginGlob();
00075 void _endGlob();
00076 virtual void _mouseDrag(UT_sint32 x, UT_sint32 y) = 0;
00077 void _doMouseDrag(UT_sint32 x, UT_sint32 y, UT_sint32& dx, UT_sint32& dy, UT_Rect& expX, UT_Rect& expY);
00078 void _checkDimensions();
00079
00080 private:
00081 FV_DragWhat m_iDraggingWhat;
00082 };
00083
00084 #endif