Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CRichViewCtrl Class Reference

#include <RichViewCtrl.h>

Inheritance diagram for CRichViewCtrl:

CHomeViewCtrl List of all members.

Public Member Functions

 CRichViewCtrl ()
virtual ~CRichViewCtrl ()
void SetSyncObject (CSyncObject *pSyncRoot)
void SetSelectable (BOOL bSelectable)
void SetFollowBottom (BOOL bFollowBottom)
void SetDefaultLink (BOOL bDefaultLink)
void SetDocument (CRichDocument *pDocument)
BOOL IsModified () const
void InvalidateIfModified ()
int FullHeightMove (int nX, int nY, int nWidth, BOOL bShow=FALSE)
BOOL GetElementRect (CRichElement *pElement, RECT *prc)
virtual BOOL Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID)

Protected Member Functions

void ClearFragments ()
void Layout (CDC *pDC, CRect *pRect)
void WrapLineHelper (CPtrList &pLine, CPoint &pt, int &nLineHeight, int nWidth, int nAlign)
CRichFragmentPointToFrag (CPoint &pt)
RICHPOSITION PointToPosition (CPoint &pt)
CPoint PositionToPoint (RICHPOSITION &pt)
void UpdateSelection ()
void CopySelection ()
virtual void OnLayoutComplete ()
virtual void OnPaintBegin (CDC *pDC)
virtual void OnPaintComplete (CDC *pDC)
virtual void OnVScrolled ()
afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void OnDestroy ()
afx_msg BOOL OnEraseBkgnd (CDC *pDC)
afx_msg void OnPaint ()
afx_msg void OnSize (UINT nType, int cx, int cy)
afx_msg BOOL OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void OnMouseMove (UINT nFlags, CPoint point)
afx_msg void OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void OnVScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void OnTimer (UINT nIDEvent)
afx_msg BOOL OnMouseWheel (UINT nFlags, short zDelta, CPoint pt)

Protected Attributes

CSyncObject * m_pSyncRoot
BOOL m_bSelectable
BOOL m_bFollowBottom
BOOL m_bDefaultLink
CRichDocumentm_pDocument
DWORD m_nCookie
CPtrArray m_pFragments
int m_nLength
int m_nScrollWheelLines
CRichElementm_pHover
BOOL m_bSelecting
RICHPOSITION m_pSelStart
RICHPOSITION m_pSelEnd
RICHPOSITION m_pSelAbsStart
RICHPOSITION m_pSelAbsEnd
HCURSOR m_hcHand
HCURSOR m_hcText
CBrush m_pBrush

Friends

class CRichFragment

Constructor & Destructor Documentation

CRichViewCtrl::CRichViewCtrl  ) 
 

Definition at line 58 of file RichViewCtrl.cpp.

References NULL.

CRichViewCtrl::~CRichViewCtrl  )  [virtual]
 

Definition at line 76 of file RichViewCtrl.cpp.

References ClearFragments().


Member Function Documentation

void CRichViewCtrl::ClearFragments  )  [protected]
 

Definition at line 481 of file RichViewCtrl.cpp.

References m_bSelecting, m_nLength, m_pFragments, m_pSelAbsEnd, m_pSelAbsStart, m_pSelEnd, m_pSelStart, RICHPOSITION::nFragment, and RICHPOSITION::nOffset.

Referenced by Layout(), SetDocument(), and ~CRichViewCtrl().

void CRichViewCtrl::CopySelection  )  [protected]
 

Definition at line 867 of file RichViewCtrl.cpp.

References Emoticons, CRichDocument::Find(), CRichDocument::GetNext(), CEmoticons::GetText(), CShareazaApp::m_bNT, CRichFragment::m_nLength, CRichFragment::m_nOffset, CRichElement::m_nType, m_pDocument, CRichFragment::m_pElement, m_pFragments, m_pSelAbsEnd, m_pSelAbsStart, CRichElement::m_sText, RICHPOSITION::nFragment, RICHPOSITION::nOffset, retEmoticon, retNewline, retText, and theApp.

Referenced by OnLButtonUp().

BOOL CRichViewCtrl::Create DWORD  dwStyle,
const RECT &  rect,
CWnd *  pParentWnd,
UINT  nID
[virtual]
 

