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

CRichDocument Class Reference

#include <RichDocument.h>

List of all members.

Public Member Functions

 CRichDocument ()
virtual ~CRichDocument ()
POSITION GetIterator () const
CRichElementGetNext (POSITION &pos) const
CRichElementGetPrev (POSITION &pos) const
int GetCount () const
POSITION Find (CRichElement *pElement) const
CRichElementAdd (CRichElement *pElement, POSITION posBefore=NULL)
CRichElementAdd (int nType, LPCTSTR pszText, LPCTSTR pszLink=NULL, DWORD nFlags=0, int nGroup=0, POSITION posBefore=NULL)
void Remove (CRichElement *pElement)
void ShowGroup (int nGroup, BOOL bShow=TRUE)
void ShowGroupRange (int nMin, int nMax, BOOL bShow=TRUE)
void SetModified ()
void Clear ()
BOOL LoadXML (CXMLElement *pBase, CMapStringToPtr *pMap=NULL, int nGroup=0)
void CreateFonts (LPCTSTR pszFaceName=theApp.m_sDefaultFont, int nSize=12)

Public Attributes

CCriticalSection m_pSection
CPtrList m_pElements
DWORD m_nCookie
CSize m_szMargin
COLORREF m_crBackground
COLORREF m_crText
COLORREF m_crLink
COLORREF m_crHover
COLORREF m_crHeading
CFont m_fntNormal
CFont m_fntBold
CFont m_fntItalic
CFont m_fntUnder
CFont m_fntBoldUnder
CFont m_fntHeading

Protected Member Functions

BOOL LoadXMLStyles (CXMLElement *pParent)
BOOL LoadXMLColour (CXMLElement *pXML, LPCTSTR pszName, COLORREF *pColour)


Constructor & Destructor Documentation

CRichDocument::CRichDocument  ) 
 

Definition at line 38 of file RichDocument.cpp.

References m_crBackground, m_crHeading, m_crHover, m_crLink, m_crText, and m_nCookie.

CRichDocument::~CRichDocument  )  [virtual]
 

Definition at line 48 of file RichDocument.cpp.

References Clear().


Member Function Documentation

CRichElement * CRichDocument::Add int  nType,
LPCTSTR  pszText,
LPCTSTR  pszLink = NULL,
DWORD  nFlags = 0,
int  nGroup = 0,
POSITION  posBefore = NULL
 

Definition at line 99 of file RichDocument.cpp.

References Add().

CRichElement * CRichDocument::Add CRichElement pElement,
POSITION  posBefore = NULL
 

Definition at line 84 of file RichDocument.cpp.

References m_nCookie, m_pElements, and m_pSection.

Referenced by Add(), CChatFrame::AddText(), CEmoticons::FormatText(), LoadXML(), CPrivateChatFrame::OnProfileReceived(), CChatFrame::OnStatusMessage(), and CBrowseProfileCtrl::UpdateDocument2().

void CRichDocument::Clear  ) 
 

Definition at line 145 of file RichDocument.cpp.

References GetIterator(), GetNext(), m_nCookie, m_pElements, and m_pSection.

Referenced by CChatFrame::OnChatClear(), CBrowseProfileCtrl::OnSkinChange(), CHomeViewCtrl::Setup(), and ~CRichDocument().

void CRichDocument::CreateFonts LPCTSTR  pszFaceName = theApp.m_sDefaultFont,
int  nSize = 12
 

Definition at line 161 of file RichDocument.cpp.

References m_fntBold, m_fntBoldUnder, m_fntHeading, m_fntItalic, m_fntNormal, m_fntUnder, and m_pSection.

Referenced by LoadXML(), LoadXMLStyles(), and CRichElement::PrePaint().

POSITION CRichDocument::Find CRichElement pElement  )  const
 

Definition at line 76 of file RichDocument.cpp.

References m_pElements.

Referenced by CRichViewCtrl::CopySelection(), and CBrowseProfileCtrl::UpdateDocument2().

int CRichDocument::GetCount  )  const
 

Definition at line 71 of file RichDocument.cpp.

References m_pElements.

Referenced by CSearchDetailPanel::Review::Layout(), and CSearchDetailPanel::Review::Paint().

POSITION CRichDocument::GetIterator  )  const
 

Definition at line 56 of file RichDocument.cpp.

References m_pElements.

Referenced by Clear(), CRichViewCtrl::Layout(), ShowGroup(), and ShowGroupRange().

CRichElement * CRichDocument::GetNext POSITION &  pos  )  const
 

Definition at line 61 of file RichDocument.cpp.

References m_pElements.

Referenced by Clear(), CRichViewCtrl::CopySelection(), CRichViewCtrl::Layout(), ShowGroup(), ShowGroupRange(), and CBrowseProfileCtrl::UpdateDocument2().

CRichElement * CRichDocument::GetPrev POSITION &  pos  )  const
 

Definition at line 66 of file RichDocument.cpp.

References m_pElements.

BOOL CRichDocument::LoadXML CXMLElement pBase,
CMapStringToPtr *  pMap = NULL,
int  nGroup = 0
 

Definition at line 205 of file RichDocument.cpp.

References Add(), CreateFonts(), CXMLElement::GetAttributeValue(), CXMLElement::GetElementCount(), CXMLNode::GetValue(), CXMLNode::IsNamed(), LoadXMLColour(), LoadXMLStyles(), CRichElement::m_cColour, m_crBackground, m_crHeading, m_crHover, m_crLink, m_crText, CRichElement::m_nFlags, CRichElement::m_nGroup, CRichElement::m_nType, m_pSection, CRichElement::m_sLink, CRichElement::m_sText, m_szMargin, NULL, retAlign, retAnchor, retBitmap, retCmdIcon, retfBold, retfColour, retfItalic, retfMiddle, retfUnderline, retGap, retHeading, retIcon, retLink, retNewline, and retText.

Referenced by CHelpDlg::OnInitDialog(), CBrowseProfileCtrl::OnSkinChange(), CHomeViewCtrl::Setup(), CHomeTorrentsBox::Setup(), CHomeConnectionBox::Setup(), CHomeUploadsBox::Setup(), CHomeLibraryBox::Setup(), and CHomeDownloadsBox::Setup().

BOOL CRichDocument::LoadXMLColour CXMLElement pXML,
LPCTSTR  pszName,
COLORREF *  pColour
[protected]
 

Definition at line 434 of file RichDocument.cpp.

Referenced by LoadXML(), and LoadXMLStyles().

BOOL CRichDocument::LoadXMLStyles CXMLElement pParent  )  [protected]
 

Definition at line 386 of file RichDocument.cpp.

References CreateFonts(), CXMLElement::GetAttributeValue(), CXMLElement::GetElementByName(), CXMLElement::GetElementIterator(), CXMLElement::GetNextElement(), CXMLNode::IsNamed(), LoadXMLColour(), m_crHeading, m_crHover, m_crLink, m_crText, m_fntHeading, CShareazaApp::m_nDefaultFontSize, CShareazaApp::m_sDefaultFont, NULL, and theApp.

Referenced by LoadXML().

void CRichDocument::Remove CRichElement pElement  ) 
 

Definition at line 105 of file RichDocument.cpp.

References m_nCookie, CRichElement::m_pDocument, m_pElements, m_pSection, and NULL.

Referenced by CRichElement::Delete().

void CRichDocument::SetModified  ) 
 

Definition at line 140 of file RichDocument.cpp.

References m_nCookie.

void CRichDocument::ShowGroup int  nGroup,
BOOL  bShow = TRUE
 

Definition at line 117 of file RichDocument.cpp.

References GetIterator(), GetNext(), CRichElement::m_nGroup, m_pSection, and CRichElement::Show().

Referenced by CHomeViewCtrl::Update(), CHomeTorrentsBox::Update(), CHomeConnectionBox::Update(), CHomeLibraryBox::Update(), CHomeDownloadsBox::Update(), CBrowseProfileCtrl::UpdateDocument1(), and CBrowseProfileCtrl::UpdateDocument2().

void CRichDocument::ShowGroupRange int  nMin,
int  nMax,
BOOL  bShow = TRUE
 

