\section{KText\-Editor::Code\-Completion\-Interface Class Reference}
\label{classKTextEditor_1_1CodeCompletionInterface}\index{KTextEditor::CodeCompletionInterface@{KTextEditor::CodeCompletionInterface}}
This is an interface for the {\bf KText\-Editor::View}{\rm (p.\,\pageref{classKTextEditor_1_1View})} class.  


{\tt \#include $<$codecompletioninterface.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
unsigned int {\bf code\-Completion\-Interface\-Number} () const \label{classKTextEditor_1_1CodeCompletionInterface_a2}

\item 
virtual void {\bf show\-Arg\-Hint} ({\bf QString\-List} function\-List, const {\bf QString} \&str\-Wrapping, const {\bf QString} \&str\-Delimiter)=0
\item 
virtual void {\bf show\-Completion\-Box} ({\bf QValue\-List}$<$ {\bf Completion\-Entry} $>$ compl\-List, int offset=0, bool casesensitive=true)=0
\item 
virtual void {\bf completion\-Aborted} ()=0
\item 
virtual void {\bf completion\-Done} ()=0
\item 
virtual void {\bf completion\-Done} ({\bf Completion\-Entry})=0
\item 
virtual void {\bf arg\-Hint\-Hidden} ()=0
\item 
virtual void {\bf filter\-Insert\-String} ({\bf Completion\-Entry} $\ast$, {\bf QString} $\ast$)=0
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf set\-Code\-Completion\-Interface\-DCOPSuffix} (const {\bf QCString} \&suffix)\label{classKTextEditor_1_1CodeCompletionInterface_b0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf Private\-Code\-Completion\-Interface}\label{classKTextEditor_1_1CodeCompletionInterface_n0}

\end{CompactItemize}


\subsection{Detailed Description}
This is an interface for the {\bf KText\-Editor::View}{\rm (p.\,\pageref{classKTextEditor_1_1View})} class. 

It can be used to show completion lists, i.e. lists that pop up while a user is typing. The user can then choose from the list or he can just keep typing. The completion list will disappear if an item is chosen, if no completion is available or if the user presses Esc etc. The contents of the list is automatically adapted to the string the user types.

There are other signals, which may be implmemented, but aren't documented here, because it would have been a BIC change...:

void completion\-Extended\-Comment(Completion\-Entry)

This is emitted when the user has completed the argument entry (ie. enters the wrapping symbol(s) void arg\-Hint\-Completed()

This is emitted when there is a reason other than completion for the hint being hidden. void arg\-Hint\-Aborted()

This is emitted when a code completion box is about to be displayed void about\-To\-Show\-Completion\-Box() 



Definition at line 86 of file codecompletioninterface.h.

\subsection{Member Function Documentation}
\index{KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}!showArgHint@{showArgHint}}
\index{showArgHint@{showArgHint}!KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KText\-Editor::Code\-Completion\-Interface::show\-Arg\-Hint ({\bf QString\-List} {\em function\-List}, const {\bf QString} \& {\em str\-Wrapping}, const {\bf QString} \& {\em str\-Delimiter})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKTextEditor_1_1CodeCompletionInterface_a3}


This shows an argument hint. 

\index{KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}!showCompletionBox@{showCompletionBox}}
\index{showCompletionBox@{showCompletionBox}!KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KText\-Editor::Code\-Completion\-Interface::show\-Completion\-Box ({\bf QValue\-List}$<$ {\bf Completion\-Entry} $>$ {\em compl\-List}, int {\em offset} = {\tt 0}, bool {\em casesensitive} = {\tt true})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKTextEditor_1_1CodeCompletionInterface_a4}


This shows a completion list. 

{\tt offset} is the real start of the text that should be completed. {\tt 0} means that the text starts at the current cursor position. if {\tt casesensitive} is {\tt true}, the popup will only contain completions that match the input text regarding case. \index{KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}!completionAborted@{completionAborted}}
\index{completionAborted@{completionAborted}!KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KText\-Editor::Code\-Completion\-Interface::completion\-Aborted ()\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKTextEditor_1_1CodeCompletionInterface_a5}


This signal is emitted when the completion list disappears and no completion has been done. 

This is the case e.g. when the user presses Escape.

IMPORTANT: Please check if a connect to this signal worked, and implement some fallback when the implementation doesn't support it

IMPORTANT FOR IMPLEMENTERS: When you don't support this signal, please just override the inherited function, if you support it, declare it as a signal\index{KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}!completionDone@{completionDone}}
\index{completionDone@{completionDone}!KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KText\-Editor::Code\-Completion\-Interface::completion\-Done ()\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKTextEditor_1_1CodeCompletionInterface_a6}


This signal is emitted when the completion list disappears and a completion has been inserted into text. 

This is the case e.g. when the user presses Return on a selected item in the completion list.

IMPORTANT: Please check if a connect to this signal worked, and implement some fallback when the implementation doesn't support it

IMPORTANT FOR IMPLEMENTERS: When you don't support this signal, please just override the inherited function, if you support it, declare it as a signal\index{KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}!completionDone@{completionDone}}
\index{completionDone@{completionDone}!KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KText\-Editor::Code\-Completion\-Interface::completion\-Done ({\bf Completion\-Entry})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKTextEditor_1_1CodeCompletionInterface_a7}


This signal is the same as {\bf completion\-Done()}{\rm (p.\,\pageref{classKTextEditor_1_1CodeCompletionInterface_a6})}, but additionally it carries the information which completion item was used. 

IMPORTANT: Please check if a connect to this signal worked, and implement some fallback when the implementation doesn't support it

IMPORTANT: The pointer to the Completeion\-Entry, is only valid in the slots connected to this signal when the connected slots are left, the data element may be destroyed, depending on the implementation

IMPORTANT FOR IMPLEMENTERS: When you don't support this signal, please just override the inherited function, if you support it, declare it as a signal.\index{KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}!argHintHidden@{argHintHidden}}
\index{argHintHidden@{argHintHidden}!KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KText\-Editor::Code\-Completion\-Interface::arg\-Hint\-Hidden ()\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKTextEditor_1_1CodeCompletionInterface_a8}


This signal is emitted when the argument hint disappears. 

This is the case e.g. when the user moves the cursor somewhere else.

IMPORTANT: Please check if a connect to this signal worked, and implement some fallback when the implementation doesn't support it

IMPORTANT FOR IMPLEMENTERS: When you don't support this signal, please just override the inherited function, if you support it, declare it as a signal\index{KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}!filterInsertString@{filterInsertString}}
\index{filterInsertString@{filterInsertString}!KTextEditor::CodeCompletionInterface@{KText\-Editor::Code\-Completion\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KText\-Editor::Code\-Completion\-Interface::filter\-Insert\-String ({\bf Completion\-Entry} $\ast$, {\bf QString} $\ast$)\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKTextEditor_1_1CodeCompletionInterface_a9}


This signal is emitted just before a completion takes place. 

You can use it to modify the {\bf Completion\-Entry}{\rm (p.\,\pageref{classKTextEditor_1_1CompletionEntry})}. The modified entry will not be visible in the completion list (because that has just disappeared) but it will be used when the completion is inserted into the text.

IMPORTANT: Please check if a connect to this signal worked, and implement some fallback when the implementation doesn't support it

IMPORTANT FOR IMPLEMENTERS: When you don't support this signal, please just override the inherited function, if you support it, declare it as a signal

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
codecompletioninterface.h\item 
codecompletioninterface.cpp\end{CompactItemize}
