wxMaxima
Data Structures | Public Types | Public Member Functions | Static Public Member Functions
AutoComplete Class Reference
Inheritance diagram for AutoComplete:
[legend]
Collaboration diagram for AutoComplete:
[legend]

Public Types

enum  autoCompletionType {
  command = 0 , tmplte , loadfile , demofile ,
  generalfile , esccommand , unit , numberOfTypes
}
 All types of things we can autocomplete. More...
 
using WordList = std::vector< wxString >
 

Public Member Functions

 AutoComplete (Configuration *configuration)
 
virtual ~AutoComplete ()
 The destructor of AutoComplete.
 
void LoadSymbols ()
 Load all autocomplete symbols wxMaxima knows about by itself.
 
void LoadBuiltinSymbols ()
 Makes wxMaxima know all its builtin symbols. More...
 
void AddSymbol (wxString fun, autoCompletionType type=command)
 Manually add an autocompletable symbol to our symbols lists. More...
 
void AddSymbols (wxString xml)
 Interprets the XML autocompletable symbol list maxima can send us.
 
void AddSymbols (wxXmlDocument xml)
 Interprets the XML autocompletable symbol list maxima can send us.
 
void AddSymbols_Backgroundtask_string (wxString xml)
 The real work of AddSymbols is made here and in the background.
 
void AddSymbols_Backgroundtask (wxXmlDocument xmldoc)
 The real work of AddSymbols is made here and in the background.
 
void UpdateDemoFiles (wxString partial, const wxString &maximaDir)
 Replace the list of files in the directory the worksheet file is in to the demo files list.
 
void UpdateLoadFiles (wxString partial, const wxString &maximaDir)
 Replace the list of files in the directory the worksheet file is in to the load files list.
 
void UpdateGeneralFiles (wxString partial, const wxString &maximaDir)
 Assemble a list of files.
 
void AddWorksheetWords (const WordList &words)
 Add words to the list of words that appear in the workSheet's code cells.
 
void AddWorksheetWords (WordList::const_iterator begin, WordList::const_iterator end)
 
void ClearWorksheetWords ()
 Clear the list of words that appear in the workSheet's code cells.
 
void ClearDemofileList ()
 Clear the list of files demo() can be applied on.
 
std::vector< wxString > CompleteSymbol (wxString partial, autoCompletionType type=command)
 Returns a list of possible autocompletions for the string "partial". More...
 
std::vector< wxString > GetDemoFilesList ()
 Returns a list of demo files we know of.
 
std::vector< wxString > GetSymbolList ()
 Returns a list of Symbols we know.
 
bool HasDemofile (const wxString &commandname)
 Does a demo file for this command exist?
 

Static Public Member Functions

static wxString FixTemplate (wxString templ)
 Basically runs a regex over templates. More...
 

Member Enumeration Documentation

◆ autoCompletionType

All types of things we can autocomplete.

Enumerator
tmplte 

Command names.

Attention
Must be the first entry in this enum
loadfile 

Function templates.

demofile 

loadable files

generalfile 

loadable files

esccommand 

general files

unit 

Esc commands describing symbols.

numberOfTypes 

Unit names.

Attention
Must be the last entry in this enum Not a completion type, but the marker for how many types there are

Member Function Documentation

◆ AddSymbol()

void AutoComplete::AddSymbol ( wxString  fun,
autoCompletionType  type = command 
)

Manually add an autocompletable symbol to our symbols lists.

Check for function of template

Add symbols

Add templates - for given function and given argument count we only add one template. We count the arguments by counting '<'

◆ CompleteSymbol()

std::vector< wxString > AutoComplete::CompleteSymbol ( wxString  partial,
autoCompletionType  type = command 
)

Returns a list of possible autocompletions for the string "partial".

Returns a string array with functions which start with partial.

◆ FixTemplate()

wxString AutoComplete::FixTemplate ( wxString  templ)
static

Basically runs a regex over templates.

This will change optional arguments

◆ LoadBuiltinSymbols()

void AutoComplete::LoadBuiltinSymbols ( )

Makes wxMaxima know all its builtin symbols.

This function might cause a compiler warning because it is suspiciously long. For the same reason it has been split into a separate file.


The documentation for this class was generated from the following files: