codecompletioninterface.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __ktexteditor_codecompletioninterface_h__
00020 #define __ktexteditor_codecompletioninterface_h__
00021
00022 #include <qstring.h>
00023 #include <qstringlist.h>
00024
00025 namespace KTextEditor
00026 {
00027
00040 class CompletionEntry
00041 {
00042 public:
00043 QString type;
00044 QString text;
00045 QString prefix;
00046 QString postfix;
00047 QString comment;
00048
00049 QString userdata;
00050
00051 bool operator==( const CompletionEntry &c ) const {
00052 return ( c.type == type &&
00053 c.text == text &&
00054 c.postfix == postfix &&
00055 c.prefix == prefix &&
00056 c.comment == comment &&
00057 c.userdata == userdata);
00058 }
00059 };
00060
00084 class CodeCompletionInterface
00085 {
00086 friend class PrivateCodeCompletionInterface;
00087
00088 public:
00089 CodeCompletionInterface();
00090 virtual ~CodeCompletionInterface();
00091
00092 unsigned int codeCompletionInterfaceNumber () const;
00093
00094 protected:
00095 void setCodeCompletionInterfaceDCOPSuffix (const QCString &suffix);
00096
00097
00098 public:
00099
00100
00101
00105 virtual void showArgHint (QStringList functionList, const QString& strWrapping, const QString& strDelimiter) = 0;
00106
00113 virtual void showCompletionBox (QValueList<CompletionEntry> complList,int offset=0, bool casesensitive=true)=0;
00114
00115
00116
00117
00118 public:
00119
00120
00131 virtual void completionAborted()=0;
00132
00144 virtual void completionDone()=0;
00145
00160 virtual void completionDone(CompletionEntry)=0;
00161
00172 virtual void argHintHidden()=0;
00173
00187 virtual void filterInsertString(CompletionEntry*,QString*)=0;
00188
00189
00190 private:
00191 class PrivateCodeCompletionInterface *d;
00192 static unsigned int globalCodeCompletionInterfaceNumber;
00193 unsigned int myCodeCompletionInterfaceNumber;
00194 };
00195
00196 CodeCompletionInterface *codeCompletionInterface (class View *view);
00197
00198 }
00199
00200 #endif
This file is part of the documentation for interfaces Library Version 3.3.0.