1/*
2 SPDX-FileCopyrightText: 2008 Erlend Hamberg <ehamberg@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KATEVI_MOTION_H
8#define KATEVI_MOTION_H
9
10#include <vimode/command.h>
11#include <vimode/range.h>
12
13namespace KateVi
14{
15class NormalViMode;
16/**
17 * combined class for motions and text objects. execute() returns a KateViRange.
18 * For motions the returned range is only a position (start pos is (-1, -1) to
19 * indicate this) for text objects a range (startx, starty), (endx, endy) is
20 * returned
21 */
22class Motion : public Command
23{
24public:
25 Motion(const QString &pattern, Range (NormalViMode::*commandMethod)(), unsigned int flags = 0);
26 Range execute(NormalViMode *mode) const;
27
28protected:
29 Range (NormalViMode::*m_ptr2commandMethod)();
30};
31
32}
33
34#endif /* KATEVI_MOTION_H */
35

source code of ktexteditor/src/vimode/motion.h