wex v24.04.0
Public Member Functions | List of all members
wex::auto_complete Class Reference

Offers a class for auto completion on wex::stc. More...

#include <wex/stc/auto-complete.h>

Public Member Functions

 auto_complete (stc *stc)
 Constructor, provide stc to trigger completion.
 
 ~auto_complete ()
 Destructor.
 
void clear ()
 Clears data.
 
bool complete (const std::string &text)
 Completes the auto completed text.
 
const auto & insert () const
 Returns current insert.
 
const auto & inserts () const
 Returns all inserts (independent of scope)
 
bool on_char (char c)
 Builds and shows auto complete lists on the stc component.
 
bool sync () const
 Takes care that auto complete scope is updated with level information on current stc position.
 
bool use () const
 Returns true if active.
 
void use (bool on)
 Sets auto completion on or off.
 
const std::string variable (const std::string &name) const
 Returns the class name of variable for current level (scope).
 

Detailed Description

Offers a class for auto completion on wex::stc.

Member Function Documentation

◆ complete()

bool wex::auto_complete::complete ( const std::string & text)

Completes the auto completed text.

This might setup a filter for next auto complete list.

◆ insert()

const auto & wex::auto_complete::insert ( ) const
inline

Returns current insert.

(e.g. a variable or a class name)

◆ on_char()

bool wex::auto_complete::on_char ( char c)

Builds and shows auto complete lists on the stc component.

This can be a list according to CTags, previously inserted text, or keywords for current lexer. Returns true if show was invoked.

◆ sync()

bool wex::auto_complete::sync ( ) const

Takes care that auto complete scope is updated with level information on current stc position.

Returns true if update was done.