Mercurial > vba-linux
diff src/win32/MapView.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/MapView.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,101 @@ 1.4 +#if !defined(AFX_MAPVIEW_H__20F40C77_8E10_44B7_BB49_7865F73C3E75__INCLUDED_) 1.5 +#define AFX_MAPVIEW_H__20F40C77_8E10_44B7_BB49_7865F73C3E75__INCLUDED_ 1.6 + 1.7 +#if _MSC_VER > 1000 1.8 +#pragma once 1.9 +#endif // _MSC_VER > 1000 1.10 +// -*- C++ -*- 1.11 +// MapView.h : header file 1.12 +// 1.13 + 1.14 +#include "BitmapControl.h" 1.15 +#include "ColorControl.h" 1.16 +#include "ZoomControl.h" 1.17 +#include "ResizeDlg.h" 1.18 +#include "IUpdate.h" 1.19 + 1.20 +///////////////////////////////////////////////////////////////////////////// 1.21 +// MapView dialog 1.22 + 1.23 +class MapView : public ResizeDlg, IUpdateListener 1.24 +{ 1.25 +private: 1.26 + BITMAPINFO bmpInfo; 1.27 + u8 * data; 1.28 + int frame; 1.29 + u16 control; 1.30 + int bg; 1.31 + int w; 1.32 + int h; 1.33 + BitmapControl mapView; 1.34 + ZoomControl mapViewZoom; 1.35 + ColorControl color; 1.36 + bool autoUpdate; 1.37 + 1.38 + // Construction 1.39 +public: 1.40 + void savePNG(const char *name); 1.41 + void saveBMP(const char *name); 1.42 + afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam); 1.43 + afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam); 1.44 + u32 GetClickAddress(int x, int y); 1.45 + u32 GetTextClickAddress(u32 base, int x, int y); 1.46 + void update(); 1.47 + void enableButtons(int mode); 1.48 + void paint(); 1.49 + void renderMode5(); 1.50 + void renderMode4(); 1.51 + void renderMode3(); 1.52 + void renderMode2(); 1.53 + void renderMode1(); 1.54 + void renderMode0(); 1.55 + void renderRotScreen(u16 control); 1.56 + void renderTextScreen(u16 control); 1.57 + MapView(CWnd*pParent = NULL); // standard constructor 1.58 + ~MapView(); 1.59 + 1.60 + // Dialog Data 1.61 + //{{AFX_DATA(MapView) 1.62 + enum { IDD = IDD_MAP_VIEW }; 1.63 + CStatic m_numcolors; 1.64 + CStatic m_mode; 1.65 + CStatic m_overflow; 1.66 + CStatic m_mosaic; 1.67 + CStatic m_priority; 1.68 + CStatic m_dim; 1.69 + CStatic m_charbase; 1.70 + CStatic m_mapbase; 1.71 + //}}AFX_DATA 1.72 + 1.73 + // Overrides 1.74 + // ClassWizard generated virtual function overrides 1.75 + //{{AFX_VIRTUAL(MapView) 1.76 +protected: 1.77 + virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support 1.78 + virtual void PostNcDestroy(); 1.79 + //}}AFX_VIRTUAL 1.80 + 1.81 + // Implementation 1.82 +protected: 1.83 + // Generated message map functions 1.84 + //{{AFX_MSG(MapView) 1.85 + afx_msg void OnRefresh(); 1.86 + virtual BOOL OnInitDialog(); 1.87 + afx_msg void OnFrame0(); 1.88 + afx_msg void OnFrame1(); 1.89 + afx_msg void OnBg0(); 1.90 + afx_msg void OnBg1(); 1.91 + afx_msg void OnBg2(); 1.92 + afx_msg void OnBg3(); 1.93 + afx_msg void OnStretch(); 1.94 + afx_msg void OnAutoUpdate(); 1.95 + afx_msg void OnClose(); 1.96 + afx_msg void OnSave(); 1.97 + //}}AFX_MSG 1.98 + DECLARE_MESSAGE_MAP() 1.99 +}; 1.100 + 1.101 +//{{AFX_INSERT_LOCATION}} 1.102 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 1.103 + 1.104 +#endif // !defined(AFX_MAPVIEW_H__20F40C77_8E10_44B7_BB49_7865F73C3E75__INCLUDED_)