QsciAbstractAPIs Class Referenceabstract

`#include <qsciabstractapis.h>`

Inherits QObject.

## Public Member Functions

| QsciAbstractAPIs (QsciLexer *lexer)
virtual | ~QsciAbstractAPIs ()
QsciLexer * | lexer () const
virtual void | updateAutoCompletionList (const QStringList &context, QStringList &list)=0
virtual void | autoCompletionSelected (const QString &selection)
virtual QStringList | callTips (const QStringList &context, int commas, QsciScintilla::CallTipsStyle style, QList< int > &shifts)=0

## Detailed Description

The QsciAbstractAPIs class represents the interface to the textual API information used in call tips and for auto-completion. A sub-class will provide the actual implementation of the interface.

API information is specific to a particular language lexer but can be shared by multiple instances of the lexer.

## Constructor & Destructor Documentation

## QsciAbstractAPIs()

QsciAbstractAPIs::QsciAbstractAPIs | ( | QsciLexer * | lexer | ) |

Constructs a QsciAbstractAPIs instance attached to lexer lexer. lexer becomes the instance's parent object although the instance can also be subsequently attached to other lexers.

References lexer().

Referenced by callTips().

## Member Function Documentation

## updateAutoCompletionList()

virtual void QsciAbstractAPIs::updateAutoCompletionList | ( | const QStringList & | context,
|  | QStringList & | list )

pure virtual

Update the list list with API entries derived from context. context is the list of words in the text preceding the cursor position. The characters that make up a word and the characters that separate words are defined by the lexer. The last word is a partial word and may be empty if the user has just entered a word separator.

## autoCompletionSelected()

virtual void QsciAbstractAPIs::autoCompletionSelected | ( | const QString & | selection | ) |

virtual

This is called when the user selects the entry selection from the auto-completion list. A sub-class can use this as a hint to provide more specific API entries in future calls to updateAutoCompletionList(). The default implementation does nothing.

## callTips()

virtual QStringList QsciAbstractAPIs::callTips | ( | const QStringList & | context,
|  | int | commas,
|  | QsciScintilla::CallTipsStyle | style,
|  | QList< int > & | shifts )

pure virtual

Return the call tips valid for the context context. (Note that the last word of the context will always be empty.) commas is the number of commas the user has typed after the context and before the cursor position. The exact position of the list of call tips can be adjusted by specifying a corresponding left character shift in shifts. This is normally done to correct for any displayed context according to style.

See also
  updateAutoCompletionList()

References QsciAbstractAPIs().