kate Library API Documentation

katecmds.h

00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2003 Anders Lund <anders@alweb.dk>
00003    Copyright (C) 2001-2004 Christoph Cullmann <cullmann@kde.org>
00004    Copyright (C) 2001 Charles Samuels <charles@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #ifndef __KATE_CMDS_H__
00022 #define __KATE_CMDS_H__
00023 
00024 #include "../interfaces/document.h"
00025 #include "../interfaces/view.h"
00026 
00027 namespace KateCommands
00028 {
00029 
00036 class CoreCommands : public Kate::Command
00037 {
00038   public:
00046     bool exec( class Kate::View *view, const QString &cmd, QString &errorMsg );
00047 
00048     bool help( class Kate::View *, const QString &, QString & ) {return false;};
00049 
00054     QStringList cmds();
00055 };
00056 
00067 class SedReplace : public Kate::Command
00068 {
00069   public:
00077     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00078 
00079     bool help (class Kate::View *, const QString &, QString &) { return false; };
00080 
00085     QStringList cmds () { QStringList l; l << "s"<<"%s" /*<<"$s"*/; return l; };
00086   private:
00087     static QString sedMagic(QString textLine, const QString &find, const QString &replace, bool noCase, bool repeat);
00088 };
00089 
00098 class Character : public Kate::Command
00099 {
00100   public:
00108     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00109 
00110     bool help (class Kate::View *, const QString &, QString &) { return false; };
00111 
00116     QStringList cmds () { return QStringList("char"); };
00117 };
00118 
00122 class Goto : public Kate::Command
00123 {
00124   public:
00125     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00126 
00127     bool help (class Kate::View *, const QString &, QString &) { return false; };
00128 
00133     QStringList cmds () { return QStringList("goto"); };
00134 };
00135 
00139 class Date : public Kate::Command
00140 {
00141   public:
00149     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00150 
00151     bool help (class Kate::View *, const QString &, QString &) { return false; };
00152 
00157     QStringList cmds () { return QStringList("date"); };
00158 };
00159 
00160 }
00161 
00162 #endif
00163 
00164 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE Logo
This file is part of the documentation for kate Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Jan 15 13:35:02 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003