qscilexer.sip 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // This is the SIP interface definition for QsciLexer.
  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 QsciLexer : QObject
  20. {
  21. %TypeHeaderCode
  22. #include <Qsci/qscilexer.h>
  23. %End
  24. public:
  25. QsciLexer(QObject *parent /TransferThis/ = 0);
  26. virtual ~QsciLexer();
  27. virtual const char *language() const = 0;
  28. virtual const char *lexer() const;
  29. virtual int lexerId() const;
  30. QsciAbstractAPIs *apis() const;
  31. virtual const char *autoCompletionFillups() const /Encoding="None"/;
  32. virtual QStringList autoCompletionWordSeparators() const;
  33. int autoIndentStyle();
  34. virtual const char *blockEnd(int *style = 0) const /Encoding="None"/;
  35. virtual int blockLookback() const;
  36. virtual const char *blockStart(int *style = 0) const /Encoding="None"/;
  37. virtual const char *blockStartKeyword(int *style = 0) const /Encoding="None"/;
  38. virtual int braceStyle() const;
  39. virtual bool caseSensitive() const;
  40. virtual QColor color(int style) const;
  41. virtual bool eolFill(int style) const;
  42. virtual QFont font(int style) const;
  43. virtual int indentationGuideView() const;
  44. virtual const char *keywords(int set) const;
  45. virtual QString description(int style) const = 0;
  46. virtual QColor paper(int style) const;
  47. QColor defaultColor() const;
  48. virtual QColor defaultColor(int style) const;
  49. virtual bool defaultEolFill(int style) const;
  50. QFont defaultFont() const;
  51. virtual QFont defaultFont(int style) const;
  52. QColor defaultPaper() const;
  53. virtual QColor defaultPaper(int style) const;
  54. virtual int defaultStyle() const;
  55. QsciScintilla *editor() const;
  56. virtual void refreshProperties();
  57. void setAPIs(QsciAbstractAPIs *apis);
  58. void setDefaultColor(const QColor &c);
  59. void setDefaultFont(const QFont &f);
  60. void setDefaultPaper(const QColor &c);
  61. virtual int styleBitsNeeded() const;
  62. virtual const char *wordCharacters() const;
  63. bool readSettings(QSettings &qs, const char *prefix = "/Scintilla");
  64. bool writeSettings(QSettings &qs, const char *prefix = "/Scintilla") const;
  65. public slots:
  66. virtual void setAutoIndentStyle(int autoindentstyle);
  67. virtual void setColor(const QColor &c, int style = -1);
  68. virtual void setEolFill(bool eolfill, int style = -1);
  69. virtual void setFont(const QFont &f, int style = -1);
  70. virtual void setPaper(const QColor &c, int style = -1);
  71. signals:
  72. void colorChanged(const QColor &c, int style);
  73. void eolFillChanged(bool eolfilled, int style);
  74. void fontChanged(const QFont &f, int style);
  75. void paperChanged(const QColor &c, int style);
  76. void propertyChanged(const char *prop, const char *val);
  77. protected:
  78. virtual bool readProperties(QSettings &qs, const QString &prefix);
  79. virtual bool writeProperties(QSettings &qs, const QString &prefix) const;
  80. private:
  81. QsciLexer(const QsciLexer &);
  82. };