Definition at line 128 of file RichDocument.cpp.

References GetIterator(), GetNext(), CRichElement::m_nGroup, m_pSection, and CRichElement::Show().

Referenced by CHomeConnectionBox::Update().


Member Data Documentation

COLORREF CRichDocument::m_crBackground
 

Definition at line 45 of file RichDocument.h.

Referenced by CRichDocument(), LoadXML(), CHelpDlg::OnInitDialog(), CRichViewCtrl::OnPaint(), and CHomeViewCtrl::Setup().

COLORREF CRichDocument::m_crHeading
 

Definition at line 49 of file RichDocument.h.

Referenced by CRichDocument(), LoadXML(), LoadXMLStyles(), and CRichElement::PrePaint().

COLORREF CRichDocument::m_crHover
 

Definition at line 48 of file RichDocument.h.

Referenced by CRichDocument(), LoadXML(), LoadXMLStyles(), and CRichElement::PrePaint().

COLORREF CRichDocument::m_crLink
 

Definition at line 47 of file RichDocument.h.

Referenced by CRichDocument(), LoadXML(), LoadXMLStyles(), and CRichElement::PrePaint().

COLORREF CRichDocument::m_crText
 

Definition at line 46 of file RichDocument.h.

Referenced by CRichDocument(), LoadXML(), LoadXMLStyles(), and CRichElement::PrePaint().

CFont CRichDocument::m_fntBold
 

Definition at line 52 of file RichDocument.h.

Referenced by CreateFonts(), and CRichElement::PrePaint().

CFont CRichDocument::m_fntBoldUnder
 

Definition at line 55 of file RichDocument.h.

Referenced by CreateFonts(), and CRichElement::PrePaint().

CFont CRichDocument::m_fntHeading
 

Definition at line 56 of file RichDocument.h.

Referenced by CreateFonts(), LoadXMLStyles(), and CRichElement::PrePaint().

CFont CRichDocument::m_fntItalic
 

Definition at line 53 of file RichDocument.h.

Referenced by CreateFonts(), and CRichElement::PrePaint().

CFont CRichDocument::m_fntNormal
 

Definition at line 51 of file RichDocument.h.

Referenced by CreateFonts(), and CRichElement::PrePaint().

CFont CRichDocument::m_fntUnder
 

Definition at line 54 of file RichDocument.h.

Referenced by CreateFonts(), and CRichElement::PrePaint().

DWORD CRichDocument::m_nCookie
 

Definition at line 42 of file RichDocument.h.

Referenced by Add(), Clear(), CRichDocument(), CRichViewCtrl::InvalidateIfModified(), CRichViewCtrl::IsModified(), CRichViewCtrl::Layout(), CRichViewCtrl::OnPaint(), CRichViewCtrl::PointToFrag(), CRichViewCtrl::PointToPosition(), CRichViewCtrl::PositionToPoint(), Remove(), CRichElement::SetFlags(), SetModified(), CRichElement::SetText(), and CRichElement::Show().

CPtrList CRichDocument::m_pElements
 

Definition at line 41 of file RichDocument.h.

Referenced by Add(), Clear(), Find(), GetCount(), GetIterator(), GetNext(), GetPrev(), and Remove().

CCriticalSection CRichDocument::m_pSection
 

Definition at line 40 of file RichDocument.h.

Referenced by Add(), Clear(), CreateFonts(), CRichViewCtrl::Layout(), LoadXML(), CRichViewCtrl::OnLButtonDown(), CRichViewCtrl::OnLButtonUp(), CRichViewCtrl::OnMouseMove(), CRichViewCtrl::OnPaint(), CRichViewCtrl::OnSetCursor(), Remove(), ShowGroup(), ShowGroupRange(), CBrowseProfileCtrl::UpdateDocument1(), and CBrowseProfileCtrl::UpdateDocument2().

CSize CRichDocument::m_szMargin
 

Definition at line 44 of file RichDocument.h.

Referenced by CRichViewCtrl::Layout(), LoadXML(), and CSearchDetailPanel::Review::Review().


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