📄 rb_treeview.h
字号:
// RB_TreeView.h : interface of the CRB_TreeView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_RB_TREEVIEW_H__F26ED7D9_0538_4D17_ACD3_5D8993F63188__INCLUDED_)
#define AFX_RB_TREEVIEW_H__F26ED7D9_0538_4D17_ACD3_5D8993F63188__INCLUDED_
#include "RedBlackTree.h"
#include "MemPooler.h"
#include "Input.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CRB_TreeView : public CView
{
protected: // create from serialization only
CRB_TreeView();
DECLARE_DYNCREATE(CRB_TreeView)
// Attributes
public:
CRB_TreeDoc* GetDocument();
RedBlackTree<RedBlackTreeNode>* RBTree;
// CMMemPooler<RedBlackTreeNode>* MemPool;
CMMemPooler<RedBlackTreeNode> MemPool;
CInput InputDlg;
// Operations
public:
void TreeDraw(RedBlackTree<RedBlackTreeNode>* bt);
void TreeOnDraw(RedBlackTreeNode *root, RedBlackTreeNode *nil, int width, int depth);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CRB_TreeView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CRB_TreeView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CRB_TreeView)
afx_msg void OnInsert();
afx_msg void OnDelete();
afx_msg void OnSearch();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
char* SearchValue;
bool IsSearch;
};
#ifndef _DEBUG // debug version in RB_TreeView.cpp
inline CRB_TreeDoc* CRB_TreeView::GetDocument()
{ return (CRB_TreeDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_RB_TREEVIEW_H__F26ED7D9_0538_4D17_ACD3_5D8993F63188__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -