prefs.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. //////////////////////////////////////////////////////////////////////////////
  2. // File: prefs.h
  3. // Purpose: STC test Preferences initialization
  4. // Maintainer: Wyo
  5. // Created: 2003-09-01
  6. // Copyright: (c) wxGuide
  7. // Licence: wxWindows licence
  8. //////////////////////////////////////////////////////////////////////////////
  9. #ifndef _PREFS_H_
  10. #define _PREFS_H_
  11. //----------------------------------------------------------------------------
  12. // informations
  13. //----------------------------------------------------------------------------
  14. //----------------------------------------------------------------------------
  15. // headers
  16. //----------------------------------------------------------------------------
  17. //! wxWidgets headers
  18. //! wxWidgets/contrib headers
  19. #include "wx/stc/stc.h" // styled text control
  20. //! application headers
  21. //============================================================================
  22. // declarations
  23. //============================================================================
  24. //! general style types
  25. #define mySTC_TYPE_DEFAULT 0
  26. #define mySTC_TYPE_WORD1 1
  27. #define mySTC_TYPE_WORD2 2
  28. #define mySTC_TYPE_WORD3 3
  29. #define mySTC_TYPE_WORD4 4
  30. #define mySTC_TYPE_WORD5 5
  31. #define mySTC_TYPE_WORD6 6
  32. #define mySTC_TYPE_COMMENT 7
  33. #define mySTC_TYPE_COMMENT_DOC 8
  34. #define mySTC_TYPE_COMMENT_LINE 9
  35. #define mySTC_TYPE_COMMENT_SPECIAL 10
  36. #define mySTC_TYPE_CHARACTER 11
  37. #define mySTC_TYPE_CHARACTER_EOL 12
  38. #define mySTC_TYPE_STRING 13
  39. #define mySTC_TYPE_STRING_EOL 14
  40. #define mySTC_TYPE_DELIMITER 15
  41. #define mySTC_TYPE_PUNCTUATION 16
  42. #define mySTC_TYPE_OPERATOR 17
  43. #define mySTC_TYPE_BRACE 18
  44. #define mySTC_TYPE_COMMAND 19
  45. #define mySTC_TYPE_IDENTIFIER 20
  46. #define mySTC_TYPE_LABEL 21
  47. #define mySTC_TYPE_NUMBER 22
  48. #define mySTC_TYPE_PARAMETER 23
  49. #define mySTC_TYPE_REGEX 24
  50. #define mySTC_TYPE_UUID 25
  51. #define mySTC_TYPE_VALUE 26
  52. #define mySTC_TYPE_PREPROCESSOR 27
  53. #define mySTC_TYPE_SCRIPT 28
  54. #define mySTC_TYPE_ERROR 29
  55. //----------------------------------------------------------------------------
  56. //! style bits types
  57. #define mySTC_STYLE_BOLD 1
  58. #define mySTC_STYLE_ITALIC 2
  59. #define mySTC_STYLE_UNDERL 4
  60. #define mySTC_STYLE_HIDDEN 8
  61. //----------------------------------------------------------------------------
  62. //! general folding types
  63. #define mySTC_FOLD_COMMENT 1
  64. #define mySTC_FOLD_COMPACT 2
  65. #define mySTC_FOLD_PREPROC 4
  66. #define mySTC_FOLD_HTML 16
  67. #define mySTC_FOLD_HTMLPREP 32
  68. #define mySTC_FOLD_COMMENTPY 64
  69. #define mySTC_FOLD_QUOTESPY 128
  70. //----------------------------------------------------------------------------
  71. //! flags
  72. #define mySTC_FLAG_WRAPMODE 16
  73. //----------------------------------------------------------------------------
  74. // CommonInfo
  75. struct CommonInfo {
  76. // editor functionality prefs
  77. bool syntaxEnable;
  78. bool foldEnable;
  79. bool indentEnable;
  80. // display defaults prefs
  81. bool readOnlyInitial;
  82. bool overTypeInitial;
  83. bool wrapModeInitial;
  84. bool displayEOLEnable;
  85. bool indentGuideEnable;
  86. bool lineNumberEnable;
  87. bool longLineOnEnable;
  88. bool whiteSpaceEnable;
  89. };
  90. extern const CommonInfo g_CommonPrefs;
  91. //----------------------------------------------------------------------------
  92. // LanguageInfo
  93. struct LanguageInfo {
  94. const char *name;
  95. const char *filepattern;
  96. int lexer;
  97. struct {
  98. int type;
  99. const char *words;
  100. } styles [STYLE_TYPES_COUNT];
  101. int folds;
  102. };
  103. extern const LanguageInfo g_LanguagePrefs[];
  104. extern const int g_LanguagePrefsSize;
  105. //----------------------------------------------------------------------------
  106. // StyleInfo
  107. struct StyleInfo {
  108. const wxChar *name;
  109. const wxChar *foreground;
  110. const wxChar *background;
  111. const wxChar *fontname;
  112. int fontsize;
  113. int fontstyle;
  114. int lettercase;
  115. };
  116. extern const StyleInfo g_StylePrefs[];
  117. extern const int g_StylePrefsSize;
  118. #endif // _PREFS_H_