⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtredoc.h

📁 cy7c68013目前最流行的几种gps芯片的控制定制程序的源代码
💻 H
字号:
////////////////////////////////////////////////////////////////////////////////
// RTreDoc.h : interface of the CRTreDoc class
// $Header: /USB/Util/EzMr/RTreDoc.h 3     8/08/00 2:26p Tpm $
// Copyright (c) 2000 Cypress Semiconductor. May not be reproduced without permission.
// See the EzUsb Developer's Kit license agreement for more details.
////////////////////////////////////////////////////////////////////////////////


// define tree view types to display a USB tree
#define RT_NODE_ROOT 0
#define RT_NODE_HOST 1
#define RT_NODE_HUB  2
#define RT_NODE_PORT 3
#define RT_NODE_DEV  4
//#define RT_NODE_CONF 5
#define RT_NODE_INTF 5
#define RT_NODE_ENDP 6
#define RT_NODE_PIPE 7
#define RT_NODE_NUM  8

#define STR_RT_NODE_ROOT "root"
#define STR_RT_NODE_HOST "host"
#define STR_RT_NODE_HUB  "hub"
#define STR_RT_NODE_PORT "port"
#define STR_RT_NODE_DEV  "dev"
//#define STR_RT_NODE_CONF "conf"
#define STR_RT_NODE_INTF "intf"
#define STR_RT_NODE_ENDP "endp"
#define STR_RT_NODE_PIPE "pipe"

class CTreeItem : public CObject
{
// Construction
public:
    DECLARE_SERIAL(CTreeItem);
    //CTreeItem() : m_szName("Init"), m_szType("Init"), m_szParent("Init") {}
    CTreeItem(CString i_szName="", CString i_szType="", CString i_szParent="", int i_nType=0)
	  {m_szName=i_szName; m_szType=i_szType; m_szParent=i_szParent; m_nType=i_nType;}
 
// Attributes

    CTypedPtrArray<CPtrArray, CTreeItem*> m_childrenItems;

    CString m_szName;
    CString m_szType;
    CString m_szParent;
	int m_nType;

// Operations
    void DeleteAllItems()
         { int size = m_childrenItems.GetSize();
           while (--size >= 0)
           {
               CTreeItem* child = m_childrenItems[size];
               child->DeleteAllItems();
           }
           delete this;
         }
               
// Overrides

    void Serialize( CArchive& ar );

#ifdef _DEBUG
   virtual void AssertValid() const {}
   virtual void Dump(CDumpContext& dc) const {}
#endif
// Implementation
   virtual ~CTreeItem(){ }
};


class CRTreHint : public CObject
{
// Construction
public:
    CRTreHint() {}
 
// Attributes
    enum
    {
        documentIsOpen = 3
    };


// Operations
               
// Overrides
#ifdef _DEBUG
   virtual void AssertValid() const {}
   virtual void Dump(CDumpContext& dc) const {}
#endif
// Implementation
    virtual ~CRTreHint() {}
};


class CRTreDoc : public CDocument
{
protected: // create from serialization only
   CRTreDoc();
   DECLARE_DYNCREATE(CRTreDoc)

// Attributes
public:
   BOOL IsOpen() { return m_bIsOpen; }
    CTreeItem* m_pRootItem;

// Operations
public:
	void CRTreDoc::upd_tree(void);
	void CRTreDoc::def_tree(void);

// Overrides
   // ClassWizard generated virtual function overrides
   //{{AFX_VIRTUAL(CRTreDoc)
   public:
   virtual BOOL OnNewDocument();
    virtual BOOL OnOpenDocument(LPCTSTR lpszFileName);
   virtual void Serialize(CArchive& ar);
   //}}AFX_VIRTUAL

// Implementation
public:
   virtual ~CRTreDoc();
#ifdef _DEBUG
   virtual void AssertValid() const;
   virtual void Dump(CDumpContext& dc) const;
#endif

protected:
    BOOL m_bIsOpen;

// Generated message map functions
protected:
   //{{AFX_MSG(CRTreDoc)
      // NOTE - the ClassWizard will add and remove member functions here.
      //    DO NOT EDIT what you see in these blocks of generated code !
   //}}AFX_MSG
   DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -