• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • interfaces/tdetexteditor
 

interfaces/tdetexteditor

  • KTextEditor
  • CodeCompletionInterface
Public Member Functions | Protected Member Functions | Friends | List of all members
KTextEditor::CodeCompletionInterface Class Referenceabstract

#include <codecompletioninterface.h>

Public Member Functions

unsigned int codeCompletionInterfaceNumber () const
 
virtual void showArgHint (TQStringList functionList, const TQString &strWrapping, const TQString &strDelimiter)=0
 
virtual void showCompletionBox (TQValueList< CompletionEntry > complList, int offset=0, bool casesensitive=true)=0
 
virtual void completionAborted ()=0
 
virtual void completionDone ()=0
 
virtual void completionDone (CompletionEntry)=0
 
virtual void argHintHidden ()=0
 
virtual void filterInsertString (CompletionEntry *, TQString *)=0
 

Protected Member Functions

void setCodeCompletionInterfaceDCOPSuffix (const TQCString &suffix)
 

Friends

class PrivateCodeCompletionInterface
 

Detailed Description

This is an interface for the KTextEditor::View 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 completionExtendedComment(CompletionEntry)

This is emitted when the user has completed the argument entry (ie. enters the wrapping symbol(s) void argHintCompleted()

This is emitted when there is a reason other than completion for the hint being hidden. void argHintAborted()

This is emitted when a code completion box is about to be displayed void aboutToShowCompletionBox()

Definition at line 86 of file codecompletioninterface.h.

Constructor & Destructor Documentation

◆ CodeCompletionInterface()

CodeCompletionInterface::CodeCompletionInterface ( )

Definition at line 20 of file codecompletioninterface.cpp.

◆ ~CodeCompletionInterface()

CodeCompletionInterface::~CodeCompletionInterface ( )
virtual

Definition at line 28 of file codecompletioninterface.cpp.

Member Function Documentation

◆ argHintHidden()

virtual void KTextEditor::CodeCompletionInterface::argHintHidden ( )
pure virtual

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

◆ codeCompletionInterfaceNumber()

unsigned int CodeCompletionInterface::codeCompletionInterfaceNumber ( ) const

Definition at line 33 of file codecompletioninterface.cpp.

◆ completionAborted()

virtual void KTextEditor::CodeCompletionInterface::completionAborted ( )
pure virtual

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

◆ completionDone() [1/2]

virtual void KTextEditor::CodeCompletionInterface::completionDone ( )
pure virtual

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

◆ completionDone() [2/2]

virtual void KTextEditor::CodeCompletionInterface::completionDone ( CompletionEntry  )
pure virtual

This signal is the same as completionDone(), 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 CompleteionEntry, 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.

◆ filterInsertString()

virtual void KTextEditor::CodeCompletionInterface::filterInsertString ( CompletionEntry *  ,
TQString *   
)
pure virtual

This signal is emitted just before a completion takes place.

You can use it to modify the CompletionEntry. 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

◆ setCodeCompletionInterfaceDCOPSuffix()

void CodeCompletionInterface::setCodeCompletionInterfaceDCOPSuffix ( const TQCString &  suffix)
protected

Definition at line 38 of file codecompletioninterface.cpp.

◆ showArgHint()

virtual void KTextEditor::CodeCompletionInterface::showArgHint ( TQStringList  functionList,
const TQString &  strWrapping,
const TQString &  strDelimiter 
)
pure virtual

This shows an argument hint.

◆ showCompletionBox()

virtual void KTextEditor::CodeCompletionInterface::showCompletionBox ( TQValueList< CompletionEntry >  complList,
int  offset = 0,
bool  casesensitive = true 
)
pure virtual

This shows a completion list.

offset is the real start of the text that should be completed. 0 means that the text starts at the current cursor position. if casesensitive is true, the popup will only contain completions that match the input text regarding case.

Friends And Related Function Documentation

◆ PrivateCodeCompletionInterface

friend class PrivateCodeCompletionInterface
friend

Definition at line 88 of file codecompletioninterface.h.


The documentation for this class was generated from the following files:
  • codecompletioninterface.h
  • codecompletioninterface.cpp

interfaces/tdetexteditor

Skip menu "interfaces/tdetexteditor"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

interfaces/tdetexteditor

Skip menu "interfaces/tdetexteditor"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for interfaces/tdetexteditor by doxygen 1.9.4
This website is maintained by Timothy Pearson.