// JPEG2000View.h : interface of the CJPEG2000View class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_JPEG2000VIEW_H__7B7648EB_D1AE_4F4B_B7ED_278E4C89AA0F__INCLUDED_) #define AFX_JPEG2000VIEW_H__7B7648EB_D1AE_4F4B_B7ED_278E4C89AA0F__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 //DEFINES for m_nViewMode #define VIEW_NORMAL 0x0 #define VIEW_ZOOM 0x1 #define VIEW_FIT 0x2 #define VIEW_SNAP 0x3 #define ID_REGIONEVENT 1 //region outline timer id #define REGIONEVENTDELAY 100 //region outine animation delay #if 0 class CJPEG2000View : public CScrollView { protected: // create from serialization only CJPEG2000View(); DECLARE_DYNCREATE(CJPEG2000View) // Attributes public: CJPEG2000Doc* GetDocument(); void OnSizeChange(); void SetZoom(int nZoom); RECT m_rcDst; L_INT m_nZoom; L_INT m_nViewMode; // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CJPEG2000View) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); virtual void OnInitialUpdate(); protected: virtual void OnUpdate(CScrollView* pSender, LPARAM lHint, CObject* pHint); //}}AFX_VIRTUAL // Implementation public: virtual ~CJPEG2000View(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: //{{AFX_MSG(CJPEG2000View) afx_msg LRESULT OnDoRealize(WPARAM wParam, LPARAM lParam); // user message afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnViewNormal(); afx_msg void OnUpdateViewNormal(CCmdUI* pCmdUI); afx_msg void OnViewFitimagetowindow(); afx_msg void OnUpdateViewFitimagetowindow(CCmdUI* pCmdUI); afx_msg void OnViewSnapwindowtoimage(); afx_msg void OnUpdateViewSnapwindowtoimage(CCmdUI* pCmdUI); afx_msg void OnViewZoomin2x(); afx_msg void OnViewZoomout2x(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg void OnSetFocus(CWnd* pOldWnd); afx_msg void OnKillFocus(CWnd* pNewWnd); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #endif /***************************************************************** Types ****************************************************************/ //structure for storing Region data typedef struct tagIMAGEDATA { L_BOOL bFitImage; //if TRUE then fit image to window L_INT cxClient; //width of client area L_INT cyClient; //height of client area RECT rcView; BITMAPHANDLE *pBitmap; L_UINT uFrameType; //set to FRAME_TYPE_COLOR (10)// For anmation HRGN hRgnWindows; POINT pointStart; } IMAGEDATA; typedef IMAGEDATA L_FAR *LPIMAGEDATA; class CJPEG2000View : public CScrollView { protected: CJPEG2000View(); DECLARE_DYNCREATE(CJPEG2000View) public: CJPEG2000Doc* GetDocument(); void OnSizeChange(); void SetZoom(int nZoom); RECT m_rcDst; L_INT m_nZoom; L_INT m_nViewMode; IMAGEDATA m_Data; L_INT m_nTool; LPPOINT m_pptRegion; L_INT m_nNextPt; BOOL m_bResizePlz; public: L_VOID HiliteMark(HWND hWnd, L_BOOL bUpdate); L_VOID OutlineRegion(HWND hWnd, HDC hdc); L_VOID UpdateDisplayPalette( CDC* pDC, pBITMAPHANDLE pBitmap ); // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CJPEG2000View) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); virtual void OnInitialUpdate(); protected: virtual void OnUpdate(CScrollView* pSender, LPARAM lHint, CObject* pHint); //}}AFX_VIRTUAL public: virtual ~CJPEG2000View(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: //{{AFX_MSG(CJPEG2000View) afx_msg LRESULT OnDoRealize(WPARAM wParam, LPARAM lParam); // user message afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnViewNormal(); afx_msg void OnUpdateViewNormal(CCmdUI* pCmdUI); afx_msg void OnViewFitimagetowindow(); afx_msg void OnViewSnapwindowtoimage(); afx_msg void OnUpdateViewFitimagetowindow(CCmdUI* pCmdUI); afx_msg void OnUpdateViewSnapwindowtoimage(CCmdUI* pCmdUI); afx_msg void OnViewZoomin2x(); afx_msg void OnViewZoomout2x(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg void OnSetFocus(CWnd* pOldWnd); afx_msg void OnKillFocus(CWnd* pNewWnd); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnLButtonUp(UINT nFlags, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg void OnTimer(UINT nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in JPEG2000View.cpp inline CJPEG2000Doc* CJPEG2000View::GetDocument() { return (CJPEG2000Doc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_JPEG2000VIEW_H__7B7648EB_D1AE_4F4B_B7ED_278E4C89AA0F__INCLUDED_)