doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
CSyntaxRichEditCtrl Class Reference

#include <CSyntaxRichEditCtrl.h>

Inheritance diagram for CSyntaxRichEditCtrl:

Public Member Functions

 CSyntaxRichEditCtrl (void)
 
 ~CSyntaxRichEditCtrl (void)
 
void Init (void)
 
void SetCaseSensitive (bool caseSensitive)
 
void AllowPathNames (bool allow)
 
void EnableKeyWordAutoCompletion (bool enable)
 
void SetKeyWords (const keyWord_t kws[])
 
bool LoadKeyWordsFromFile (const char *fileName)
 
void SetObjectMemberCallback (objectMemberCallback_t callback)
 
void SetFunctionParmCallback (toolTipCallback_t callback)
 
void SetToolTipCallback (toolTipCallback_t callback)
 
void SetDefaultColor (const COLORREF color)
 
void SetCommentColor (const COLORREF color)
 
void SetStringColor (const COLORREF color, const COLORREF altColor=-1)
 
void SetLiteralColor (const COLORREF color)
 
COLORREF GetForeColor (int charIndex) const
 
COLORREF GetBackColor (int charIndex) const
 
void GetCursorPos (int &line, int &column, int &character) const
 
CHARRANGE GetVisibleRange (void) const
 
void GetText (idStr &text) const
 
void GetText (idStr &text, int startCharIndex, int endCharIndex) const
 
void SetText (const char *text)
 
void GoToLine (int line)
 
bool FindNext (const char *find, bool matchCase, bool matchWholeWords, bool searchForward)
 
int ReplaceAll (const char *find, const char *replace, bool matchCase, bool matchWholeWords)
 
void ReplaceText (int startCharIndex, int endCharIndex, const char *replace)
 

Protected Types

enum  charType_t {
  CT_WHITESPACE, CT_COMMENT, CT_STRING, CT_LITERAL,
  CT_NUMBER, CT_NAME, CT_PUNCTUATION
}
 

Protected Member Functions

virtual int OnToolHitTest (CPoint point, TOOLINFO *pTI) const
 
afx_msg BOOL OnToolTipNotify (UINT id, NMHDR *pNMHDR, LRESULT *pResult)
 
afx_msg UINT OnGetDlgCode ()
 
afx_msg void OnChar (UINT nChar, UINT nRepCnt, UINT nFlags)
 
afx_msg void OnKeyDown (UINT nKey, UINT nRepCnt, UINT nFlags)
 
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
 
afx_msg BOOL OnMouseWheel (UINT nFlags, short zDelta, CPoint pt)
 
afx_msg void OnMouseMove (UINT nFlags, CPoint point)
 
afx_msg void OnVScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
 
afx_msg void OnSize (UINT nType, int cx, int cy)
 
afx_msg void OnProtected (NMHDR *pNMHDR, LRESULT *pResult)
 
afx_msg void OnChange ()
 
afx_msg void OnAutoCompleteListBoxChange ()
 
afx_msg void OnAutoCompleteListBoxDblClk ()
 
void InitFont (void)
 
void InitSyntaxHighlighting (void)
 
void SetCharType (int first, int last, int type)
 
void SetDefaultFont (int startCharIndex, int endCharIndex)
 
void SetColor (int startCharIndex, int endCharIndex, COLORREF foreColor, COLORREF backColor, bool bold)
 
void FreeKeyWordsFromFile (void)
 
int FindKeyWord (const char *keyWord, int length) const
 
void HighlightSyntax (int startCharIndex, int endCharIndex)
 
void UpdateVisibleRange (void)
 
bool GetNameBeforeCurrentSelection (CString &name, int &charIndex) const
 
bool GetNameForMousePosition (idStr &name) const
 
void AutoCompleteInsertText (void)
 
void AutoCompleteUpdate (void)
 
void AutoCompleteShow (int charIndex)
 
void AutoCompleteHide (void)
 
void ToolTipShow (int charIndex, const char *string)
 
void ToolTipHide (void)
 
bool BracedSectionStart (char braceStartChar, char braceEndChar)
 
bool BracedSectionEnd (char braceStartChar, char braceEndChar)
 
void BracedSectionAdjustEndTabs (void)
 
void BracedSectionShow (void)
 
void BracedSectionHide (void)
 

Protected Attributes

CHARFORMAT2 defaultCharFormat
 
COLORREF defaultColor
 
COLORREF singleLineCommentColor
 
COLORREF multiLineCommentColor
 
COLORREF stringColor [2]
 
COLORREF literalColor
 
COLORREF braceHighlightColor
 
int charType [256]
 
idList< keyWord_tkeyWordsFromFile
 
const keyWord_tkeyWords
 
