00001 #pragma once 00002 00003 #include "ExTextView.h" 00004 00005 00006 #define DISPLAY_MARGIN 5 00007 #define LINES_PER_PAGE 30 00008 00009 00010 // 00011 namespace jbxwl { 00012 00013 00014 class CLogWndDoc; 00015 class CLogWndFrame; 00016 00017 00018 00019 class CLogWndView : public CExTextView 00020 { 00021 protected: 00022 CLogWndView(); 00023 DECLARE_DYNCREATE(CLogWndView) 00024 00025 private: 00026 BOOL m_locked; 00027 00028 public: 00029 CLogWndDoc* GetDocument() const; 00030 CLogWndDoc* pDoc; 00031 CLogWndFrame* pFrame; 00032 00033 CString Title; 00034 void SetTitle(LPCTSTR title); 00035 00036 void lock(void) { m_locked = TRUE;} 00037 void unlock(void) { m_locked = FALSE;} 00038 00039 // オーバーライド 00040 //{{AFX_VIRTUAL(CLogWndView) 00041 virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 00042 //}}AFX_VIRTUAL 00043 00044 protected: 00045 virtual void OnInitialUpdate(); 00046 00047 public: 00048 virtual ~CLogWndView(); 00049 00050 #ifdef _DEBUG 00051 virtual void AssertValid() const; 00052 virtual void Dump(CDumpContext& dc) const; 00053 #endif 00054 00055 protected: 00056 int m_mpress; 00057 int m_msx; 00058 int m_msy; 00059 int m_mex; 00060 int m_mey; 00061 int m_dragsx; 00062 int m_dragsy; 00063 int m_dragex; 00064 int m_dragey; 00065 00066 public: 00067 CFont m_ScreenFont; 00068 int m_FontSizeX; 00069 int m_FontSizeY; 00070 00071 int m_ScrollSizeX; 00072 int m_ScrollSizeY; 00073 int m_DocLastPos; 00074 00075 int m_copysy; 00076 int m_copyey; 00077 00078 00079 void resetScrollSize(void); 00080 void setScrollPosition(CDC* pDC, CLogRingBuffer* pBR); 00081 void clearViewDoc(void); 00082 00083 CString getCopyData(void); 00084 00085 BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll); 00086 00087 protected: 00088 //{{AFX_MSG(CLogWndView) 00089 afx_msg int OnCreate(LPCREATESTRUCT lpcs); 00090 afx_msg void OnDestroy(void); 00091 afx_msg void OnDraw(CDC* pDC); 00092 afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 00093 afx_msg void OnLButtonUp(UINT nFlags, CPoint point); 00094 afx_msg void OnMouseMove(UINT nFlags, CPoint point); 00095 afx_msg BOOL OnEraseBkgnd(CDC* pDC); 00096 afx_msg void OnSize(UINT nType, int cx, int cy); 00097 //}}AFX_MSG 00098 DECLARE_MESSAGE_MAP() 00099 00100 public: 00101 00102 }; 00103 00104 00105 00106 #ifndef _DEBUG 00107 00108 inline CLogWndDoc* CLogWndView::GetDocument() const { return reinterpret_cast<CLogWndDoc*>(m_pDocument); } 00109 00110 #endif 00111 00112 00113 00114 } // namespace