\section{Kate::Command\-Extension Class Reference}
\label{classKate_1_1CommandExtension}\index{Kate::CommandExtension@{Kate::CommandExtension}}
Extension to the {\bf Command}{\rm (p.\,\pageref{classKate_1_1Command})} interface, allowing to interact with commands during typing.  


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

Inheritance diagram for Kate::Command\-Extension:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=101pt]{classKate_1_1CommandExtension__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf flag\-Completions} ({\bf QString\-List} \&)
\item 
virtual {\bf KCompletion} $\ast$ {\bf completion\-Object} (const {\bf QString} \&cmdname, {\bf Kate::View} $\ast$)
\item 
virtual bool {\bf wants\-To\-Process\-Text} (const {\bf QString} \&cmdname)
\item 
virtual void {\bf process\-Text} ({\bf Kate::View} $\ast$view, const {\bf QString} \&text)
\end{CompactItemize}


\subsection{Detailed Description}
Extension to the {\bf Command}{\rm (p.\,\pageref{classKate_1_1Command})} interface, allowing to interact with commands during typing. 

This allows for completion and for example the isearch plugin. If you develop a command that wants to complete or process text as thu user types the arguments, or that has flags, you can have your command inherit this class. 



Definition at line 129 of file document.h.

\subsection{Member Function Documentation}
\index{Kate::CommandExtension@{Kate::Command\-Extension}!flagCompletions@{flagCompletions}}
\index{flagCompletions@{flagCompletions}!Kate::CommandExtension@{Kate::Command\-Extension}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void Kate::Command\-Extension::flag\-Completions ({\bf QString\-List} \&)\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKate_1_1CommandExtension_a2}


Fill in a list of flags to complete from. 

Each flag is a single letter, any following text in the string is taken to be a description of the flag's meaning, and showed to the user as a hint. Implement this method if your command has flags.

This method is called each time the flag string in the typed command is changed, so that the available flags can be adjusted. When completions are displayed, existing flags are left out. 

Definition at line 146 of file document.h.\index{Kate::CommandExtension@{Kate::Command\-Extension}!completionObject@{completionObject}}
\index{completionObject@{completionObject}!Kate::CommandExtension@{Kate::Command\-Extension}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf KCompletion}$\ast$ Kate::Command\-Extension::completion\-Object (const {\bf QString} \& {\em cmdname}, {\bf Kate::View} $\ast$)\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKate_1_1CommandExtension_a3}


\begin{Desc}
\item[Returns:]a {\bf KCompletion} object that will substitute the command line default one while typing the first argument to the command. The text will be added to the command seperated by one space character.\end{Desc}
Implement this method if your command can provide a completion object.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmdname}]The command name associated with this request. \end{description}
\end{Desc}


Reimplemented in {\bf Kate\-Commands::Core\-Commands} {\rm (p.\,\pageref{classKateCommands_1_1CoreCommands_a3})}.

Definition at line 157 of file document.h.\index{Kate::CommandExtension@{Kate::Command\-Extension}!wantsToProcessText@{wantsToProcessText}}
\index{wantsToProcessText@{wantsToProcessText}!Kate::CommandExtension@{Kate::Command\-Extension}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool Kate::Command\-Extension::wants\-To\-Process\-Text (const {\bf QString} \& {\em cmdname})\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKate_1_1CommandExtension_a4}


\begin{Desc}
\item[Returns:]whether this command wants to process text interactively given the {\tt cmdname}. If true, the command's {\bf process\-Text()}{\rm (p.\,\pageref{classKate_1_1CommandExtension_a5})} method is called when the text in the command line is changed.\end{Desc}
Reimplement this to return true, if your commands wants to process the text as typed.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmdname}]the command name associated with this query. \end{description}
\end{Desc}


Definition at line 169 of file document.h.\index{Kate::CommandExtension@{Kate::Command\-Extension}!processText@{processText}}
\index{processText@{processText}!Kate::CommandExtension@{Kate::Command\-Extension}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void Kate::Command\-Extension::process\-Text ({\bf Kate::View} $\ast$ {\em view}, const {\bf QString} \& {\em text})\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKate_1_1CommandExtension_a5}


This is called by the commandline each time the argument text for the command changes, if {\bf wants\-To\-Process\-Text()}{\rm (p.\,\pageref{classKate_1_1CommandExtension_a4})} returns true. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em view}]The current view \item[{\em text}]The current command text typed by the user. \end{description}
\end{Desc}


Definition at line 177 of file document.h.

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