intkeyWordLengths
 
COLORREF * keyWordColors
 
idHashIndex keyWordHash
 
bool caseSensitive
 
bool allowPathNames
 
bool keyWordAutoCompletion
 
objectMemberCallback_t GetObjectMembers
 
toolTipCallback_t GetFunctionParms
 
toolTipCallback_t GetToolTip
 
tom::ITextDocument * m_TextDoc
 
tom::ITextFont * m_DefaultFont
 
CHARRANGE updateRange
 
bool updateSyntaxHighlighting
 
int stringColorIndex
 
int stringColorLine
 
int autoCompleteStart
 
CListBox autoCompleteListBox
 
int funcParmToolTipStart
 
CEdit funcParmToolTip
 
int bracedSection [2]
 
CPoint mousePoint
 
CToolTipCtrl * keyWordToolTip
 
TCHAR * m_pchTip
 
WCHAR * m_pwchTip
 

Detailed Description

Definition at line 94 of file CSyntaxRichEditCtrl.h.

Member Enumeration Documentation

Enumerator
CT_WHITESPACE 
CT_COMMENT 
CT_STRING 
CT_LITERAL 
CT_NUMBER 
CT_NAME 
CT_PUNCTUATION 

Definition at line 157 of file CSyntaxRichEditCtrl.h.

Constructor & Destructor Documentation

CSyntaxRichEditCtrl::CSyntaxRichEditCtrl ( void  )

Definition at line 86 of file CSyntaxRichEditCtrl.cpp.

CSyntaxRichEditCtrl::~CSyntaxRichEditCtrl ( void  )

Definition at line 118 of file CSyntaxRichEditCtrl.cpp.

Member Function Documentation

void CSyntaxRichEditCtrl::AllowPathNames ( bool  allow)

Definition at line 491 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::AutoCompleteHide ( void  )
protected

Definition at line 1106 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::AutoCompleteInsertText ( void  )
protected

Definition at line 1042 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::AutoCompleteShow ( int  charIndex)
protected

Definition at line 1080 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::AutoCompleteUpdate ( void  )
protected

Definition at line 1062 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::BracedSectionAdjustEndTabs ( void  )
protected

Definition at line 1220 of file CSyntaxRichEditCtrl.cpp.

bool CSyntaxRichEditCtrl::BracedSectionEnd ( char  braceStartChar,
char  braceEndChar 
)
protected

Definition at line 1186 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::BracedSectionHide ( void  )
protected

Definition at line 1268 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::BracedSectionShow ( void  )
protected

Definition at line 1255 of file CSyntaxRichEditCtrl.cpp.

bool CSyntaxRichEditCtrl::BracedSectionStart ( char  braceStartChar,
char  braceEndChar 
)
protected

Definition at line 1154 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::EnableKeyWordAutoCompletion ( bool  enable)

Definition at line 500 of file CSyntaxRichEditCtrl.cpp.

ID_INLINE int CSyntaxRichEditCtrl::FindKeyWord ( const char *  keyWord,
int  length 
) const
protected

Definition at line 262 of file CSyntaxRichEditCtrl.cpp.

bool CSyntaxRichEditCtrl::FindNext ( const char *  find,
bool  matchCase,
bool  matchWholeWords,
bool  searchForward 
)

Definition at line 939 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::FreeKeyWordsFromFile ( void  )
protected

Definition at line 400 of file CSyntaxRichEditCtrl.cpp.

COLORREF CSyntaxRichEditCtrl::GetBackColor ( int  charIndex) const

Definition at line 617 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::GetCursorPos ( int line,
int column,
int character 
) const

Definition at line 878 of file CSyntaxRichEditCtrl.cpp.

COLORREF CSyntaxRichEditCtrl::GetForeColor ( int  charIndex) const

Definition at line 596 of file CSyntaxRichEditCtrl.cpp.

bool CSyntaxRichEditCtrl::GetNameBeforeCurrentSelection ( CString &  name,
int charIndex 
) const
protected

Definition at line 1282 of file CSyntaxRichEditCtrl.cpp.

bool CSyntaxRichEditCtrl::GetNameForMousePosition ( idStr name) const
protected

Definition at line 1312 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::GetText ( idStr text) const

Definition at line 902 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::GetText ( idStr text,
int  startCharIndex,
int  endCharIndex 
) const

Definition at line 911 of file CSyntaxRichEditCtrl.cpp.

CHARRANGE CSyntaxRichEditCtrl::GetVisibleRange ( void  ) const

Definition at line 509 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::GoToLine ( int  line)

Definition at line 1344 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::HighlightSyntax ( int  startCharIndex,
int  endCharIndex 
)
protected

