Mercurial > vba-linux
diff src/win32/MemoryViewer.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/MemoryViewer.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,97 @@ 1.4 +#if !defined(AFX_MEMORYVIEWER_H__52C50474_5399_4D0B_A3E4_4C52C4E0EAA0__INCLUDED_) 1.5 +#define AFX_MEMORYVIEWER_H__52C50474_5399_4D0B_A3E4_4C52C4E0EAA0__INCLUDED_ 1.6 + 1.7 +#if _MSC_VER > 1000 1.8 +#pragma once 1.9 +#endif // _MSC_VER > 1000 1.10 +// -*- C++ -*- 1.11 +// MemoryViewer.h : header file 1.12 +// 1.13 + 1.14 +///////////////////////////////////////////////////////////////////////////// 1.15 +// MemoryViewer window 1.16 + 1.17 +class IMemoryViewerDlg 1.18 +{ 1.19 +public: 1.20 + virtual void setCurrentAddress(u32 address) = 0; 1.21 +}; 1.22 + 1.23 +class MemoryViewer : public CWnd 1.24 +{ 1.25 + u32 address; 1.26 + int addressSize; 1.27 + int dataSize; 1.28 + bool hasCaret; 1.29 + int caretWidth; 1.30 + int caretHeight; 1.31 + HFONT font; 1.32 + CSize fontSize; 1.33 + u32 editAddress; 1.34 + int editNibble; 1.35 + int maxNibble; 1.36 + int displayedLines; 1.37 + int beginAscii; 1.38 + int beginHex; 1.39 + bool editAscii; 1.40 + bool decimalDisplay; 1.41 + IMemoryViewerDlg *dlg; 1.42 + 1.43 + static bool isRegistered; 1.44 + // Construction 1.45 +public: 1.46 + MemoryViewer(); 1.47 + 1.48 + // Attributes 1.49 +public: 1.50 + // Operations 1.51 +public: 1.52 + virtual void readData(u32, int, u8 *) = 0; 1.53 + virtual void editData(u32, int, int, u32) = 0; 1.54 + 1.55 + // Overrides 1.56 + // ClassWizard generated virtual function overrides 1.57 + //{{AFX_VIRTUAL(MemoryViewer) 1.58 + //}}AFX_VIRTUAL 1.59 + 1.60 + // Implementation 1.61 +public: 1.62 + int getSize(); 1.63 + u32 getCurrentAddress(); 1.64 + void setAddressSize(int s); 1.65 + void registerClass(); 1.66 + void beep(); 1.67 + bool OnEditInput(UINT c); 1.68 + void moveAddress(s32 offset, int nibbleOff); 1.69 + void setCaretPos(); 1.70 + void destroyEditCaret(); 1.71 + void createEditCaret(int w, int h); 1.72 + void updateScrollInfo(int lines); 1.73 + void setSize(int s); 1.74 + void setDecimal(bool decimalDisplayMode); 1.75 + void setAddress(u32 a); 1.76 + void setDialog(IMemoryViewerDlg *d); 1.77 + virtual ~MemoryViewer(); 1.78 + 1.79 + // Generated message map functions 1.80 +protected: 1.81 + //{{AFX_MSG(MemoryViewer) 1.82 + afx_msg BOOL OnEraseBkgnd(CDC*pDC); 1.83 + afx_msg void OnPaint(); 1.84 + afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar*pScrollBar); 1.85 + afx_msg UINT OnGetDlgCode(); 1.86 + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 1.87 + afx_msg void OnSetFocus(CWnd*pOldWnd); 1.88 + afx_msg void OnKillFocus(CWnd*pNewWnd); 1.89 + afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 1.90 + //}}AFX_MSG 1.91 + DECLARE_MESSAGE_MAP() 1.92 + afx_msg LRESULT OnWMChar(WPARAM wParam, LPARAM lParam); 1.93 +}; 1.94 + 1.95 +///////////////////////////////////////////////////////////////////////////// 1.96 + 1.97 +//{{AFX_INSERT_LOCATION}} 1.98 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 1.99 + 1.100 +#endif // !defined(AFX_MEMORYVIEWER_H__52C50474_5399_4D0B_A3E4_4C52C4E0EAA0__INCLUDED_)