• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

  • kate
  • part
katecmds.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2003 Anders Lund <anders@alweb.dk>
3  Copyright (C) 2001-2004 Christoph Cullmann <cullmann@kde.org>
4  Copyright (C) 2001 Charles Samuels <charles@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef __KATE_CMDS_H__
22 #define __KATE_CMDS_H__
23 
24 #include "../interfaces/document.h"
25 #include "../interfaces/view.h"
26 
27 class KateDocument;
28 class TDECompletion;
29 
30 namespace KateCommands
31 {
32 
39 class CoreCommands : public Kate::Command, public Kate::CommandExtension
40 {
41  public:
49  bool exec( class Kate::View *view, const TQString &cmd, TQString &errorMsg );
50 
51  bool help( class Kate::View *, const TQString &, TQString & ) {return false;};
52 
57  TQStringList cmds();
58 
62  TDECompletion *completionObject( const TQString &cmd, Kate::View *view );
63 };
64 
75 class SedReplace : public Kate::Command
76 {
77  public:
85  bool exec (class Kate::View *view, const TQString &cmd, TQString &errorMsg);
86 
87  bool help (class Kate::View *, const TQString &, TQString &) { return false; };
88 
93  TQStringList cmds () { TQStringList l("s"); l << "%s" << "$s"; return l; };
94 
95  private:
115  static int sedMagic(KateDocument *doc, int &line,
116  const TQString &find, const TQString &replace, const TQString &delim,
117  bool noCase, bool repeat,
118  uint startcol=0, int endcol=-1);
119 };
120 
129 class Character : public Kate::Command
130 {
131  public:
139  bool exec (class Kate::View *view, const TQString &cmd, TQString &errorMsg);
140 
141  bool help (class Kate::View *, const TQString &, TQString &) { return false; };
142 
147  TQStringList cmds () { return TQStringList("char"); };
148 };
149 
153 class Date : public Kate::Command
154 {
155  public:
163  bool exec (class Kate::View *view, const TQString &cmd, TQString &errorMsg);
164 
165  bool help (class Kate::View *, const TQString &, TQString &) { return false; };
166 
171  TQStringList cmds () { return TQStringList("date"); };
172 };
173 
174 
175 } // namespace KateCommands
176 #endif
KateCommands::CoreCommands
This Kate::Command provides access to a lot of the core functionality of kate part, settings, utilities, navigation etc.
Definition: katecmds.h:39
Kate::CommandExtension
Extension to the Command interface, allowing to interact with commands during typing.
Definition: document.h:129
KateCommands::Date
insert the current date/time in the given format
Definition: katecmds.h:153
KateCommands::SedReplace::help
bool help(class Kate::View *, const TQString &, TQString &)
Shows help for the given view and cmd string, return a bool about success, msg for status...
Definition: katecmds.h:87
KateCommands::SedReplace::exec
bool exec(class Kate::View *view, const TQString &cmd, TQString &errorMsg)
execute command
Definition: katecmds.cpp:471
TDECompletion
KateCommands::Character::help
bool help(class Kate::View *, const TQString &, TQString &)
Shows help for the given view and cmd string, return a bool about success, msg for status...
Definition: katecmds.h:141
KateCommands::SedReplace
– Charles Samuels charles@kde.org Support vim/sed find and replace s/search/replace/ find search...
Definition: katecmds.h:75
Kate::View
The Kate::View text editor interface.
Definition: view.h:42
KateCommands::Date::cmds
TQStringList cmds()
supported commands as prefixes
Definition: katecmds.h:171
KateCommands::Character
insert a unicode or ascii character base 9+1: 1234 hex: 0x1234 or x1234 octal: 01231 ...
Definition: katecmds.h:129
KateCommands::Character::exec
bool exec(class Kate::View *view, const TQString &cmd, TQString &errorMsg)
execute command
Definition: katecmds.cpp:549
KateCommands::Date::help
bool help(class Kate::View *, const TQString &, TQString &)
Shows help for the given view and cmd string, return a bool about success, msg for status...
Definition: katecmds.h:165
Kate::Command
Kate Commands.
Definition: document.h:96
KateCommands::CoreCommands::help
bool help(class Kate::View *, const TQString &, TQString &)
Shows help for the given view and cmd string, return a bool about success, msg for status...
Definition: katecmds.h:51
KateCommands::SedReplace::cmds
TQStringList cmds()
supported commands as prefixes
Definition: katecmds.h:93
KateCommands::Character::cmds
TQStringList cmds()
supported commands as prefixes
Definition: katecmds.h:147
KateCommands::CoreCommands::completionObject
TDECompletion * completionObject(const TQString &cmd, Kate::View *view)
override completionObject from interfaces/document.h .
Definition: katecmds.cpp:282
KateCommands::CoreCommands::exec
bool exec(class Kate::View *view, const TQString &cmd, TQString &errorMsg)
execute command
Definition: katecmds.cpp:89
KateCommands::Date::exec
bool exec(class Kate::View *view, const TQString &cmd, TQString &errorMsg)
execute command
Definition: katecmds.cpp:591
KateCommands
Definition: katecmds.h:30
KateCommands::CoreCommands::cmds
TQStringList cmds()
supported commands as prefixes
Definition: katecmds.cpp:72

kate

Skip menu "kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kate

Skip menu "kate"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for kate by doxygen 1.8.8
This website is maintained by Timothy Pearson.