home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / appwiz / hierwiz / template / svrdoc.h < prev    next >
C/C++ Source or Header  |  1998-03-05  |  2KB  |  70 lines

  1. // svrdoc.h : interface of the CServerDoc class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and Microsoft
  9. // QuickHelp and/or WinHelp documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #define MAX_LEVEL   20
  14.  
  15. class CServerNode;
  16.  
  17. class CServerDoc : public COleServerDoc
  18. {
  19. protected: // create from serialization only
  20.     CServerDoc();
  21.     DECLARE_DYNCREATE(CServerDoc)
  22.  
  23. // Attributes
  24. public:
  25.     LOGFONT m_logfont;          // font in use for the document
  26.     COLORREF m_crText;
  27.     CServerNode* m_pRoot;
  28.  
  29.     // private clipboard format
  30.     static CLIPFORMAT NEAR m_cfPrivate;
  31.  
  32. // Operations
  33. public:
  34.     CFont* SelectDocFont(CDC* pDC, CFont& font);
  35.     int CServerDoc::DrawTree(CDC* pDC, CPoint ptStart, CServerNode* pItemSel,
  36.         CServerNode* pRoot = NULL);
  37.     void CalcBounding(CDC* pDC, CServerNode* pItemStart,
  38.         CPoint ptStart, CSize& sizeMax);
  39. $$IF(WANTS_TEXTVIEW)
  40.     int CServerDoc::GetTreeText(CString * strBuf,CServerNode* pRoot) ;
  41. $$ENDIF
  42.  
  43. // Implementation
  44. public:
  45.     virtual COleServerItem* OnGetEmbeddedItem();
  46.     virtual COleServerItem* OnGetLinkedItem(LPCTSTR lpszItemName);
  47.     virtual ~CServerDoc();
  48.     virtual void Serialize(CArchive& ar);   // overridden for document i/o
  49.     void SerializeFontInfo(CArchive& ar);
  50.     virtual void DeleteContents();
  51.     virtual void OnSetItemRects(LPCRECT lpPosRect, LPCRECT lpClipRect);
  52. #ifdef _DEBUG
  53.     virtual void AssertValid() const;
  54.     virtual void Dump(CDumpContext& dc) const;
  55. #endif
  56. protected:
  57.     virtual BOOL    OnNewDocument();
  58.  
  59. // Generated message map functions
  60. protected:
  61.     //{{AFX_MSG(CServerDoc)
  62.     afx_msg void OnOptionsFont();
  63.     afx_msg void OnCancelInplace();
  64.     afx_msg void OnFileNew();
  65.     //}}AFX_MSG
  66.     DECLARE_MESSAGE_MAP()
  67. };
  68.  
  69. /////////////////////////////////////////////////////////////////////////////
  70.