📄 view.h
字号:
// view.h : interface of the DView class
//
/////////////////////////////////////////////////////////////////////////////
class DMainFrame;
class DView : public CView
{
protected: // create from serialization only
DView();
DECLARE_DYNCREATE(DView)
// Attributes
public:
DDoc* GetDocument();
DMainFrame* GetFrame();
// ============== Begin Attributes formerly in FILELIST ==============
BOOL d_bTabs; // Respect tabs or not.
CFontDialog * d_pSetFont; // Ptr to Font Picker dialog.
CFont * d_pFont; // Ptr to CFont object.
LOGFONT d_lf; // Current logical font.
LPINT d_pnTabs; // Array of tab settings.
int d_cyLineHeight; // Height of one line of text.
int d_clHeight; // Window height line count.
int d_iTopLine; // Index of top-most line.
int d_cyClient; // Window client area height.
int d_cxLeftMargin; // Margin to left of text.
// ============== End Attributes formerly in FILELIST ==============
// Operations
public:
BOOL CreateNewFont();
void ResetScrollValues();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(DView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
protected:
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~DView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(DView)
afx_msg void CmdFormatFont();
afx_msg void CmdFormatTabs();
afx_msg void UpdFormatTabs(CCmdUI* pCmdUI);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in view.cpp
inline DDoc* DView::GetDocument()
{ return (DDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -