qscicommand.sip 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. // This is the SIP interface definition for QsciCommand.
  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 QsciCommand
  20. {
  21. %TypeHeaderCode
  22. #include <Qsci/qscicommand.h>
  23. %End
  24. public:
  25. enum Command {
  26. LineDown,
  27. LineDownExtend,
  28. LineDownRectExtend,
  29. LineScrollDown,
  30. LineUp,
  31. LineUpExtend,
  32. LineUpRectExtend,
  33. LineScrollUp,
  34. ScrollToStart,
  35. ScrollToEnd,
  36. VerticalCentreCaret,
  37. ParaDown,
  38. ParaDownExtend,
  39. ParaUp,
  40. ParaUpExtend,
  41. CharLeft,
  42. CharLeftExtend,
  43. CharLeftRectExtend,
  44. CharRight,
  45. CharRightExtend,
  46. CharRightRectExtend,
  47. WordLeft,
  48. WordLeftExtend,
  49. WordRight,
  50. WordRightExtend,
  51. WordLeftEnd,
  52. WordLeftEndExtend,
  53. WordRightEnd,
  54. WordRightEndExtend,
  55. WordPartLeft,
  56. WordPartLeftExtend,
  57. WordPartRight,
  58. WordPartRightExtend,
  59. Home,
  60. HomeExtend,
  61. HomeRectExtend,
  62. HomeDisplay,
  63. HomeDisplayExtend,
  64. HomeWrap,
  65. HomeWrapExtend,
  66. VCHome,
  67. VCHomeExtend,
  68. VCHomeRectExtend,
  69. VCHomeWrap,
  70. VCHomeWrapExtend,
  71. LineEnd,
  72. LineEndExtend,
  73. LineEndRectExtend,
  74. LineEndDisplay,
  75. LineEndDisplayExtend,
  76. LineEndWrap,
  77. LineEndWrapExtend,
  78. DocumentStart,
  79. DocumentStartExtend,
  80. DocumentEnd,
  81. DocumentEndExtend,
  82. PageUp,
  83. PageUpExtend,
  84. PageUpRectExtend,
  85. PageDown,
  86. PageDownExtend,
  87. PageDownRectExtend,
  88. StutteredPageUp,
  89. StutteredPageUpExtend,
  90. StutteredPageDown,
  91. StutteredPageDownExtend,
  92. Delete,
  93. DeleteBack,
  94. DeleteBackNotLine,
  95. DeleteWordLeft,
  96. DeleteWordRight,
  97. DeleteWordRightEnd,
  98. DeleteLineLeft,
  99. DeleteLineRight,
  100. LineDelete,
  101. LineCut,
  102. LineCopy,
  103. LineTranspose,
  104. LineDuplicate,
  105. SelectAll,
  106. MoveSelectedLinesUp,
  107. MoveSelectedLinesDown,
  108. SelectionDuplicate,
  109. SelectionLowerCase,
  110. SelectionUpperCase,
  111. SelectionCut,
  112. SelectionCopy,
  113. Paste,
  114. EditToggleOvertype,
  115. Newline,
  116. Formfeed,
  117. Tab,
  118. Backtab,
  119. Cancel,
  120. Undo,
  121. Redo,
  122. ZoomIn,
  123. ZoomOut,
  124. };
  125. Command command() const;
  126. void execute();
  127. void setKey(int key);
  128. void setAlternateKey(int altkey);
  129. int key() const;
  130. int alternateKey() const;
  131. static bool validKey(int key);
  132. QString description() const;
  133. private:
  134. QsciCommand(QsciScintilla *qs, Command cmd, int key, int altkey,
  135. const char *desc);
  136. QsciCommand(const QsciCommand &);
  137. };