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, 2003 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 
00033 namespace KateCommands
00034 {
00035 
00036 /*
00037   This Kate::Command provides access to a lot of the core functionality
00038   of kate part, settings, utilities, navigation etc.
00039   it needs to get a kateview pointer, it will cast the kate::view pointer
00040   hard to kateview
00041 */
00042 class CoreCommands : public Kate::Command
00043 {
00044   public:
00045     bool exec( class Kate::View *view, const QString &cmd, QString &errorMsg );
00046   
00047     bool help( class Kate::View *, const QString &, QString & ) {return false;};
00048   
00049     QStringList cmds();
00050 };
00051 
00062 class SedReplace : public Kate::Command
00063 {
00064   public:
00065     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00066 
00067     bool help (class Kate::View *, const QString &, QString &) { return false; };
00068 
00069     QStringList cmds () { return QStringList("s"); };
00070 
00071   private:
00072     static QString sedMagic(QString textLine, const QString &find, const QString &replace, bool noCase, bool repeat);
00073 };
00074 
00083 class Character : public Kate::Command
00084 {
00085   public:
00086     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00087 
00088     bool help (class Kate::View *, const QString &, QString &) { return false; };
00089 
00090     QStringList cmds () { return QStringList("char"); };
00091 };
00092 
00093 class Goto : public Kate::Command
00094 {
00095   public:
00096     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00097 
00098     bool help (class Kate::View *, const QString &, QString &) { return false; };
00099 
00100     QStringList cmds () { return QStringList("goto"); };
00101 };
00102 
00103 class Date : public Kate::Command
00104 {
00105   public:
00106     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00107 
00108     bool help (class Kate::View *, const QString &, QString &) { return false; };
00109 
00110     QStringList cmds () { return QStringList("date"); };
00111 };
00112 
00113 }
00114 
00115 // vim: noet
00116 
00117 #endif
KDE Logo
This file is part of the documentation for kate Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun May 16 22:07:02 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003