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