printwin.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/msw/printwin.h
  3. // Purpose: wxWindowsPrinter, wxWindowsPrintPreview classes
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 01/02/97
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_PRINTWIN_H_
  11. #define _WX_PRINTWIN_H_
  12. #include "wx/prntbase.h"
  13. // ---------------------------------------------------------------------------
  14. // Represents the printer: manages printing a wxPrintout object
  15. // ---------------------------------------------------------------------------
  16. class WXDLLIMPEXP_CORE wxWindowsPrinter : public wxPrinterBase
  17. {
  18. DECLARE_DYNAMIC_CLASS(wxWindowsPrinter)
  19. public:
  20. wxWindowsPrinter(wxPrintDialogData *data = NULL);
  21. virtual bool Print(wxWindow *parent,
  22. wxPrintout *printout,
  23. bool prompt = true);
  24. virtual wxDC *PrintDialog(wxWindow *parent);
  25. virtual bool Setup(wxWindow *parent);
  26. private:
  27. wxDECLARE_NO_COPY_CLASS(wxWindowsPrinter);
  28. };
  29. // ---------------------------------------------------------------------------
  30. // wxPrintPreview: programmer creates an object of this class to preview a
  31. // wxPrintout.
  32. // ---------------------------------------------------------------------------
  33. class WXDLLIMPEXP_CORE wxWindowsPrintPreview : public wxPrintPreviewBase
  34. {
  35. public:
  36. wxWindowsPrintPreview(wxPrintout *printout,
  37. wxPrintout *printoutForPrinting = NULL,
  38. wxPrintDialogData *data = NULL);
  39. wxWindowsPrintPreview(wxPrintout *printout,
  40. wxPrintout *printoutForPrinting,
  41. wxPrintData *data);
  42. virtual ~wxWindowsPrintPreview();
  43. virtual bool Print(bool interactive);
  44. virtual void DetermineScaling();
  45. protected:
  46. #if wxUSE_ENH_METAFILE
  47. virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum);
  48. #endif
  49. DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPrintPreview)
  50. };
  51. #endif
  52. // _WX_PRINTWIN_H_