annotate src/win32/BitmapControl.h @ 2:3549bbe597ed

adding makefile.am
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:47 -0600
parents f9f4f1b99eed
children
rev   line source
rlm@1 1 #if !defined(AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_)
rlm@1 2 #define AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_
rlm@1 3
rlm@1 4 #if _MSC_VER > 1000
rlm@1 5 #pragma once
rlm@1 6 #endif // _MSC_VER > 1000
rlm@1 7 // BitmapControl.h : header file
rlm@1 8 //
rlm@1 9 #ifndef WM_MAPINFO
rlm@1 10 #define WM_MAPINFO WM_APP+101
rlm@1 11 #endif
rlm@1 12
rlm@1 13 /////////////////////////////////////////////////////////////////////////////
rlm@1 14 // BitmapControl view
rlm@1 15
rlm@1 16 class BitmapControl : public CScrollView
rlm@1 17 {
rlm@1 18 public:
rlm@1 19 BitmapControl(); // protected constructor used by dynamic creation
rlm@1 20 protected:
rlm@1 21 DECLARE_DYNCREATE(BitmapControl)
rlm@1 22
rlm@1 23 // Attributes
rlm@1 24 public:
rlm@1 25 // Operations
rlm@1 26 public:
rlm@1 27 void setStretch(bool b);
rlm@1 28 void refresh();
rlm@1 29 void setSize(int w1, int h1);
rlm@1 30 void setData(u8 *d);
rlm@1 31 void setBmpInfo(BITMAPINFO *info);
rlm@1 32 static bool isRegistered;
rlm@1 33
rlm@1 34 // Overrides
rlm@1 35 // ClassWizard generated virtual function overrides
rlm@1 36 //{{AFX_VIRTUAL(BitmapControl)
rlm@1 37 protected:
rlm@1 38 virtual void OnDraw(CDC*pDC); // overridden to draw this view
rlm@1 39 virtual void OnInitialUpdate(); // first time after construct
rlm@1 40 virtual void PostNcDestroy();
rlm@1 41 //}}AFX_VIRTUAL
rlm@1 42
rlm@1 43 // Implementation
rlm@1 44 public:
rlm@1 45 bool getStretch();
rlm@1 46 virtual ~BitmapControl();
rlm@1 47 protected:
rlm@1 48 #ifdef _DEBUG
rlm@1 49 virtual void AssertValid() const;
rlm@1 50 virtual void Dump(CDumpContext& dc) const;
rlm@1 51 #endif
rlm@1 52
rlm@1 53 // Generated message map functions
rlm@1 54 //{{AFX_MSG(BitmapControl)
rlm@1 55 afx_msg BOOL OnEraseBkgnd(CDC*pDC);
rlm@1 56 afx_msg void OnSize(UINT nType, int cx, int cy);
rlm@1 57 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
rlm@1 58 //}}AFX_MSG
rlm@1 59 DECLARE_MESSAGE_MAP()
rlm@1 60 private:
rlm@1 61 void registerClass();
rlm@1 62 bool stretch;
rlm@1 63 u8 colors[3*64];
rlm@1 64 BITMAPINFO *bmpInfo;
rlm@1 65 u8 * data;
rlm@1 66 int h;
rlm@1 67 int w;
rlm@1 68 };
rlm@1 69
rlm@1 70 /////////////////////////////////////////////////////////////////////////////
rlm@1 71
rlm@1 72 //{{AFX_INSERT_LOCATION}}
rlm@1 73 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
rlm@1 74
rlm@1 75 #endif // !defined(AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_)