4#ifndef INCLUDED_GTERM_H
5#define INCLUDED_GTERM_H
23#include "../../kernel/syntax.hpp"
24#include "../../kernel/core/ui/calltipprovider.hpp"
90 void clear_area(
int start_x,
int start_y,
int end_x,
int end_y);
149 virtual void ProcessInput(
int len,
const std::string& sData);
150 virtual void ProcessOutput(
int len,
const std::string& sData);
161 virtual void Reset();
163 bool Scroll(
int numLines,
bool scrollUp);
184 int x,
int y,
const std::string& sText) = 0;
186 int x,
int y,
unsigned char c) = 0;
202 virtual void Select(
int x,
int y,
int select);
203 virtual unsigned char GetChar(
int x,
int y);
An implementation of a generic terminal, which has to be specialized in the child classes.
bool cursor_up()
Either moves the cursor up or performs a history jump.
bool del()
Perform a delete key operation.
void clear_mode_flag(int flag)
Clears a mode flag (mainly used to make the cursor visible again).
void erase_line()
Erases the current line in the internal buffer.
TextManager * GetTM()
Get a pointer to the internal text buffer.
int calc_color(int fg, int bg, int flags)
Returns the encoded color bitlist.
virtual ~GenericTerminal()
Empty destructor.
bool Scroll(int numLines, bool scrollUp)
virtual void Reset()
Simple wrapper around reset().
virtual void ProcessInput(int len, const std::string &sData)
virtual void ClearChars(int bg_color, int x, int y, int w, int h)
void set_mode_flag(int flag)
Sets a mode flag (only used to make the cursor invisble).
std::string get_selected_text()
Gets the selected text (if any).
virtual unsigned char GetChar(int x, int y)
Gets the character at the selected location.
virtual void Update()
Simple wrapper around update_changes()
virtual void CalltipCancel()
bool cursor_right()
Moves the cursor to the right.
void tab()
Evaluate the tab key (do not insert a tab character but try to autocomplete the current input).
void move_cursor(int x, int y)
virtual void ModeChange(int state)
virtual void ProcessOutput(int len, const std::string &sData)
Processes output returned from the kernel and hands it over to the internal buffer.
bool cursor_down()
Either moves the cursor down or performs a history jump.
void resetAutoComp(int mode)
Reset the current autocompletion list and the corresponding variables.
NumeRe::CallTipProvider * getProvider()
virtual void DrawCursor(int fg_color, int bg_color, int flags, int x, int y, unsigned char c)=0
virtual void Select(int x, int y, int select)
GenericTerminal(int w, int h)
Constructor.
virtual void Calltip(int x, int y, NumeRe::CallTip &_cTip)
bool cursor_left()
Moves the cursor to the left.
enum GenericTerminal::@2 MODES
virtual void ResizeTerminal(int _width, int _height)
bool end()
Moves the cursor to the rightmost position in the current line.
bool back()
Moves the cursor to the rightmost position in the whole input.
NumeRe::CallTipProvider m_tipProvider
std::string getProcNameSpace()
This member function evalutes the procedure signature and returns its namespace. Will only be called ...
bool home()
Moves the cursor to the leftmost position in the current line.
void SetTerminalHistory(int size)
Set the terminal buffer size (not the length of the input history). The length of the history (i....
int GetScrollPosition()
Returns the current scroll position.
NumeReSyntax * getSyntax()
virtual void SendBack(int len, char *data)
bool delSelected()
Delete a selected block.
bool ctrl_left()
Moves the cursor one word to the left.
void cr()
Insert a carriage return.
void handle_calltip(int x, int y)
Check, whether a calltip is needed and select the corresponding text from the CallTipProvider.
void clear_area(int start_x, int start_y, int end_x, int end_y)
std::string sAutoCompWordStart
void bell()
Perform a bell sound (not used).
int nCursorUpDownStartPos
bool bs()
Perform a backspace operation.
bool front()
Moves the cursor to the leftmost position in the whole input.
void reset()
Resets the terminal, so that it starts with an empty buffer.
void move_cursor_editable_area(int x, int y)
Moves the cursor to a location, if this location is editable.
void erase_usercontent_line()
Erases alle user-written contents from the current line.
virtual void SendBack(char *data)
virtual int IsSelected(int x, int y)
bool IsScrolledUp()
Determine, whether the terminal is scrolled up.
void ff()
Insert a form feed (not used).
void normal_output()
This member function is for printing the kernel's output to the console.
bool ctrl_right()
Moves the cursor one word to the right.
void lf()
Insert a line feed.
virtual void DrawText(int fg_color, int bg_color, int flags, int x, int y, const std::string &sText)=0
std::string sAutoCompList
This class uses a global Language instance to obtain the language string associated with a distinct c...
This class contains all needed keywords to highlight their occurences correspondingly....
This class manages the actual text by storing it in an internal buffer. During an update the TextMana...
void(GenericTerminal::* StateFunc)()
This structure contains the data for a single calltip, which might be shown in the editor or the term...
Cursor, which is used in the terminal. The TextManager is able to convert this cursor into a LogicalC...