view src/win32/PaletteViewControl.h @ 7:c0a590a394c3

ignore generated files
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:50:33 -0600
parents f9f4f1b99eed
children
line wrap: on
line source
1 #if !defined(AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_)
2 #define AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_
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
11 /////////////////////////////////////////////////////////////////////////////
12 // PaletteViewControl window
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();
30 virtual void updatePalette()=0;
32 // Attributes
33 public:
35 // Operations
36 public:
38 // Overrides
39 // ClassWizard generated virtual function overrides
40 //{{AFX_VIRTUAL(PaletteViewControl)
41 //}}AFX_VIRTUAL
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();
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 };
66 /////////////////////////////////////////////////////////////////////////////
68 //{{AFX_INSERT_LOCATION}}
69 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
71 #endif // !defined(AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_)