Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.4 KiB

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10. // Inlines for AFXRICH.H
  11. #ifdef _AFXRICH_INLINE
  12. // CRichEditView
  13. _AFXRICH_INLINE CRichEditCtrl& CRichEditView::GetRichEditCtrl() const
  14. { return *(CRichEditCtrl*)this; }
  15. int _AFXRICH_INLINE CRichEditView::GetPrintWidth() const
  16. { return m_sizePaper.cx - m_rectMargin.left - m_rectMargin.right;}
  17. CRect _AFXRICH_INLINE CRichEditView::GetPrintRect() const
  18. { return CRect(m_rectMargin.left, m_rectMargin.top, m_sizePaper.cx - m_rectMargin.right, m_sizePaper.cy - m_rectMargin.bottom); }
  19. CRect _AFXRICH_INLINE CRichEditView::GetPageRect() const
  20. { return CRect(CPoint(0,0), m_sizePaper); }
  21. void _AFXRICH_INLINE CRichEditView::SetPaperSize(CSize sizePaper)
  22. { m_sizePaper = sizePaper; }
  23. CSize _AFXRICH_INLINE CRichEditView::GetPaperSize() const
  24. { return m_sizePaper; }
  25. void _AFXRICH_INLINE CRichEditView::SetMargins(const CRect& rectMargin)
  26. { m_rectMargin = rectMargin; }
  27. CRect _AFXRICH_INLINE CRichEditView::GetMargins() const
  28. { return m_rectMargin; }
  29. _AFXRICH_INLINE long CRichEditView::GetTextLength() const
  30. { return GetRichEditCtrl().GetTextLength(); }
  31. _AFXRICH_INLINE CRichEditDoc* CRichEditView::GetDocument() const
  32. {
  33. ASSERT(m_pDocument != NULL);
  34. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRichEditDoc)));
  35. return (CRichEditDoc*)m_pDocument;
  36. }
  37. _AFXRICH_INLINE int CRichEditDoc::GetStreamFormat() const
  38. { return m_bRTF ? SF_RTF : SF_TEXT; }
  39. _AFXRICH_INLINE void CRichEditDoc::InvalidateObjectCache()
  40. { m_bUpdateObjectCache = TRUE; }
  41. _AFXRICH_INLINE void CRichEditCntrItem::Mark(BOOL b)
  42. { m_bMark = b; }
  43. _AFXRICH_INLINE BOOL CRichEditCntrItem::IsMarked()
  44. { return m_bMark||m_bLock; }
  45. _AFXRICH_INLINE CRichEditDoc* CRichEditCntrItem::GetDocument()
  46. { return (CRichEditDoc*)COleClientItem::GetDocument(); }
  47. _AFXRICH_INLINE CRichEditView* CRichEditCntrItem::GetActiveView()
  48. { return (CRichEditView*)COleClientItem::GetActiveView(); }
  49. #endif //_AFXRICH_INLINE
  50. /////////////////////////////////////////////////////////////////////////////