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.

55 lines
2.4 KiB

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1995 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 AFXRICH2.H
  11. // CRichEdit2View
  12. _AFXRICH2_INLINE CRichEdit2Ctrl& CRichEdit2View::GetRichEditCtrl() const
  13. { return *(CRichEdit2Ctrl*)this; }
  14. int _AFXRICH2_INLINE CRichEdit2View::GetPrintWidth() const
  15. { return m_sizePaper.cx - m_rectMargin.left - m_rectMargin.right;}
  16. CRect _AFXRICH2_INLINE CRichEdit2View::GetPrintRect() const
  17. { return CRect(m_rectMargin.left, m_rectMargin.top, m_sizePaper.cx - m_rectMargin.right, m_sizePaper.cy - m_rectMargin.bottom); }
  18. CRect _AFXRICH2_INLINE CRichEdit2View::GetPageRect() const
  19. { return CRect(CPoint(0,0), m_sizePaper); }
  20. void _AFXRICH2_INLINE CRichEdit2View::SetPaperSize(CSize sizePaper)
  21. { m_sizePaper = sizePaper; }
  22. CSize _AFXRICH2_INLINE CRichEdit2View::GetPaperSize() const
  23. { return m_sizePaper; }
  24. void _AFXRICH2_INLINE CRichEdit2View::SetMargins(const CRect& rectMargin)
  25. { m_rectMargin = rectMargin; }
  26. CRect _AFXRICH2_INLINE CRichEdit2View::GetMargins() const
  27. { return m_rectMargin; }
  28. _AFXRICH2_INLINE long CRichEdit2View::GetTextLength() const
  29. { return GetRichEditCtrl().GetTextLength(); }
  30. _AFXRICH2_INLINE CRichEdit2Doc* CRichEdit2View::GetDocument() const
  31. {
  32. ASSERT(m_pDocument != NULL);
  33. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRichEdit2Doc)));
  34. return (CRichEdit2Doc*)m_pDocument;
  35. }
  36. _AFXRICH2_INLINE int CRichEdit2Doc::GetStreamFormat() const
  37. { return m_bRTF ? SF_RTF : SF_TEXT; }
  38. _AFXRICH2_INLINE BOOL CRichEdit2Doc::IsUnicode() const
  39. { return m_bUnicode; }
  40. _AFXRICH2_INLINE void CRichEdit2Doc::InvalidateObjectCache()
  41. { m_bUpdateObjectCache = TRUE; }
  42. _AFXRICH2_INLINE void CRichEdit2CntrItem::Mark(BOOL b)
  43. { m_bMark = b; }
  44. _AFXRICH2_INLINE BOOL CRichEdit2CntrItem::IsMarked()
  45. { return m_bMark||m_bLock; }
  46. _AFXRICH2_INLINE CRichEdit2Doc* CRichEdit2CntrItem::GetDocument()
  47. { return (CRichEdit2Doc*)COleClientItem::GetDocument(); }
  48. _AFXRICH2_INLINE CRichEdit2View* CRichEdit2CntrItem::GetActiveView()
  49. { return (CRichEdit2View*)COleClientItem::GetActiveView(); }
  50. /////////////////////////////////////////////////////////////////////////////