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