![]() |
wxIScan
|
00001 ///////////////////////////////////////////////////////////////////////////// 00002 // Project: wxIView 00003 // Purpose: Complex wxWidgets sample 00004 // Name: wxiviewpaint.h 00005 // Author: Daniel Nell 00006 // Created: 2005/10/18 00007 // Copyright: (c) Daniel Nell 00008 // License: wxWindows license 00009 // Modified by: 00010 ///////////////////////////////////////////////////////////////////////////// 00011 00012 #ifndef __WXIVIEWPAINT_H 00013 #define __WXIVIEWPAINT_H 00014 00015 ///////////////////////////////////////////////////////////////////////////// 00016 // class wxIViewPaintBase 00017 // 00018 /// \brief Basic printing and print previewing handling. 00019 /// 00020 /// This is a helper class for the wxPrintOut implementation 00021 /// done in wxIViewPrintout class. 00022 /// 00023 /// Note: This is an abstract class ("pure virtual") and 00024 /// works as an interface description. Its member 00025 /// functions must be implemented in its sub classes. 00026 class wxIViewPaintBase 00027 { 00028 public: 00029 /// \brief Calculates the page extents in mm while 00030 /// printing or print previewing 00031 /// 00032 /// \param pnWidth a pointer to an integer for 00033 /// returning the page width in mm 00034 /// \param pnHeight a pointer to an integer for 00035 /// returning the page height in mm 00036 virtual bool GetPageSizeMM( int *pnWidth, int *pnHeight ) = 0; 00037 00038 /// Get the highest page number of the document to print. 00039 virtual int GetMaxPage() = 0; 00040 00041 /// \brief Switch to the given page number to print. 00042 /// 00043 /// \param nPage the page number 00044 virtual bool GotoPage( int nPage ) = 0; 00045 00046 /// \brief Show (print)... 00047 /// 00048 /// \param oDc the device context to print on. 00049 virtual bool Paint( wxDC& oDc ) = 0; 00050 00051 protected: 00052 /// Virtual destructor. 00053 virtual ~wxIViewPaintBase(){} 00054 }; 00055 00056 #endif // __WXIVIEWPAINT_H