Mercurial > vba-clojure
comparison 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 |
comparison
equal
deleted
inserted
replaced
0:8ced16adf2e1 | 1:f9f4f1b99eed |
---|---|
1 #if !defined(AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_) | |
2 #define AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_ | |
3 | |
4 #if _MSC_VER > 1000 | |
5 #pragma once | |
6 #endif // _MSC_VER > 1000 | |
7 // PaletteViewControl.h : header file | |
8 // | |
9 #define WM_PALINFO WM_APP+1 | |
10 | |
11 ///////////////////////////////////////////////////////////////////////////// | |
12 // PaletteViewControl window | |
13 | |
14 class PaletteViewControl : public CWnd | |
15 { | |
16 int w; | |
17 int h; | |
18 int colors; | |
19 u8 *data; | |
20 BITMAPINFO bmpInfo; | |
21 static bool isRegistered; | |
22 int selected; | |
23 protected: | |
24 u16 palette[256]; | |
25 int paletteAddress; | |
26 // Construction | |
27 public: | |
28 PaletteViewControl(); | |
29 | |
30 virtual void updatePalette()=0; | |
31 | |
32 // Attributes | |
33 public: | |
34 | |
35 // Operations | |
36 public: | |
37 | |
38 // Overrides | |
39 // ClassWizard generated virtual function overrides | |
40 //{{AFX_VIRTUAL(PaletteViewControl) | |
41 //}}AFX_VIRTUAL | |
42 | |
43 // Implementation | |
44 public: | |
45 void registerClass(); | |
46 void refresh(); | |
47 void render(u16 color, int x, int y); | |
48 void setSelected(int s); | |
49 void setPaletteAddress(int address); | |
50 bool saveJASCPAL(const char *name); | |
51 bool saveMSPAL(const char *name); | |
52 bool saveAdobe(const char *name); | |
53 void init(int c, int w, int h); | |
54 virtual ~PaletteViewControl(); | |
55 | |
56 // Generated message map functions | |
57 protected: | |
58 //{{AFX_MSG(PaletteViewControl) | |
59 afx_msg void OnLButtonDown(UINT nFlags, CPoint point); | |
60 afx_msg BOOL OnEraseBkgnd(CDC* pDC); | |
61 afx_msg void OnPaint(); | |
62 //}}AFX_MSG | |
63 DECLARE_MESSAGE_MAP() | |
64 }; | |
65 | |
66 ///////////////////////////////////////////////////////////////////////////// | |
67 | |
68 //{{AFX_INSERT_LOCATION}} | |
69 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. | |
70 | |
71 #endif // !defined(AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_) |