Definition at line 640 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::Init ( void  )

Definition at line 228 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::InitFont ( void  )
protected

Definition at line 130 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::InitSyntaxHighlighting ( void  )
protected

Definition at line 210 of file CSyntaxRichEditCtrl.cpp.

bool CSyntaxRichEditCtrl::LoadKeyWordsFromFile ( const char *  fileName)

Definition at line 331 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::OnAutoCompleteListBoxChange ( )
protected

Definition at line 1886 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::OnAutoCompleteListBoxDblClk ( )
protected

Definition at line 1896 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::OnChange ( )
protected

Definition at line 1860 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::OnChar ( UINT  nChar,
UINT  nRepCnt,
UINT  nFlags 
)
protected

Definition at line 1604 of file CSyntaxRichEditCtrl.cpp.

UINT CSyntaxRichEditCtrl::OnGetDlgCode ( )
protected

Definition at line 1448 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::OnKeyDown ( UINT  nKey,
UINT  nRepCnt,
UINT  nFlags 
)
protected

Definition at line 1458 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::OnLButtonDown ( UINT  nFlags,
CPoint  point 
)
protected

Definition at line 1722 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::OnMouseMove ( UINT  nFlags,
CPoint  point 
)
protected

Definition at line 1767 of file CSyntaxRichEditCtrl.cpp.

BOOL CSyntaxRichEditCtrl::OnMouseWheel ( UINT  nFlags,
short  zDelta,
CPoint  pt 
)
protected

Definition at line 1738 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::OnProtected ( NMHDR *  pNMHDR,
LRESULT *  pResult 
)
protected

Definition at line 1818 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::OnSize ( UINT  nType,
int  cx,
int  cy 
)
protected

Definition at line 1786 of file CSyntaxRichEditCtrl.cpp.

int CSyntaxRichEditCtrl::OnToolHitTest ( CPoint  point,
TOOLINFO *  pTI 
) const
protectedvirtual

Definition at line 1364 of file CSyntaxRichEditCtrl.cpp.

BOOL CSyntaxRichEditCtrl::OnToolTipNotify ( UINT  id,
NMHDR *  pNMHDR,
LRESULT *  pResult 
)
protected

Definition at line 1382 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::OnVScroll ( UINT  nSBCode,
UINT  nPos,
CScrollBar *  pScrollBar 
)
protected

Definition at line 1801 of file CSyntaxRichEditCtrl.cpp.

int CSyntaxRichEditCtrl::ReplaceAll ( const char *  find,
const char *  replace,
bool  matchCase,
bool  matchWholeWords 
)

Definition at line 988 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::ReplaceText ( int  startCharIndex,
int  endCharIndex,
const char *  replace 
)

Definition at line 1028 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetCaseSensitive ( bool  caseSensitive)

Definition at line 482 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetCharType ( int  first,
int  last,
int  type 
)
protected

Definition at line 199 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetColor ( int  startCharIndex,
int  endCharIndex,
COLORREF  foreColor,
COLORREF  backColor,
bool  bold 
)
protected

Definition at line 563 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetCommentColor ( const COLORREF  color)

Definition at line 422 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetDefaultColor ( const COLORREF  color)

Definition at line 413 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetDefaultFont ( int  startCharIndex,
int  endCharIndex 
)
protected

Definition at line 542 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetFunctionParmCallback ( toolTipCallback_t  callback)

Definition at line 464 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetKeyWords ( const keyWord_t  kws[])

Definition at line 293 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetLiteralColor ( const COLORREF  color)

Definition at line 446 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetObjectMemberCallback ( objectMemberCallback_t  callback)

Definition at line 455 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetStringColor ( const COLORREF  color,
const COLORREF  altColor = -1 
)

Definition at line 432 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetText ( const char *  text)

Definition at line 928 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::SetToolTipCallback ( toolTipCallback_t  callback)

Definition at line 473 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::ToolTipHide ( void  )
protected

Definition at line 1144 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::ToolTipShow ( int  charIndex,
const char *  string 
)
protected

Definition at line 1116 of file CSyntaxRichEditCtrl.cpp.

void CSyntaxRichEditCtrl::UpdateVisibleRange ( void  )
protected

Definition at line 831 of file CSyntaxRichEditCtrl.cpp.

Member Data Documentation

bool CSyntaxRichEditCtrl::allowPathNames
protected

Definition at line 176 of file CSyntaxRichEditCtrl.h.

CListBox CSyntaxRichEditCtrl::autoCompleteListBox
protected

Definition at line 193 of file CSyntaxRichEditCtrl.h.

int CSyntaxRichEditCtrl::autoCompleteStart
protected

Definition at line 192 of file CSyntaxRichEditCtrl.h.