Definition at line 84 of file RichViewCtrl.cpp.

References NULL.

Referenced by CHomeViewCtrl::Create(), CSearchDetailPanel::Review::Layout(), CHelpWnd::OnCreate(), CRichTaskBox::OnCreate(), CChatFrame::OnCreate(), CBrowseProfileCtrl::OnCreate(), CRichSettingsPage::OnInitDialog(), and CHelpDlg::OnInitDialog().

int CRichViewCtrl::FullHeightMove int  nX,
int  nY,
int  nWidth,
BOOL  bShow = FALSE
 

Definition at line 126 of file RichViewCtrl.cpp.

References Layout(), CShareazaApp::m_gdiFont, m_nLength, m_pDocument, NULL, and theApp.

Referenced by CSearchDetailPanel::Review::Layout(), CRichTaskBox::OnSize(), CHomeLibraryBox::OnSize(), CHomeDownloadsBox::OnSize(), CRichTaskBox::Update(), CHomeLibraryBox::Update(), and CHomeDownloadsBox::Update().

BOOL CRichViewCtrl::GetElementRect CRichElement pElement,
RECT *  prc
 

Definition at line 142 of file RichViewCtrl.cpp.

References CRichFragment::m_pElement, m_pFragments, CRichFragment::m_pt, and CRichFragment::m_sz.

Referenced by CHomeViewCtrl::OnLayoutComplete(), and CHomeViewCtrl::OnPaintBegin().

void CRichViewCtrl::InvalidateIfModified  ) 
 

Definition at line 121 of file RichViewCtrl.cpp.

References m_nCookie, CRichDocument::m_nCookie, m_pDocument, and NULL.

Referenced by CChatFrame::AddText(), CChatFrame::OnChatClear(), CChatFrame::OnStatusMessage(), CHomeViewCtrl::Update(), CBrowseProfileCtrl::UpdateDocument1(), and CBrowseProfileCtrl::UpdateDocument2().

BOOL CRichViewCtrl::IsModified  )  const
 

Definition at line 116 of file RichViewCtrl.cpp.

References m_nCookie, CRichDocument::m_nCookie, m_pDocument, and NULL.

Referenced by CRichTaskBox::Update().

void CRichViewCtrl::Layout CDC *  pDC,
CRect *  pRect
[protected]
 

Definition at line 503 of file RichViewCtrl.cpp.

References CRichFragment::Add(), ClearFragments(), CRichFragment, CRichDocument::GetIterator(), CRichDocument::GetNext(), m_bFollowBottom, CRichDocument::m_nCookie, m_nCookie, CRichElement::m_nFlags, m_nLength, CRichFragment::m_nOffset, CRichElement::m_nType, m_pDocument, m_pFragments, CRichDocument::m_pSection, CRichFragment::m_pt, CRichElement::m_sText, CRichFragment::m_sz, CRichDocument::m_szMargin, NULL, OnLayoutComplete(), CRichElement::PrePaint(), reaCenter, reaLeft, reaRight, retAlign, retfHidden, retGap, retNewline, retText, and WrapLineHelper().

Referenced by FullHeightMove(), and OnPaint().

int CRichViewCtrl::OnCreate LPCREATESTRUCT  lpCreateStruct  )  [protected]
 

Reimplemented in CHomeViewCtrl.

Definition at line 165 of file RichViewCtrl.cpp.

References IDC_HAND, CShareazaApp::m_bRTL, m_hcHand, m_hcText, and theApp.

Referenced by CHomeViewCtrl::OnCreate().

void CRichViewCtrl::OnDestroy  )  [protected]
 

Reimplemented in CHomeViewCtrl.

Definition at line 178 of file RichViewCtrl.cpp.

Referenced by CHomeViewCtrl::OnDestroy().

BOOL CRichViewCtrl::OnEraseBkgnd CDC *  pDC  )  [protected]
 

Definition at line 190 of file RichViewCtrl.cpp.

virtual void CRichViewCtrl::OnLayoutComplete  )  [inline, protected, virtual]
 

Reimplemented in CHomeViewCtrl.

