annotate 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
rev   line source
rlm@1 1 #if !defined(AFX_MEMORYVIEWER_H__52C50474_5399_4D0B_A3E4_4C52C4E0EAA0__INCLUDED_)
rlm@1 2 #define AFX_MEMORYVIEWER_H__52C50474_5399_4D0B_A3E4_4C52C4E0EAA0__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 // -*- C++ -*-
rlm@1 8 // MemoryViewer.h : header file
rlm@1 9 //
rlm@1 10
rlm@1 11 /////////////////////////////////////////////////////////////////////////////
rlm@1 12 // MemoryViewer window
rlm@1 13
rlm@1 14 class IMemoryViewerDlg
rlm@1 15 {
rlm@1 16 public:
rlm@1 17 virtual void setCurrentAddress(u32 address) = 0;
rlm@1 18 };
rlm@1 19
rlm@1 20 class MemoryViewer : public CWnd
rlm@1 21 {
rlm@1 22 u32 address;
rlm@1 23 int addressSize;
rlm@1 24 int dataSize;
rlm@1 25 bool hasCaret;
rlm@1 26 int caretWidth;
rlm@1 27 int caretHeight;
rlm@1 28 HFONT font;
rlm@1 29 CSize fontSize;
rlm@1 30 u32 editAddress;
rlm@1 31 int editNibble;
rlm@1 32 int maxNibble;
rlm@1 33 int displayedLines;
rlm@1 34 int beginAscii;
rlm@1 35 int beginHex;
rlm@1 36 bool editAscii;
rlm@1 37 bool decimalDisplay;
rlm@1 38 IMemoryViewerDlg *dlg;
rlm@1 39
rlm@1 40 static bool isRegistered;
rlm@1 41 // Construction
rlm@1 42 public:
rlm@1 43 MemoryViewer();
rlm@1 44
rlm@1 45 // Attributes
rlm@1 46 public:
rlm@1 47 // Operations
rlm@1 48 public:
rlm@1 49 virtual void readData(u32, int, u8 *) = 0;
rlm@1 50 virtual void editData(u32, int, int, u32) = 0;
rlm@1 51
rlm@1 52 // Overrides
rlm@1 53 // ClassWizard generated virtual function overrides
rlm@1 54 //{{AFX_VIRTUAL(MemoryViewer)
rlm@1 55 //}}AFX_VIRTUAL
rlm@1 56
rlm@1 57 // Implementation
rlm@1 58 public:
rlm@1 59 int getSize();
rlm@1 60 u32 getCurrentAddress();
rlm@1 61 void setAddressSize(int s);
rlm@1 62 void registerClass();
rlm@1 63 void beep();
rlm@1 64 bool OnEditInput(UINT c);
rlm@1 65 void moveAddress(s32 offset, int nibbleOff);
rlm@1 66 void setCaretPos();
rlm@1 67 void destroyEditCaret();
rlm@1 68 void createEditCaret(int w, int h);
rlm@1 69 void updateScrollInfo(int lines);
rlm@1 70 void setSize(int s);
rlm@1 71 void setDecimal(bool decimalDisplayMode);
rlm@1 72 void setAddress(u32 a);
rlm@1 73 void setDialog(IMemoryViewerDlg *d);
rlm@1 74 virtual ~MemoryViewer();
rlm@1 75
rlm@1 76 // Generated message map functions
rlm@1 77 protected:
rlm@1 78 //{{AFX_MSG(MemoryViewer)
rlm@1 79 afx_msg BOOL OnEraseBkgnd(CDC*pDC);
rlm@1 80 afx_msg void OnPaint();
rlm@1 81 afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar*pScrollBar);
rlm@1 82 afx_msg UINT OnGetDlgCode();
rlm@1 83 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
rlm@1 84 afx_msg void OnSetFocus(CWnd*pOldWnd);
rlm@1 85 afx_msg void OnKillFocus(CWnd*pNewWnd);
rlm@1 86 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
rlm@1 87 //}}AFX_MSG
rlm@1 88 DECLARE_MESSAGE_MAP()
rlm@1 89 afx_msg LRESULT OnWMChar(WPARAM wParam, LPARAM lParam);
rlm@1 90 };
rlm@1 91
rlm@1 92 /////////////////////////////////////////////////////////////////////////////
rlm@1 93
rlm@1 94 //{{AFX_INSERT_LOCATION}}
rlm@1 95 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
rlm@1 96
rlm@1 97 #endif // !defined(AFX_MEMORYVIEWER_H__52C50474_5399_4D0B_A3E4_4C52C4E0EAA0__INCLUDED_)