# interfaces Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# 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
    00077 class CodeCompletionInterface
    00078 {
    00079   friend class PrivateCodeCompletionInterface;
    00080
    00081   public:
    00082         CodeCompletionInterface();
    00083         virtual ~CodeCompletionInterface();
    00084
    00085         unsigned int codeCompletionInterfaceNumber () const;
    00086
    00087   protected:
    00088     void setCodeCompletionInterfaceDCOPSuffix (const QCString &suffix);
    00089
    00090
    00091   public:
    00092         //
    00093         // slots !!!
    00094         //
    00098     virtual void showArgHint (QStringList functionList, const QString& strWrapping, const QString& strDelimiter) = 0;
    00099
    00106     virtual void showCompletionBox (QValueList<CompletionEntry> complList,int offset=0, bool casesensitive=true)=0;
    00107
    00108         //
    00109         // signals !!!
    00110         //
    00111         public:
    00112
    00113
    00124     virtual void completionAborted()=0;
    00125
    00137     virtual void completionDone()=0;
    00138
    00153     virtual void completionDone(CompletionEntry)=0;
    00154
    00165     virtual void argHintHidden()=0;
    00166
    00180     virtual void filterInsertString(CompletionEntry*,QString*)=0;
    00181
    00182
    00183   private:
    00184     class PrivateCodeCompletionInterface *d;
    00185     static unsigned int globalCodeCompletionInterfaceNumber;
    00186     unsigned int myCodeCompletionInterfaceNumber;
    00187 };
    00188
    00189 CodeCompletionInterface *codeCompletionInterface (class View *view);
    00190
    00191 }
    00192
    00193 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:30:49 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001