Mercurial > vba-clojure
diff src/win32/PaletteViewControl.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/PaletteViewControl.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,71 @@ 1.4 +#if !defined(AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_) 1.5 +#define AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_ 1.6 + 1.7 +#if _MSC_VER > 1000 1.8 +#pragma once 1.9 +#endif // _MSC_VER > 1000 1.10 +// PaletteViewControl.h : header file 1.11 +// 1.12 +#define WM_PALINFO WM_APP+1 1.13 + 1.14 +///////////////////////////////////////////////////////////////////////////// 1.15 +// PaletteViewControl window 1.16 + 1.17 +class PaletteViewControl : public CWnd 1.18 +{ 1.19 + int w; 1.20 + int h; 1.21 + int colors; 1.22 + u8 *data; 1.23 + BITMAPINFO bmpInfo; 1.24 + static bool isRegistered; 1.25 + int selected; 1.26 + protected: 1.27 + u16 palette[256]; 1.28 + int paletteAddress; 1.29 + // Construction 1.30 + public: 1.31 + PaletteViewControl(); 1.32 + 1.33 + virtual void updatePalette()=0; 1.34 + 1.35 + // Attributes 1.36 + public: 1.37 + 1.38 + // Operations 1.39 + public: 1.40 + 1.41 + // Overrides 1.42 + // ClassWizard generated virtual function overrides 1.43 + //{{AFX_VIRTUAL(PaletteViewControl) 1.44 + //}}AFX_VIRTUAL 1.45 + 1.46 + // Implementation 1.47 + public: 1.48 + void registerClass(); 1.49 + void refresh(); 1.50 + void render(u16 color, int x, int y); 1.51 + void setSelected(int s); 1.52 + void setPaletteAddress(int address); 1.53 + bool saveJASCPAL(const char *name); 1.54 + bool saveMSPAL(const char *name); 1.55 + bool saveAdobe(const char *name); 1.56 + void init(int c, int w, int h); 1.57 + virtual ~PaletteViewControl(); 1.58 + 1.59 + // Generated message map functions 1.60 + protected: 1.61 + //{{AFX_MSG(PaletteViewControl) 1.62 + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 1.63 + afx_msg BOOL OnEraseBkgnd(CDC* pDC); 1.64 + afx_msg void OnPaint(); 1.65 + //}}AFX_MSG 1.66 + DECLARE_MESSAGE_MAP() 1.67 + }; 1.68 + 1.69 + ///////////////////////////////////////////////////////////////////////////// 1.70 + 1.71 +//{{AFX_INSERT_LOCATION}} 1.72 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 1.73 + 1.74 +#endif // !defined(AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_)