qscilexercpp.sip 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. // This is the SIP interface definition for QsciLexerCPP.
  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 QsciLexerCPP : QsciLexer
  20. {
  21. %TypeHeaderCode
  22. #include <Qsci/qscilexercpp.h>
  23. %End
  24. public:
  25. enum {
  26. Default,
  27. InactiveDefault,
  28. Comment,
  29. InactiveComment,
  30. CommentLine,
  31. InactiveCommentLine,
  32. CommentDoc,
  33. InactiveCommentDoc,
  34. Number,
  35. InactiveNumber,
  36. Keyword,
  37. InactiveKeyword,
  38. DoubleQuotedString,
  39. InactiveDoubleQuotedString,
  40. SingleQuotedString,
  41. InactiveSingleQuotedString,
  42. UUID,
  43. InactiveUUID,
  44. PreProcessor,
  45. InactivePreProcessor,
  46. Operator,
  47. InactiveOperator,
  48. Identifier,
  49. InactiveIdentifier,
  50. UnclosedString,
  51. InactiveUnclosedString,
  52. VerbatimString,
  53. InactiveVerbatimString,
  54. Regex,
  55. InactiveRegex,
  56. CommentLineDoc,
  57. InactiveCommentLineDoc,
  58. KeywordSet2,
  59. InactiveKeywordSet2,
  60. CommentDocKeyword,
  61. InactiveCommentDocKeyword,
  62. CommentDocKeywordError,
  63. InactiveCommentDocKeywordError,
  64. GlobalClass,
  65. InactiveGlobalClass,
  66. RawString,
  67. InactiveRawString,
  68. TripleQuotedVerbatimString,
  69. InactiveTripleQuotedVerbatimString,
  70. HashQuotedString,
  71. InactiveHashQuotedString,
  72. PreProcessorComment,
  73. InactivePreProcessorComment,
  74. PreProcessorCommentLineDoc,
  75. InactivePreProcessorCommentLineDoc,
  76. UserLiteral,
  77. InactiveUserLiteral,
  78. TaskMarker,
  79. InactiveTaskMarker,
  80. EscapeSequence,
  81. InactiveEscapeSequence,
  82. };
  83. QsciLexerCPP(QObject *parent /TransferThis/ = 0,
  84. bool caseInsensitiveKeywords = false);
  85. const char *language() const;
  86. const char *lexer() const;
  87. QColor defaultColor(int style) const;
  88. bool defaultEolFill(int style) const;
  89. QFont defaultFont(int style) const;
  90. QColor defaultPaper(int style) const;
  91. const char *keywords(int set) const;
  92. QString description(int style) const;
  93. const char *wordCharacters() const;
  94. QStringList autoCompletionWordSeparators() const;
  95. const char *blockEnd(int *style = 0) const /Encoding="None"/;
  96. const char *blockStart(int *style = 0) const /Encoding="None"/;
  97. const char *blockStartKeyword(int *style = 0) const /Encoding="None"/;
  98. int braceStyle() const;
  99. void refreshProperties();
  100. bool foldAtElse() const;
  101. bool foldComments() const;
  102. bool foldCompact() const;
  103. bool foldPreprocessor() const;
  104. bool stylePreprocessor() const;
  105. void setDollarsAllowed(bool allowed);
  106. bool dollarsAllowed() const;
  107. void setHighlightTripleQuotedStrings(bool enable);
  108. bool highlightTripleQuotedStrings() const;
  109. void setHighlightHashQuotedStrings(bool enable);
  110. bool highlightHashQuotedStrings() const;
  111. void setHighlightBackQuotedStrings(bool enabled);
  112. bool highlightBackQuotedStrings() const;
  113. void setHighlightEscapeSequences(bool enabled);
  114. bool highlightEscapeSequences() const;
  115. void setVerbatimStringEscapeSequencesAllowed(bool allowed);
  116. bool verbatimStringEscapeSequencesAllowed() const;
  117. public slots:
  118. virtual void setFoldAtElse(bool fold);
  119. virtual void setFoldComments(bool fold);
  120. virtual void setFoldCompact(bool fold);
  121. virtual void setFoldPreprocessor(bool fold);
  122. virtual void setStylePreprocessor(bool style);
  123. protected:
  124. bool readProperties(QSettings &qs, const QString &prefix);
  125. bool writeProperties(QSettings &qs, const QString &prefix) const;
  126. private:
  127. QsciLexerCPP(const QsciLexerCPP &);
  128. };