29 #ifndef __CSYNTAXRICHEDITCTR_H__
30 #define __CSYNTAXRICHEDITCTR_H__
55 # import "riched20.dll" raw_interfaces_only, raw_native_types, named_guids, no_auto_exclude, no_implementation, rename(
"FindText",
"FindShit" )
57 # include "riched20.tlh"
60 static const char * FONT_NAME =
"Courier";
61 static const int FONT_HEIGHT = 10;
62 static const int FONT_WIDTH = 8;
63 static const int TAB_SIZE = 4;
65 static const COLORREF SRE_COLOR_BLACK = RGB( 0, 0, 0 );
66 static const COLORREF SRE_COLOR_WHITE = RGB( 255, 255, 255 );
67 static const COLORREF SRE_COLOR_RED = RGB( 255, 0, 0 );
68 static const COLORREF SRE_COLOR_GREEN = RGB( 0, 255, 0 );
69 static const COLORREF SRE_COLOR_BLUE = RGB( 0, 0, 255 );
70 static const COLORREF SRE_COLOR_YELLOW = RGB( 255, 255, 0 );
71 static const COLORREF SRE_COLOR_MAGENTA = RGB( 255, 0, 255 );
72 static const COLORREF SRE_COLOR_CYAN = RGB( 0, 255, 255 );
73 static const COLORREF SRE_COLOR_ORANGE = RGB( 255, 128, 0 );
74 static const COLORREF SRE_COLOR_PURPLE = RGB( 150, 0, 150 );
75 static const COLORREF SRE_COLOR_PINK = RGB( 186, 102, 123 );
76 static const COLORREF SRE_COLOR_GREY = RGB( 85, 85, 85 );
77 static const COLORREF SRE_COLOR_BROWN = RGB( 100, 90, 20 );
78 static const COLORREF SRE_COLOR_LIGHT_GREY = RGB( 170, 170, 170 );
79 static const COLORREF SRE_COLOR_LIGHT_BROWN = RGB( 170, 150, 20 );
80 static const COLORREF SRE_COLOR_DARK_GREEN = RGB( 0, 128, 0 );
81 static const COLORREF SRE_COLOR_DARK_CYAN = RGB( 0, 150, 150 );
82 static const COLORREF SRE_COLOR_DARK_YELLOW = RGB( 220, 200, 20 );
112 void SetStringColor(
const COLORREF color,
const COLORREF altColor = -1 );
122 void GetText(
idStr &text,
int startCharIndex,
int endCharIndex )
const;
123 void SetText(
const char *text );
126 bool FindNext(
const char *find,
bool matchCase,
bool matchWholeWords,
bool searchForward );
127 int ReplaceAll(
const char *find,
const char *replace,
bool matchCase,
bool matchWholeWords );
128 void ReplaceText(
int startCharIndex,
int endCharIndex,
const char *replace );
131 virtual int OnToolHitTest( CPoint point, TOOLINFO* pTI )
const;
140 afx_msg
void OnSize(
UINT nType,
int cx,
int cy );
141 afx_msg
void OnProtected( NMHDR *pNMHDR, LRESULT *pResult );
146 DECLARE_MESSAGE_MAP()
210 void SetColor(
int startCharIndex,
int endCharIndex, COLORREF foreColor, COLORREF backColor,
bool bold );
226 void ToolTipShow(
int charIndex,
const char *
string );
objectMemberCallback_t GetObjectMembers
void AutoCompleteHide(void)
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
CHARFORMAT2 defaultCharFormat
void AutoCompleteUpdate(void)
COLORREF multiLineCommentColor
afx_msg void OnAutoCompleteListBoxChange()
bool GetNameForMousePosition(idStr &name) const
CSyntaxRichEditCtrl(void)
CONST PIXELFORMATDESCRIPTOR UINT
void GetText(idStr &text) const
void SetFunctionParmCallback(toolTipCallback_t callback)
void SetStringColor(const COLORREF color, const COLORREF altColor=-1)
bool keyWordAutoCompletion
bool FindNext(const char *find, bool matchCase, bool matchWholeWords, bool searchForward)
COLORREF singleLineCommentColor
COLORREF GetForeColor(int charIndex) const
GLenum GLsizei const GLvoid * string
void ReplaceText(int startCharIndex, int endCharIndex, const char *replace)
afx_msg void OnProtected(NMHDR *pNMHDR, LRESULT *pResult)
GLuint GLuint GLsizei GLenum type
CListBox autoCompleteListBox
void SetObjectMemberCallback(objectMemberCallback_t callback)
void BracedSectionShow(void)
void SetLiteralColor(const COLORREF color)
void SetToolTipCallback(toolTipCallback_t callback)
void SetText(const char *text)
void AllowPathNames(bool allow)
CHARRANGE GetVisibleRange(void) const
void HighlightSyntax(int startCharIndex, int endCharIndex)
void BracedSectionHide(void)
afx_msg void OnSize(UINT nType, int cx, int cy)
bool BracedSectionStart(char braceStartChar, char braceEndChar)
void GetCursorPos(int &line, int &column, int &character) const
afx_msg void OnMouseMove(UINT nFlags, CPoint point)
void InitSyntaxHighlighting(void)
void SetKeyWords(const keyWord_t kws[])
toolTipCallback_t GetFunctionParms
void SetCharType(int first, int last, int type)
int FindKeyWord(const char *keyWord, int length) const
CToolTipCtrl * keyWordToolTip
COLORREF GetBackColor(int charIndex) const
void AutoCompleteInsertText(void)
virtual int OnToolHitTest(CPoint point, TOOLINFO *pTI) const
void UpdateVisibleRange(void)
afx_msg UINT OnGetDlgCode()
bool GetNameBeforeCurrentSelection(CString &name, int &charIndex) const
bool(* objectMemberCallback_t)(const char *objectName, CListBox &listBox)
void SetColor(int startCharIndex, int endCharIndex, COLORREF foreColor, COLORREF backColor, bool bold)
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
void FreeKeyWordsFromFile(void)
const keyWord_t * keyWords
void BracedSectionAdjustEndTabs(void)
void SetDefaultFont(int startCharIndex, int endCharIndex)
tom::ITextFont * m_DefaultFont
void SetCommentColor(const COLORREF color)
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult)
bool BracedSectionEnd(char braceStartChar, char braceEndChar)
afx_msg void OnAutoCompleteListBoxDblClk()
GLsizei const GLcharARB const GLint * length
idList< keyWord_t > keyWordsFromFile
void SetDefaultColor(const COLORREF color)
afx_msg void OnKeyDown(UINT nKey, UINT nRepCnt, UINT nFlags)
tom::ITextDocument * m_TextDoc
void SetCaseSensitive(bool caseSensitive)
void EnableKeyWordAutoCompletion(bool enable)
void AutoCompleteShow(int charIndex)
GLenum GLenum GLvoid GLvoid * column
bool updateSyntaxHighlighting
void ToolTipShow(int charIndex, const char *string)
toolTipCallback_t GetToolTip
bool LoadKeyWordsFromFile(const char *fileName)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point)
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
COLORREF braceHighlightColor
bool(* toolTipCallback_t)(const char *name, CString &string)
int ReplaceAll(const char *find, const char *replace, bool matchCase, bool matchWholeWords)
~CSyntaxRichEditCtrl(void)