interfaces Library API Documentation

codecompletioninterface.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00016 Boston, MA 02111-1307, USA. 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 // slots !!! 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 // signals !!! 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
KDE Logo
This file is part of the documentation for interfaces Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 8 11:15:29 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003