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

View.h

00001 /*
00002 /--------------------------------------------------------------------
00003 |
00004 |      $Id: View.h,v 1.20 2002/02/24 13:00:57 uzadow Exp $
00005 |      view class declaration
00006 |
00007 |      Copyright (c) 1998 Bernard Delmée
00008 |
00009 \--------------------------------------------------------------------
00010 */
00011 
00012 #ifndef INCL_VIEW
00013 #define INCL_VIEW
00014 
00015 #include "ZoomView.h"
00016 
00017 #ifdef USES_DRAWDIB
00018 #define CPLVIEW_BASE_CLASS CScrollView
00019 #else
00020 #define CPLVIEW_BASE_CLASS CZoomView
00021 #endif
00022 
00023 class CPLView : public CPLVIEW_BASE_CLASS
00024 {
00025 protected: // create from serialization only
00026     CPLView();
00027     DECLARE_DYNCREATE(CPLView)
00028 
00029     // Attributes
00030 public:
00031     CPLViewerDoc* GetDocument()
00032     {
00033         ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPLViewerDoc)));
00034         return (CPLViewerDoc*) m_pDocument;
00035     }
00036 
00037     // Operations
00038 public:
00039 
00040     // Implementation
00041 public:
00042     virtual ~CPLView();
00043     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00044 
00045     virtual void OnInitialUpdate();
00046     virtual void OnActivateView(bool bActivate, CView* pActivateView,
00047                                 CView* pDeactiveView);
00048     void OnConvertTo8BPP();
00049 //  CString GetInfoString();
00050 
00051     // Printing support
00052 protected:
00053     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00054     virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
00055 
00056 private:
00057     void applyFilterAndShow (PLFilter * pFilter);
00058 
00059     typedef CPLVIEW_BASE_CLASS Super;
00060 
00061     bool    m_bFit;     // whether to fit image to view
00062     bool    m_bDither;  // whether to use palette dithering;
00063     bool    m_bZooming;
00064     HCURSOR m_curMove;
00065     HCURSOR m_curPoint;
00066     HCURSOR m_hZoomCursor;
00067     CRect   m_InvalidRect;
00068     int     m_nDocPosX;
00069     int     m_nDocPosY;
00070 
00071     void NotifyRanges();
00072     BOOL IsMovable() const;
00073 
00074     // Generated message map functions
00075 protected:
00076     //{{AFX_MSG(CPLView)
00077     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00078     afx_msg void OnSize(UINT nType, int cx, int cy);
00079     afx_msg LRESULT OnDoRealize(WPARAM wParam, LPARAM lParam);  // user message
00080     afx_msg void OnUpdateFitImage(CCmdUI* pCmdUI);
00081     afx_msg void OnFitImage();
00082     afx_msg void OnUpdateDither(CCmdUI* pCmdUI);
00083     afx_msg void OnDither();
00084     afx_msg void OnEditCopy();
00085     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00086     afx_msg void OnFilterBilinear();
00087     afx_msg void OnFilterBox();
00088     afx_msg void OnFilterGauss();
00089     afx_msg void OnFilterHamming();
00090     afx_msg void OnFilterCrop();
00091     afx_msg void OnFilterGrayscale();
00092     afx_msg void OnEditPaste();
00093     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00094     afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
00095     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00096     afx_msg void OnSizeToFit();
00097     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00098     afx_msg void OnUpdateZoomMode(CCmdUI* pCmdUI);
00099     afx_msg void OnZoomMode();
00100     afx_msg void OnPaint();
00101     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00102           afx_msg void OnFilterThreshold();
00103           afx_msg void OnUpdateViewShowpalette(CCmdUI* pCmdUI);
00104           afx_msg void OnViewShowpalette();
00105           afx_msg void OnFilterContrast();
00106           afx_msg void OnFilterIntensity();
00107           afx_msg void OnFilterLightness();
00108           afx_msg void OnUpdateTrueColFilter(CCmdUI* pCmdUI);
00109           afx_msg void OnFilterInvert();
00110         //}}AFX_MSG
00111     afx_msg void OnUpdateBmpInfo(CCmdUI *);
00112     afx_msg void OnUpdatePixelXIndicator(CCmdUI *pCmdUI);
00113     afx_msg void OnUpdatePixelYIndicator(CCmdUI *pCmdUI);
00114     afx_msg void OnUpdateRatioIndicator(CCmdUI *pCmdUI);
00115 
00116     DECLARE_MESSAGE_MAP()
00117 };
00118 
00119 #undef CPLVIEW_BASE_CLASS
00120 
00121 #endif  // INCL_VIEW
00122 
00123 /*
00124 /--------------------------------------------------------------------
00125 |
00126 |      $Log: View.h,v $
00127 |      Revision 1.20  2002/02/24 13:00:57  uzadow
00128 |      Documentation update; removed buggy PLFilterRotate.
00129 |
00130 |      Revision 1.19  2001/10/21 17:12:40  uzadow
00131 |      Added PSD decoder beta, removed BPPWanted from all decoders, added PLFilterPixel.
00132 |
00133 |      Revision 1.18  2001/09/16 19:03:23  uzadow
00134 |      Added global name prefix PL, changed most filenames.
00135 |
00136 |      Revision 1.17  2000/11/06 23:22:53  uzadow
00137 |      Added dialogs for Contrast and Intensity
00138 |
00139 |      Revision 1.16  2000/10/23 21:13:29  uzadow
00140 |      Removed Filter
00141 |
00142 |      Revision 1.15  2000/10/12 21:59:34  uzadow
00143 |      Added CreateFromHDIBBitmap() and CopyPalette() to PLWinBmp
00144 |      Added CF_DIB support to PLWinBmp::FromClipboard() (Richard Hollis)
00145 |
00146 |      Revision 1.14  2000/09/26 14:28:47  Administrator
00147 |      Added Threshold filter
00148 |
00149 |      Revision 1.13  2000/09/26 12:14:50  Administrator
00150 |      Refactored quantization.
00151 |
00152 |      Revision 1.12  2000/03/31 12:20:07  Ulrich von Zadow
00153 |      Video invert filter (beta)
00154 |
00155 |      Revision 1.11  2000/03/31 11:53:32  Ulrich von Zadow
00156 |      Added quantization support.
00157 |
00158 |      Revision 1.10  2000/03/30 21:47:41  Ulrich von Zadow
00159 |      Added zoom-in mode, PLWinBmpEx, conditional use of DrawDIB
00160 |      and some other nice stuff by Bernard Delmée.
00161 |
00162 |      Revision 1.8  2000/01/10 23:53:03  Ulrich von Zadow
00163 |      Changed formatting & removed tabs.
00164 |
00165 |      Revision 1.7  1999/12/30 15:54:48  Ulrich von Zadow
00166 |      Added PLWinBmp::FromClipBoard() and CreateFromHBitmap().
00167 |
00168 |      Revision 1.6  1999/12/02 17:07:36  Ulrich von Zadow
00169 |      Changes by bdelmee.
00170 |
00171 |      Revision 1.5  1999/10/21 18:48:18  Ulrich von Zadow
00172 |      no message
00173 |
00174 |      Revision 1.4  1999/10/21 16:07:06  Ulrich von Zadow
00175 |      Moved filters to separate directory. Added Crop, Grayscale and
00176 |      GetAlpha filters.
00177 |
00178 |      Revision 1.3  1999/10/19 21:33:49  Ulrich von Zadow
00179 |      Added filter support.
00180 |
00181 |
00182 \--------------------------------------------------------------------
00183 */

Generated on Sun Jun 6 13:42:22 2004 for paintlib by doxygen 1.3.2