int CSyntaxRichEditCtrl::bracedSection[2]
protected

Definition at line 198 of file CSyntaxRichEditCtrl.h.

COLORREF CSyntaxRichEditCtrl::braceHighlightColor
protected

Definition at line 155 of file CSyntaxRichEditCtrl.h.

bool CSyntaxRichEditCtrl::caseSensitive
protected

Definition at line 175 of file CSyntaxRichEditCtrl.h.

int CSyntaxRichEditCtrl::charType[256]
protected

Definition at line 167 of file CSyntaxRichEditCtrl.h.

CHARFORMAT2 CSyntaxRichEditCtrl::defaultCharFormat
protected

Definition at line 149 of file CSyntaxRichEditCtrl.h.

COLORREF CSyntaxRichEditCtrl::defaultColor
protected

Definition at line 150 of file CSyntaxRichEditCtrl.h.

CEdit CSyntaxRichEditCtrl::funcParmToolTip
protected

Definition at line 196 of file CSyntaxRichEditCtrl.h.

int CSyntaxRichEditCtrl::funcParmToolTipStart
protected

Definition at line 195 of file CSyntaxRichEditCtrl.h.

toolTipCallback_t CSyntaxRichEditCtrl::GetFunctionParms
protected

Definition at line 180 of file CSyntaxRichEditCtrl.h.

objectMemberCallback_t CSyntaxRichEditCtrl::GetObjectMembers
protected

Definition at line 179 of file CSyntaxRichEditCtrl.h.

toolTipCallback_t CSyntaxRichEditCtrl::GetToolTip
protected

Definition at line 181 of file CSyntaxRichEditCtrl.h.

bool CSyntaxRichEditCtrl::keyWordAutoCompletion
protected

Definition at line 177 of file CSyntaxRichEditCtrl.h.

COLORREF* CSyntaxRichEditCtrl::keyWordColors
protected

Definition at line 172 of file CSyntaxRichEditCtrl.h.

idHashIndex CSyntaxRichEditCtrl::keyWordHash
protected

Definition at line 173 of file CSyntaxRichEditCtrl.h.

int* CSyntaxRichEditCtrl::keyWordLengths
protected

Definition at line 171 of file CSyntaxRichEditCtrl.h.

const keyWord_t* CSyntaxRichEditCtrl::keyWords
protected

Definition at line 170 of file CSyntaxRichEditCtrl.h.

idList<keyWord_t> CSyntaxRichEditCtrl::keyWordsFromFile
protected

Definition at line 169 of file CSyntaxRichEditCtrl.h.

CToolTipCtrl* CSyntaxRichEditCtrl::keyWordToolTip
protected

Definition at line 201 of file CSyntaxRichEditCtrl.h.

COLORREF CSyntaxRichEditCtrl::literalColor
protected

Definition at line 154 of file CSyntaxRichEditCtrl.h.

tom::ITextFont* CSyntaxRichEditCtrl::m_DefaultFont
protected

Definition at line 185 of file CSyntaxRichEditCtrl.h.

TCHAR* CSyntaxRichEditCtrl::m_pchTip
protected

Definition at line 202 of file CSyntaxRichEditCtrl.h.

WCHAR* CSyntaxRichEditCtrl::m_pwchTip
protected

Definition at line 203 of file CSyntaxRichEditCtrl.h.

tom::ITextDocument* CSyntaxRichEditCtrl::m_TextDoc
protected

Definition at line 184 of file CSyntaxRichEditCtrl.h.

CPoint CSyntaxRichEditCtrl::mousePoint
protected

Definition at line 200 of file CSyntaxRichEditCtrl.h.

COLORREF CSyntaxRichEditCtrl::multiLineCommentColor
protected

Definition at line 152 of file CSyntaxRichEditCtrl.h.

COLORREF CSyntaxRichEditCtrl::singleLineCommentColor
protected

Definition at line 151 of file CSyntaxRichEditCtrl.h.

COLORREF CSyntaxRichEditCtrl::stringColor[2]
protected

Definition at line 153 of file CSyntaxRichEditCtrl.h.

int CSyntaxRichEditCtrl::stringColorIndex
protected

Definition at line 189 of file CSyntaxRichEditCtrl.h.

int CSyntaxRichEditCtrl::stringColorLine
protected

Definition at line 190 of file CSyntaxRichEditCtrl.h.

CHARRANGE CSyntaxRichEditCtrl::updateRange
protected

Definition at line 187 of file CSyntaxRichEditCtrl.h.

bool CSyntaxRichEditCtrl::updateSyntaxHighlighting
protected

Definition at line 188 of file CSyntaxRichEditCtrl.h.


The documentation for this class was generated from the following files: