KTextEditor

motion.h
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 */
combined class for motions and text objects.
Definition motion.h:23
Commands for the vi normal mode.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:03:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.