Definition at line 90 of file RichViewCtrl.h.

Referenced by Layout().

void CRichViewCtrl::OnLButtonDown UINT  nFlags,
CPoint  point
[protected]
 

Definition at line 280 of file RichViewCtrl.cpp.

References m_bSelectable, m_bSelecting, m_pDocument, CRichDocument::m_pSection, m_pSelEnd, m_pSelStart, RICHPOSITION::nFragment, NULL, PointToPosition(), and UpdateSelection().

void CRichViewCtrl::OnLButtonUp UINT  nFlags,
CPoint  point
[protected]
 

Definition at line 356 of file RichViewCtrl.cpp.

References CopySelection(), RVN_ELEMENTEVENT::hdr, m_bDefaultLink, m_bSelecting, CRichElement::m_nType, m_pDocument, m_pHover, CRichDocument::m_pSection, m_pSelEnd, m_pSelStart, RICHPOSITION::nFragment, RICHPOSITION::nOffset, NULL, RVN_ELEMENTEVENT::pElement, PointToFrag(), retLink, RVN_CLICK, and UpdateSelection().

void CRichViewCtrl::OnMouseMove UINT  nFlags,
CPoint  point
[protected]
 

Definition at line 303 of file RichViewCtrl.cpp.

References m_bSelecting, CRichElement::m_nType, m_pDocument, CRichFragment::m_pElement, m_pHover, CRichDocument::m_pSection, m_pSelEnd, m_pSelStart, RICHPOSITION::nFragment, NULL, PointToFrag(), PointToPosition(), retLink, and UpdateSelection().

BOOL CRichViewCtrl::OnMouseWheel UINT  nFlags,
short  zDelta,
CPoint  pt
[protected]
 

Definition at line 472 of file RichViewCtrl.cpp.

References m_nScrollWheelLines, NULL, and OnVScroll().

void CRichViewCtrl::OnPaint  )  [protected]
 

Definition at line 195 of file RichViewCtrl.cpp.

References Layout(), CRichDocument::m_crBackground, CShareazaApp::m_gdiFont, m_nCookie, CRichDocument::m_nCookie, m_pBrush, m_pDocument, CRichFragment::m_pElement, m_pFragments, m_pHover, CRichDocument::m_pSection, NULL, OnPaintBegin(), OnPaintComplete(), CRichFragment::Paint(), CRichElement::PrePaint(), and theApp.

virtual void CRichViewCtrl::OnPaintBegin CDC *  pDC  )  [inline, protected, virtual]
 

Reimplemented in CHomeViewCtrl.

Definition at line 91 of file RichViewCtrl.h.

Referenced by OnPaint().

virtual void CRichViewCtrl::OnPaintComplete CDC *  pDC  )  [inline, protected, virtual]
 

Definition at line 92 of file RichViewCtrl.h.

Referenced by OnPaint().

BOOL CRichViewCtrl::OnSetCursor CWnd *  pWnd,
UINT  nHitTest,
UINT  message
[protected]
 

Definition at line 250 of file RichViewCtrl.cpp.

References m_bSelectable, m_bSelecting, m_hcHand, m_hcText, CRichFragment::m_nLength, m_pDocument, CRichFragment::m_pElement, CRichDocument::m_pSection, CRichElement::m_sLink, NULL, and PointToFrag().

void CRichViewCtrl::OnSize UINT  nType,
int  cx,
int  cy
[protected]
 

Definition at line 183 of file RichViewCtrl.cpp.

References m_nCookie.

void CRichViewCtrl::OnTimer UINT  nIDEvent  )  [protected]
 

Definition at line 453 of file RichViewCtrl.cpp.

References m_pHover, and NULL.

void CRichViewCtrl::OnVScroll UINT  nSBCode,
UINT  nPos,
CScrollBar *  pScrollBar
[protected]
 

Definition at line 410 of file RichViewCtrl.cpp.

References OnVScrolled().

Referenced by OnMouseWheel().

virtual void CRichViewCtrl::OnVScrolled  )  [inline, protected, virtual]
 

Reimplemented in CHomeViewCtrl.

Definition at line 93 of file RichViewCtrl.h.

Referenced by OnVScroll().

