Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
2.9 KiB

  1. // watcherView.h : interface of the CWatcherView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_WATCHERVIEW_H__3A351A40_9441_4451_AA2B_C5D4C392CB1B__INCLUDED_)
  5. #define AFX_WATCHERVIEW_H__3A351A40_9441_4451_AA2B_C5D4C392CB1B__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "ParameterDialog.h"
  10. #include "watcherDoc.h"
  11. #ifndef _WATCHER_SOCKET
  12. #define _WATCHER_SOCKET
  13. #include "WatcherSocket.h"
  14. #endif
  15. #define MAX_BELL_SIZE MAX_BUFFER_SIZE*8
  16. class CWatcherView : public CView
  17. {
  18. protected: // create from serialization only
  19. CWatcherView();
  20. DECLARE_DYNCREATE(CWatcherView)
  21. // Attributes
  22. public:
  23. CWatcherDoc* GetDocument();
  24. // ClassWizard generated virtual function overrides
  25. //{{AFX_VIRTUAL(CWatcherView)
  26. virtual void OnInitialUpdate();
  27. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  28. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  29. protected:
  30. //}}AFX_VIRTUAL
  31. // Implementation
  32. public:
  33. void ProcessByte(BYTE byte);
  34. virtual ~CWatcherView();
  35. #ifdef _DEBUG
  36. virtual void AssertValid() const;
  37. virtual void Dump(CDumpContext& dc) const;
  38. #endif
  39. protected:
  40. void ProcessBellSequence(CHAR *Buffer, int len);
  41. LCID Locale;
  42. int xpos;
  43. int ypos;
  44. int CharsInLine;
  45. int height;
  46. int width;
  47. int position;
  48. int index;
  49. #ifdef _UNICODE
  50. int dbcsIndex;
  51. #endif
  52. BOOL InEscape;
  53. WatcherSocket *Socket;
  54. CClientDC *cdc;
  55. COLORREF background;
  56. COLORREF foreground;
  57. UINT CodePage;
  58. int indexBell;
  59. BOOL BellStarted;
  60. BOOL InBell;
  61. int ScrollTop;
  62. int ScrollBottom;
  63. BOOL seenM;
  64. #ifdef _UNICODE
  65. BYTE DBCSArray[2];
  66. #endif
  67. BYTE BellBuffer[MAX_BELL_SIZE];
  68. BYTE EscapeBuffer[MAX_BUFFER_SIZE];
  69. CRITICAL_SECTION mutex;
  70. int GetTextWidth(TCHAR *Data, int number);
  71. BOOL IsPrintable(TCHAR Char);
  72. BOOL FinalCharacter(CHAR c);
  73. BOOL IsLeadByte(BYTE byte);
  74. void ProcessTextAttributes(PCHAR Buffer,int length);
  75. void ProcessEscapeSequence(PCHAR Buffer, int length);
  76. void PrintCharacter(BYTE byte);
  77. //{{AFX_MSG(CWatcherView)
  78. afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
  79. afx_msg void OnDestroy();
  80. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  81. //}}AFX_MSG
  82. DECLARE_MESSAGE_MAP()
  83. };
  84. #ifndef _DEBUG // debug version in watcherView.cpp
  85. inline CWatcherDoc* CWatcherView::GetDocument()
  86. { return (CWatcherDoc*)m_pDocument; }
  87. #endif
  88. /////////////////////////////////////////////////////////////////////////////
  89. //{{AFX_INSERT_LOCATION}}
  90. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  91. #endif // !defined(AFX_WATCHERVIEW_H__3A351A40_9441_4451_AA2B_C5D4C392CB1B__INCLUDED_)