qscilexerperl.sip 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. // This is the SIP interface definition for QsciLexerPerl.
  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 QsciLexerPerl : QsciLexer
  20. {
  21. %TypeHeaderCode
  22. #include <Qsci/qscilexerperl.h>
  23. %End
  24. public:
  25. enum {
  26. Default,
  27. Error,
  28. Comment,
  29. POD,
  30. Number,
  31. Keyword,
  32. DoubleQuotedString,
  33. SingleQuotedString,
  34. Operator,
  35. Identifier,
  36. Scalar,
  37. Array,
  38. Hash,
  39. SymbolTable,
  40. Regex,
  41. Substitution,
  42. Backticks,
  43. DataSection,
  44. HereDocumentDelimiter,
  45. SingleQuotedHereDocument,
  46. DoubleQuotedHereDocument,
  47. BacktickHereDocument,
  48. QuotedStringQ,
  49. QuotedStringQQ,
  50. QuotedStringQX,
  51. QuotedStringQR,
  52. QuotedStringQW,
  53. PODVerbatim,
  54. SubroutinePrototype,
  55. FormatIdentifier,
  56. FormatBody,
  57. DoubleQuotedStringVar,
  58. Translation,
  59. RegexVar,
  60. SubstitutionVar,
  61. BackticksVar,
  62. DoubleQuotedHereDocumentVar,
  63. BacktickHereDocumentVar,
  64. QuotedStringQQVar,
  65. QuotedStringQXVar,
  66. QuotedStringQRVar,
  67. };
  68. QsciLexerPerl(QObject *parent /TransferThis/ = 0);
  69. virtual ~QsciLexerPerl();
  70. const char *language() const;
  71. const char *lexer() const;
  72. QColor defaultColor(int style) const;
  73. bool defaultEolFill(int style) const;
  74. QFont defaultFont(int style) const;
  75. QColor defaultPaper(int style) const;
  76. const char *keywords(int set) const;
  77. QString description(int style) const;
  78. const char *wordCharacters() const;
  79. QStringList autoCompletionWordSeparators() const;
  80. const char *blockEnd(int *style = 0) const /Encoding="None"/;
  81. const char *blockStart(int *style = 0) const /Encoding="None"/;
  82. int braceStyle() const;
  83. void refreshProperties();
  84. bool foldComments() const;
  85. bool foldCompact() const;
  86. void setFoldAtElse(bool fold);
  87. bool foldAtElse() const;
  88. void setFoldPackages(bool fold);
  89. bool foldPackages() const;
  90. void setFoldPODBlocks(bool fold);
  91. bool foldPODBlocks() const;
  92. public slots:
  93. virtual void setFoldComments(bool fold);
  94. virtual void setFoldCompact(bool fold);
  95. protected:
  96. bool readProperties(QSettings &qs, const QString &prefix);
  97. bool writeProperties(QSettings &qs, const QString &prefix) const;
  98. private:
  99. QsciLexerPerl(const QsciLexerPerl &);
  100. };