qscilexerhtml.sip 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. // This is the SIP interface definition for QsciLexerHTML.
  2. //
  3. // Copyright (c) 2017 Riverbank Computing Limited <info@riverbankcomputing.com>
  4. //
  5. // This file is part of QScintilla.
  6. //
  7. // This file may be used under the terms of the GNU General Public License
  8. // version 3.0 as published by the Free Software Foundation and appearing in
  9. // the file LICENSE included in the packaging of this file. Please review the
  10. // following information to ensure the GNU General Public License version 3.0
  11. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  12. //
  13. // If you do not wish to use this file under the terms of the GPL version 3.0
  14. // then you may purchase a commercial license. For more information contact
  15. // info@riverbankcomputing.com.
  16. //
  17. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  18. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19. class QsciLexerHTML : QsciLexer
  20. {
  21. %TypeHeaderCode
  22. #include <Qsci/qscilexerhtml.h>
  23. %End
  24. public:
  25. enum {
  26. Default,
  27. Tag,
  28. UnknownTag,
  29. Attribute,
  30. UnknownAttribute,
  31. HTMLNumber,
  32. HTMLDoubleQuotedString,
  33. HTMLSingleQuotedString,
  34. OtherInTag,
  35. HTMLComment,
  36. Entity,
  37. XMLTagEnd,
  38. XMLStart,
  39. XMLEnd,
  40. Script,
  41. ASPAtStart,
  42. ASPStart,
  43. CDATA,
  44. PHPStart,
  45. HTMLValue,
  46. ASPXCComment,
  47. SGMLDefault,
  48. SGMLCommand,
  49. SGMLParameter,
  50. SGMLDoubleQuotedString,
  51. SGMLSingleQuotedString,
  52. SGMLError,
  53. SGMLSpecial,
  54. SGMLEntity,
  55. SGMLComment,
  56. SGMLParameterComment,
  57. SGMLBlockDefault,
  58. JavaScriptStart,
  59. JavaScriptDefault,
  60. JavaScriptComment,
  61. JavaScriptCommentLine,
  62. JavaScriptCommentDoc,
  63. JavaScriptNumber,
  64. JavaScriptWord,
  65. JavaScriptKeyword,
  66. JavaScriptDoubleQuotedString,
  67. JavaScriptSingleQuotedString,
  68. JavaScriptSymbol,
  69. JavaScriptUnclosedString,
  70. JavaScriptRegex,
  71. ASPJavaScriptStart,
  72. ASPJavaScriptDefault,
  73. ASPJavaScriptComment,
  74. ASPJavaScriptCommentLine,
  75. ASPJavaScriptCommentDoc,
  76. ASPJavaScriptNumber,
  77. ASPJavaScriptWord,
  78. ASPJavaScriptKeyword,
  79. ASPJavaScriptDoubleQuotedString,
  80. ASPJavaScriptSingleQuotedString,
  81. ASPJavaScriptSymbol,
  82. ASPJavaScriptUnclosedString,
  83. ASPJavaScriptRegex,
  84. VBScriptStart,
  85. VBScriptDefault,
  86. VBScriptComment,
  87. VBScriptNumber,
  88. VBScriptKeyword,
  89. VBScriptString,
  90. VBScriptIdentifier,
  91. VBScriptUnclosedString,
  92. ASPVBScriptStart,
  93. ASPVBScriptDefault,
  94. ASPVBScriptComment,
  95. ASPVBScriptNumber,
  96. ASPVBScriptKeyword,
  97. ASPVBScriptString,
  98. ASPVBScriptIdentifier,
  99. ASPVBScriptUnclosedString,
  100. PythonStart,
  101. PythonDefault,
  102. PythonComment,
  103. PythonNumber,
  104. PythonDoubleQuotedString,
  105. PythonSingleQuotedString,
  106. PythonKeyword,
  107. PythonTripleSingleQuotedString,
  108. PythonTripleDoubleQuotedString,
  109. PythonClassName,
  110. PythonFunctionMethodName,
  111. PythonOperator,
  112. PythonIdentifier,
  113. ASPPythonStart,
  114. ASPPythonDefault,
  115. ASPPythonComment,
  116. ASPPythonNumber,
  117. ASPPythonDoubleQuotedString,
  118. ASPPythonSingleQuotedString,
  119. ASPPythonKeyword,
  120. ASPPythonTripleSingleQuotedString,
  121. ASPPythonTripleDoubleQuotedString,
  122. ASPPythonClassName,
  123. ASPPythonFunctionMethodName,
  124. ASPPythonOperator,
  125. ASPPythonIdentifier,
  126. PHPDefault,
  127. PHPDoubleQuotedString,
  128. PHPSingleQuotedString,
  129. PHPKeyword,
  130. PHPNumber,
  131. PHPVariable,
  132. PHPComment,
  133. PHPCommentLine,
  134. PHPDoubleQuotedVariable,
  135. PHPOperator
  136. };
  137. QsciLexerHTML(QObject *parent /TransferThis/ = 0);
  138. virtual ~QsciLexerHTML();
  139. const char *language() const;
  140. const char *lexer() const;
  141. QColor defaultColor(int style) const;
  142. bool defaultEolFill(int style) const;
  143. QFont defaultFont(int style) const;
  144. QColor defaultPaper(int style) const;
  145. const char *keywords(int set) const;
  146. QString description(int style) const;
  147. const char *wordCharacters() const;
  148. const char *autoCompletionFillups() const /Encoding="None"/;
  149. bool caseSensitive() const;
  150. void refreshProperties();
  151. bool caseSensitiveTags() const;
  152. void setDjangoTemplates(bool enable);
  153. bool djangoTemplates() const;
  154. bool foldCompact() const;
  155. bool foldPreprocessor() const;
  156. void setFoldScriptComments(bool fold);
  157. bool foldScriptComments() const;
  158. void setFoldScriptHeredocs(bool fold);
  159. bool foldScriptHeredocs() const;
  160. void setMakoTemplates(bool enable);
  161. bool makoTemplates() const;
  162. public slots:
  163. virtual void setFoldCompact(bool fold);
  164. virtual void setFoldPreprocessor(bool fold);
  165. virtual void setCaseSensitiveTags(bool sens);
  166. protected:
  167. bool readProperties(QSettings &qs, const QString &prefix);
  168. bool writeProperties(QSettings &qs, const QString &prefix) const;
  169. private:
  170. QsciLexerHTML(const QsciLexerHTML &);
  171. };