diff src/win32/GBPrinterDlg.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/GBPrinterDlg.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,61 @@
     1.4 +#if !defined(AFX_GBPRINTER_H__3180CC5A_1F9D_47E5_B044_407442CB40A4__INCLUDED_)
     1.5 +#define AFX_GBPRINTER_H__3180CC5A_1F9D_47E5_B044_407442CB40A4__INCLUDED_
     1.6 +
     1.7 +#if _MSC_VER > 1000
     1.8 +#pragma once
     1.9 +#endif // _MSC_VER > 1000
    1.10 +// -*- C++ -*-
    1.11 +// GBPrinter.h : header file
    1.12 +//
    1.13 +
    1.14 +/////////////////////////////////////////////////////////////////////////////
    1.15 +// GBPrinter dialog
    1.16 +
    1.17 +class GBPrinterDlg : public CDialog
    1.18 +{
    1.19 +private:
    1.20 +	u8 bitmapHeader[sizeof(BITMAPINFO)+4*sizeof(RGBQUAD)];
    1.21 +	BITMAPINFO *bitmap;
    1.22 +	u8  bitmapData[160*144];
    1.23 +	int scale;
    1.24 +	// Construction
    1.25 +public:
    1.26 +	void processData(u8 *data);
    1.27 +	void saveAsPNG(const char *name);
    1.28 +	void saveAsBMP(const char *name);
    1.29 +	GBPrinterDlg(CWnd*pParent = NULL);  // standard constructor
    1.30 +
    1.31 +	// Dialog Data
    1.32 +	//{{AFX_DATA(GBPrinterDlg)
    1.33 +	enum { IDD = IDD_GB_PRINTER };
    1.34 +	int m_scale;
    1.35 +	//}}AFX_DATA
    1.36 +
    1.37 +	// Overrides
    1.38 +	// ClassWizard generated virtual function overrides
    1.39 +	//{{AFX_VIRTUAL(GBPrinterDlg)
    1.40 +protected:
    1.41 +	virtual void DoDataExchange(CDataExchange*pDX);   // DDX/DDV support
    1.42 +	//}}AFX_VIRTUAL
    1.43 +
    1.44 +	// Implementation
    1.45 +protected:
    1.46 +	// Generated message map functions
    1.47 +	//{{AFX_MSG(GBPrinterDlg)
    1.48 +	afx_msg void OnSave();
    1.49 +	afx_msg void OnPrint();
    1.50 +	virtual BOOL OnInitDialog();
    1.51 +	afx_msg void OnOk();
    1.52 +	afx_msg void On1x();
    1.53 +	afx_msg void On2x();
    1.54 +	afx_msg void On3x();
    1.55 +	afx_msg void On4x();
    1.56 +	afx_msg void OnPaint();
    1.57 +	//}}AFX_MSG
    1.58 +	DECLARE_MESSAGE_MAP()
    1.59 +};
    1.60 +
    1.61 +//{{AFX_INSERT_LOCATION}}
    1.62 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
    1.63 +
    1.64 +#endif // !defined(AFX_GBPRINTER_H__3180CC5A_1F9D_47E5_B044_407442CB40A4__INCLUDED_)