diff src/win32/OamView.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/OamView.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,78 @@
     1.4 +#if !defined(AFX_OAMVIEW_H__E5369352_80F8_49C4_9F23_05EB6FC1345B__INCLUDED_)
     1.5 +#define AFX_OAMVIEW_H__E5369352_80F8_49C4_9F23_05EB6FC1345B__INCLUDED_
     1.6 +
     1.7 +#if _MSC_VER > 1000
     1.8 +#pragma once
     1.9 +#endif // _MSC_VER > 1000
    1.10 +// OamView.h : header file
    1.11 +//
    1.12 +#include "BitmapControl.h"
    1.13 +#include "ZoomControl.h"
    1.14 +#include "ColorControl.h"
    1.15 +#include "IUpdate.h"
    1.16 +#include "ResizeDlg.h"
    1.17 +
    1.18 +/////////////////////////////////////////////////////////////////////////////
    1.19 +// OamView dialog
    1.20 +
    1.21 +class OamView : public ResizeDlg, IUpdateListener
    1.22 +{
    1.23 +private:
    1.24 +	BITMAPINFO    bmpInfo;
    1.25 +	u8 *          data;
    1.26 +	int           w;
    1.27 +	int           h;
    1.28 +	int           number;
    1.29 +	bool          autoUpdate;
    1.30 +	BitmapControl oamView;
    1.31 +	ZoomControl   oamZoom;
    1.32 +	ColorControl  color;
    1.33 +
    1.34 +	// Construction
    1.35 +public:
    1.36 +	void updateScrollInfo();
    1.37 +	afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam);
    1.38 +	afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam);
    1.39 +	void savePNG(const char *name);
    1.40 +	void saveBMP(const char *name);
    1.41 +	void render();
    1.42 +	void setAttributes(u16 a0, u16 a1, u16 a2);
    1.43 +	void paint();
    1.44 +	~OamView();
    1.45 +	OamView(CWnd*pParent = NULL);  // standard constructor
    1.46 +
    1.47 +	virtual void update();
    1.48 +	// Dialog Data
    1.49 +	//{{AFX_DATA(OamView)
    1.50 +	enum { IDD = IDD_OAM_VIEW };
    1.51 +	CEdit m_sprite;
    1.52 +	BOOL  m_stretch;
    1.53 +	//}}AFX_DATA
    1.54 +
    1.55 +	// Overrides
    1.56 +	// ClassWizard generated virtual function overrides
    1.57 +	//{{AFX_VIRTUAL(OamView)
    1.58 +protected:
    1.59 +	virtual void DoDataExchange(CDataExchange*pDX);   // DDX/DDV support
    1.60 +	virtual void PostNcDestroy();
    1.61 +	//}}AFX_VIRTUAL
    1.62 +
    1.63 +	// Implementation
    1.64 +protected:
    1.65 +	// Generated message map functions
    1.66 +	//{{AFX_MSG(OamView)
    1.67 +	afx_msg void OnSave();
    1.68 +	virtual BOOL OnInitDialog();
    1.69 +	afx_msg void OnStretch();
    1.70 +	afx_msg void OnAutoUpdate();
    1.71 +	afx_msg void OnChangeSprite();
    1.72 +	afx_msg void OnClose();
    1.73 +	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar*pScrollBar);
    1.74 +	//}}AFX_MSG
    1.75 +	DECLARE_MESSAGE_MAP()
    1.76 +};
    1.77 +
    1.78 +//{{AFX_INSERT_LOCATION}}
    1.79 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
    1.80 +
    1.81 +#endif // !defined(AFX_OAMVIEW_H__E5369352_80F8_49C4_9F23_05EB6FC1345B__INCLUDED_)