00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_EMOTICONS_H__0EE665E3_3AD7_4BFF_B2D8_000C806D9D08__INCLUDED_)
00023 #define AFX_EMOTICONS_H__0EE665E3_3AD7_4BFF_B2D8_000C806D9D08__INCLUDED_
00024
00025 #pragma once
00026
00027 class CImageFile;
00028 class CRichDocument;
00029
00030
00031 class CEmoticons
00032 {
00033
00034 public:
00035 CEmoticons();
00036 virtual ~CEmoticons();
00037
00038
00039 public:
00040 CImageList m_pImage;
00041 CStringArray m_pIndex;
00042 LPTSTR m_pTokens;
00043 CUIntArray m_pButtons;
00044
00045
00046 public:
00047 LPCTSTR FindNext(LPCTSTR pszText, int* pnIndex);
00048 int Lookup(LPCTSTR pszText, int nLen = -1) const;
00049 LPCTSTR GetText(int nIndex) const;
00050 void Draw(CDC* pDC, int nIndex, int nX, int nY, COLORREF crBack = CLR_NONE);
00051 CMenu* CreateMenu();
00052 void FormatText(CRichDocument* pDocument, LPCTSTR pszBody, BOOL bNewlines = FALSE);
00053 public:
00054 BOOL Load();
00055 void Clear();
00056 protected:
00057 int AddEmoticon(LPCTSTR pszText, CImageFile* pImage, CRect* pRect, COLORREF crBack, BOOL bButton);
00058 void BuildTokens();
00059 BOOL LoadTrillian(LPCTSTR pszFile);
00060
00061
00062 };
00063
00064 extern CEmoticons Emoticons;
00065
00066 #endif // !defined(AFX_EMOTICONS_H__0EE665E3_3AD7_4BFF_B2D8_000C806D9D08__INCLUDED_)