CRichFragment * CRichViewCtrl::PointToFrag CPoint &  pt  )  [protected]
 

Definition at line 723 of file RichViewCtrl.cpp.

References m_nCookie, CRichDocument::m_nCookie, m_pDocument, m_pFragments, CRichFragment::m_pt, CRichFragment::m_sz, and NULL.

Referenced by OnLButtonUp(), OnMouseMove(), and OnSetCursor().

RICHPOSITION CRichViewCtrl::PointToPosition CPoint &  pt  )  [protected]
 

Definition at line 747 of file RichViewCtrl.cpp.

References m_nCookie, CRichDocument::m_nCookie, CRichFragment::m_nLength, CRichFragment::m_nOffset, m_pDocument, CRichFragment::m_pElement, m_pFragments, CRichFragment::m_pt, CRichElement::m_sText, CRichFragment::m_sz, RICHPOSITION::nFragment, RICHPOSITION::nOffset, NULL, and CRichElement::PrePaint().

Referenced by OnLButtonDown(), and OnMouseMove().

CPoint CRichViewCtrl::PositionToPoint RICHPOSITION pt  )  [protected]
 

Definition at line 796 of file RichViewCtrl.cpp.

References m_nCookie, CRichDocument::m_nCookie, CRichFragment::m_nLength, CRichFragment::m_nOffset, m_pDocument, CRichFragment::m_pElement, m_pFragments, CRichFragment::m_pt, CRichElement::m_sText, CRichFragment::m_sz, RICHPOSITION::nFragment, RICHPOSITION::nOffset, NULL, and CRichElement::PrePaint().

void CRichViewCtrl::SetDefaultLink BOOL  bDefaultLink  ) 
 

Definition at line 100 of file RichViewCtrl.cpp.

References m_bDefaultLink.

void CRichViewCtrl::SetDocument CRichDocument pDocument  ) 
 

Definition at line 105 of file RichViewCtrl.cpp.

References ClearFragments(), m_nCookie, m_pDocument, m_pHover, and NULL.

Referenced by CSearchDetailPanel::Review::Layout(), CChatFrame::OnCreate(), CRichSettingsPage::OnInitDialog(), CHelpDlg::OnInitDialog(), CBrowseProfileCtrl::OnSkinChange(), CRichTaskBox::SetDocument(), and CHomeViewCtrl::Setup().

void CRichViewCtrl::SetFollowBottom BOOL  bFollowBottom  ) 
 

Definition at line 95 of file RichViewCtrl.cpp.

References m_bFollowBottom.

Referenced by CChatFrame::OnCreate().

void CRichViewCtrl::SetSelectable BOOL  bSelectable  ) 
 

Definition at line 90 of file RichViewCtrl.cpp.

References m_bSelectable.

Referenced by CSearchDetailPanel::Review::Layout(), CChatFrame::OnCreate(), CBrowseProfileCtrl::OnCreate(), and CHelpDlg::OnInitDialog().

void CRichViewCtrl::SetSyncObject CSyncObject *  pSyncRoot  ) 
 

void CRichViewCtrl::UpdateSelection  )  [protected]
 

Definition at line 839 of file RichViewCtrl.cpp.

References m_pSelAbsEnd, m_pSelAbsStart, m_pSelEnd, m_pSelStart, RICHPOSITION::nFragment, and RICHPOSITION::nOffset.

Referenced by OnLButtonDown(), OnLButtonUp(), and OnMouseMove().

void CRichViewCtrl::WrapLineHelper CPtrList &  pLine,
CPoint &  pt,
int &  nLineHeight,
int  nWidth,
int  nAlign
[protected]
 

Definition at line 681 of file RichViewCtrl.cpp.

References CRichElement::m_nFlags, CRichFragment::m_pElement, CRichFragment::m_pt, CRichFragment::m_sz, reaCenter, reaRight, and retfMiddle.

Referenced by Layout().


Friends And Related Function Documentation

friend class CRichFragment [friend]
 

Definition at line 120 of file RichViewCtrl.h.

Referenced by Layout().


Member Data Documentation

BOOL CRichViewCtrl::m_bDefaultLink [protected]
 

Definition at line 50 of file RichViewCtrl.h.

Referenced by OnLButtonUp(), and SetDefaultLink().

BOOL CRichViewCtrl::m_bFollowBottom [protected]
 

Definition at line 49 of file RichViewCtrl.h.

Referenced by Layout(), and SetFollowBottom().

BOOL CRichViewCtrl::m_bSelectable [protected]
 

Definition at line 48 of file RichViewCtrl.h.

Referenced by OnLButtonDown(), OnSetCursor(), and SetSelectable().

BOOL CRichViewCtrl::m_bSelecting [protected]
 

Definition at line 59 of file RichViewCtrl.h.

Referenced by ClearFragments(), OnLButtonDown(), OnLButtonUp(), OnMouseMove(), and OnSetCursor().

HCURSOR CRichViewCtrl::m_hcHand [protected]
 

Definition at line 65 of file RichViewCtrl.h.

Referenced by OnCreate(), and OnSetCursor().

HCURSOR CRichViewCtrl::m_hcText [protected]
 

Definition at line 66 of file RichViewCtrl.h.

Referenced by OnCreate(), and OnSetCursor().

DWORD CRichViewCtrl::m_nCookie [protected]
 

Definition at line 53 of file RichViewCtrl.h.

Referenced by InvalidateIfModified(), IsModified(), Layout(), OnPaint(), OnSize(), PointToFrag(), PointToPosition(), PositionToPoint(), and SetDocument().

int CRichViewCtrl::m_nLength [protected]
 

Definition at line 55 of file RichViewCtrl.h.

Referenced by ClearFragments(), FullHeightMove(), and Layout().

int CRichViewCtrl::m_nScrollWheelLines [protected]
 

Definition at line 56 of file RichViewCtrl.h.

Referenced by OnMouseWheel().

CBrush CRichViewCtrl::m_pBrush [protected]
 

Definition at line 67 of file RichViewCtrl.h.

Referenced by OnPaint(), and CRichFragment::Paint().

CRichDocument* CRichViewCtrl::m_pDocument [protected]
 

Reimplemented in CHomeViewCtrl.

Definition at line 52 of file RichViewCtrl.h.

Referenced by CopySelection(), FullHeightMove(), InvalidateIfModified(), IsModified(), Layout(), OnLButtonDown(), OnLButtonUp(), OnMouseMove(), OnPaint(), OnSetCursor(), PointToFrag(), PointToPosition(), PositionToPoint(), and SetDocument().

CPtrArray CRichViewCtrl::m_pFragments [protected]
 

Definition at line 54 of file RichViewCtrl.h.

Referenced by ClearFragments(), CopySelection(), GetElementRect(), Layout(), OnPaint(), PointToFrag(), PointToPosition(), and PositionToPoint().

CRichElement* CRichViewCtrl::m_pHover [protected]
 

Definition at line 58 of file RichViewCtrl.h.

Referenced by OnLButtonUp(), OnMouseMove(), OnPaint(), OnTimer(), and SetDocument().

RICHPOSITION CRichViewCtrl::m_pSelAbsEnd [protected]
 

Definition at line 63 of file RichViewCtrl.h.

Referenced by ClearFragments(), CopySelection(), CRichFragment::Paint(), and UpdateSelection().

RICHPOSITION CRichViewCtrl::m_pSelAbsStart [protected]
 

Definition at line 62 of file RichViewCtrl.h.

Referenced by ClearFragments(), CopySelection(), CRichFragment::Paint(), and UpdateSelection().

RICHPOSITION CRichViewCtrl::m_pSelEnd [protected]
 

Definition at line 61 of file RichViewCtrl.h.

Referenced by ClearFragments(), OnLButtonDown(), OnLButtonUp(), OnMouseMove(), and UpdateSelection().

RICHPOSITION CRichViewCtrl::m_pSelStart [protected]
 

Definition at line 60 of file RichViewCtrl.h.

Referenced by ClearFragments(), OnLButtonDown(), OnLButtonUp(), OnMouseMove(), and UpdateSelection().

CSyncObject* CRichViewCtrl::m_pSyncRoot [protected]
 

Definition at line 47 of file RichViewCtrl.h.


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:11 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2