Styles.h
上传用户:tj_dwf
上传日期:2020-11-17
资源大小:215k
文件大小:3k
源码类别:

RichEdit

开发平台:

Visual C++

  1. /******************************************************************************
  2. *
  3. *
  4. * Notepad2
  5. *
  6. * Styles.h
  7. *   Scintilla Style Management
  8. *
  9. * See Readme.txt for more information about this source code.
  10. * Please send me your comments to this work.
  11. *
  12. * See License.txt for details about distribution and modification.
  13. *
  14. *                                              (c) Florian Balmer 1996-2010
  15. *                                                  florian.balmer@gmail.com
  16. *                                               http://www.flos-freeware.ch
  17. *
  18. *
  19. ******************************************************************************/
  20. typedef struct _editstyle
  21. {
  22.   union
  23.   {
  24.     INT32 iStyle;
  25.     UINT8 iStyle8[4];
  26.   };
  27.   int rid;
  28.   WCHAR* pszName;
  29.   WCHAR* pszDefault;
  30.   WCHAR  szValue[128];
  31. } EDITSTYLE, *PEDITSTYLE;
  32. typedef struct _keywordlist
  33. {
  34.   char *pszKeyWords[9];
  35. } KEYWORDLIST, *PKEYWORDLIST;
  36. typedef struct _editlexer
  37. {
  38.   int iLexer;
  39.   int rid;
  40.   WCHAR* pszName;
  41.   WCHAR* pszDefExt;
  42.   WCHAR  szExtensions[128];
  43.   PKEYWORDLIST pKeyWords;
  44.   EDITSTYLE    Styles[];
  45. } EDITLEXER, *PEDITLEXER;
  46. // Number of Lexers in pLexArray
  47. #define NUMLEXERS 22
  48. void   Style_Load();
  49. void   Style_Save();
  50. BOOL   Style_Import(HWND);
  51. BOOL   Style_Export(HWND);
  52. void   Style_SetLexer(HWND,PEDITLEXER);
  53. void   Style_SetLongLineColors(HWND);
  54. void   Style_SetCurrentLineBackground(HWND);
  55. void   Style_SetLexerFromFile(HWND,LPCWSTR);
  56. void   Style_SetLexerFromName(HWND,LPCWSTR,LPCWSTR);
  57. void   Style_SetDefaultLexer(HWND);
  58. void   Style_SetHTMLLexer(HWND);
  59. void   Style_SetXMLLexer(HWND);
  60. void   Style_SetLexerFromID(HWND,int);
  61. void   Style_SetDefaultFont(HWND);
  62. void   Style_ToggleUse2ndDefault(HWND);
  63. BOOL   Style_GetUse2ndDefault(HWND);
  64. void   Style_SetIndentGuides(HWND,BOOL);
  65. BOOL   Style_GetOpenDlgFilterStr(LPWSTR,int);
  66. BOOL   Style_StrGetFont(LPCWSTR,LPWSTR,int);
  67. BOOL   Style_StrGetFontQuality(LPCWSTR,LPWSTR,int);
  68. BOOL   Style_StrGetCharSet(LPCWSTR,int*);
  69. BOOL   Style_StrGetSize(LPCWSTR,int*);
  70. BOOL   Style_StrGetSizeStr(LPCWSTR,LPWSTR,int);
  71. BOOL   Style_StrGetColor(BOOL,LPCWSTR,int*);
  72. BOOL   Style_StrGetCase(LPCWSTR,int*);
  73. BOOL   Style_StrGetAlpha(LPCWSTR,int*);
  74. BOOL   Style_SelectFont(HWND,LPWSTR,int,BOOL);
  75. BOOL   Style_SelectColor(HWND,BOOL,LPWSTR,int);
  76. void   Style_SetStyles(HWND,int,LPCWSTR);
  77. void   Style_SetFontQuality(HWND,LPCWSTR);
  78. void   Style_GetCurrentLexerName(LPWSTR,int);
  79. int    Style_GetLexerIconId(PEDITLEXER);
  80. void   Style_AddLexerToTreeView(HWND,PEDITLEXER);
  81. BOOL CALLBACK Styles_ConfigDlgProc(HWND,UINT,WPARAM,LPARAM);
  82. void   Style_ConfigDlg(HWND);
  83. BOOL CALLBACK Style_SelectLexerDlgProc(HWND,UINT,WPARAM,LPARAM);
  84. void   Style_SelectLexerDlg(HWND);
  85. // End of Style.h