NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
NumeReTerminal Class Reference

The terminal class for the GUI. It's a specialisation of the GenericTerminal. More...

#include <terminal.hpp>

Inheritance diagram for NumeReTerminal:
Collaboration diagram for NumeReTerminal:

Public Types

enum  BOLDSTYLE { DEFAULT = -1 , COLOR = 0 , OVERSTRIKE = 1 , FONT = 2 }
 
- Public Types inherited from GenericTerminal
enum  {
  BOLD =0x1 , BLINK =0x2 , UNDERLINE =0x4 , INVERSE =0x8 ,
  NOEOLWRAP =0x10 , CURSORAPPMODE =0x20 , CURSORRELATIVE =0x40 , NEWLINE =0x80 ,
  INSERT =0x100 , KEYAPPMODE =0x200 , DEFERUPDATE =0x400 , DESTRUCTBS =0x800 ,
  TEXTONLY =0x1000 , LOCALECHO =0x2000 , CURSORINVISIBLE =0x4000 , PC =0x8000 ,
  SELECTED =0x8000
}
 
enum  { RESETTAB =0x1 , RESETCURSOR =0x2 }
 

Public Member Functions

void SetParent (NumeReWindow *frame)
 
int getTextHeight ()
 
 NumeReTerminal (wxWindow *parent, wxWindowID id, Options *_option, const wxString &sPath, const wxPoint &pos=wxDefaultPosition, int width=80, int height=24, const wxString &name="wxTerm")
 Terminal constructor. More...
 
virtual ~NumeReTerminal ()
 Terminal destructor. More...
 
void pass_command (const std::string &command, bool isEvent)
 Pass the external command to the kernel without printing it to the console. More...
 
NumeRe::Table getTable (const std::string &sTableName)
 This function will return the named table from the kernel to be shown in a GUI window. More...
 
NumeRe::Container< std::string > getStringTable (const std::string &sStringTableName)
 This member function will return the named table containing strings. More...
 
Settings getKernelSettings ()
 This will return a copy of the internal settings object of the kernel. More...
 
NumeReKernelgetKernel ()
 
void setKernelSettings (const Settings &)
 This will pass the new kernel settings to the kernel. More...
 
void EndKernelTask ()
 This function forces the thread to terminate so that the application may be shut down. More...
 
void CancelCalculation ()
 Inform the kernel to stop the current calculation. Used to handle the ESC key press. More...
 
void StartKernelTask ()
 This member function will start the managed, second thread, in which the kernel will operate. More...
 
void OnThreadUpdate (wxThreadEvent &event)
 This function is the thread update event handler member function. Here are all returned messages from the kernel and its notifications processed. More...
 
void OnClose (wxCloseEvent &event)
 This function forces the thread to terminate immediately. Should only occur in situations, where we face a crash. More...
 
std::vector< std::string > getPathSettings ()
 Returns the standard paths as a STL vector. More...
 
const std::vector< Package > & getInstalledPackages ()
 Returns the installed plugins as a STL vector. More...
 
std::map< std::string, std::string > getMenuMap ()
 Returns the menu map of the installed plugins as a STL map. More...
 
void updatePackage (const std::string &package)
 Updates an installed package with new information after the user created a package with the package creator dialog. More...
 
void passEditedTable (NumeRe::Table _table)
 Passes a table (as a container) to the kernel. More...
 
void cancelTableEdit ()
 
void addBreakpoint (const std::string &_sFilename, size_t nLine)
 This member function adds a breakpoint to the passed file at the indicated line number. More...
 
void removeBreakpoint (const std::string &_sFilename, size_t nLine)
 This member function removes a breakpoint from the passed file at the indicated line number. More...
 
void clearBreakpoints (const std::string &_sFilename)
 This member function removes all breakpoints from the passed file. More...
 
void continueDebug ()
 
void stepDebug ()
 
void stepOverDebug ()
 
void leaveDebug ()
 
std::string getDocumentation (const std::string &sCommand)
 Gets the desired documentation article as a HTML string. More...
 
std::vector< std::string > getDocIndex ()
 Gets the contents of the documentation index as a vector. More...
 
std::map< std::string, std::string > getPluginLanguageStrings ()
 This will return the language strings for the plugins used by the language class for filling the symbols tree. More...
 
std::map< std::string, std::string > getFunctionLanguageStrings ()
 This will return the language strings for the custom defined functions used by the language class for filling the symbols tree. More...
 
void UpdateLibrary ()
 
NumeReVariables getVariableList ()
 This will return the variable list from the kernel to be shown in the variable viewer. More...
 
bool SetFont (const wxFont &font)
 
void GetDefColors (wxColor colors[16], NumeReTerminal::BOLDSTYLE boldStyle=NumeReTerminal::DEFAULT)
 
int GetCursorBlinkRate ()
 
void SetCursorBlinkRate (int rate)
 
void copyText ()
 Implements copy to clip board. More...
 
void pasteText ()
 Implements paste from clip board. More...
 
void cutText ()
 Implements copy to clip board and deleting the selection. More...
 
virtual void DrawText (int fg_color, int bg_color, int flags, int x, int y, const std::string &sText) override
 
virtual void DrawCursor (int fg_color, int bg_color, int flags, int x, int y, unsigned char c) override
 
virtual void Calltip (int x, int y, NumeRe::CallTip &_cTip) override
 Function reimplementation to display a tooltip requested by the GenericTerminal. More...
 
virtual void CalltipCancel () override
 Function reimplementation to close the previously opened calltip. More...
 
virtual void ClearChars (int bg_color, int x, int y, int w, int h) override
 
virtual void ProcessInput (int len, const std::string &sData) override
 Processes text received from the keybord or clipboard. More...
 
virtual void ProcessOutput (int len, const std::string &sData) override
 Processes text received from the kernel. More...
 
void ScrollTerminal (int numLines, bool scrollUp=true)
 
void ClearSelection ()
 
bool HasSelection ()
 
wxString GetSelection ()
 
bool IsWorking ()
 
void UpdateSize ()
 
void UpdateColors ()
 This member function sets the new colors to the internal pen definitions. More...
 
virtual void ModeChange (int state) override
 
virtual void Bell () override
 
virtual void ResizeTerminal (int width, int height) override
 
virtual void UpdateRemoteSize (int width, int height)
 Fallback for the virtual definition. More...
 
void clearTerminal ()
 This member function clears the terminal. More...
 
int GetTermWidth ()
 
int GetTermHeight ()
 
- Public Member Functions inherited from GenericTerminal
 GenericTerminal (int w, int h)
 Constructor. More...
 
virtual ~GenericTerminal ()
 Empty destructor. More...
 
NumeReSyntaxgetSyntax ()
 
NumeRe::CallTipProvidergetProvider ()
 
virtual void ProcessInput (int len, const std::string &sData)
 
virtual void ProcessOutput (int len, const std::string &sData)
 Processes output returned from the kernel and hands it over to the internal buffer. More...
 
virtual void ResizeTerminal (int _width, int _height)
 
int Width () const
 
int Height () const
 
virtual void Update ()
 Simple wrapper around update_changes() More...
 
virtual void Reset ()
 Simple wrapper around reset(). More...
 
bool Scroll (int numLines, bool scrollUp)
 
int GetScrollHeight ()
 
int GetScrollPosition ()
 Returns the current scroll position. More...
 
TextManagerGetTM ()
 Get a pointer to the internal text buffer. More...
 
void SetTerminalHistory (int size)
 Set the terminal buffer size (not the length of the input history). The length of the history (i.e. the terminal length) is determined by the width of the terminal and the number of calculated line breaks. More...
 
bool IsScrolledUp ()
 Determine, whether the terminal is scrolled up. More...
 
int GetMode () const
 
void SetMode (int mode)
 
void set_mode_flag (int flag)
 Sets a mode flag (only used to make the cursor invisble). More...
 
void clear_mode_flag (int flag)
 Clears a mode flag (mainly used to make the cursor visible again). More...
 
virtual void DrawText (int fg_color, int bg_color, int flags, int x, int y, const std::string &sText)=0
 
virtual void DrawCursor (int fg_color, int bg_color, int flags, int x, int y, unsigned char c)=0
 
virtual void Calltip (int x, int y, NumeRe::CallTip &_cTip)
 
virtual void CalltipCancel ()
 
virtual void ClearChars (int bg_color, int x, int y, int w, int h)
 
virtual void SendBack (int len, char *data)
 
virtual void SendBack (char *data)
 
virtual void ModeChange (int state)
 
virtual void Bell ()
 
virtual int IsSelected (int x, int y)
 
virtual void Select (int x, int y, int select)
 
virtual unsigned char GetChar (int x, int y)
 Gets the character at the selected location. More...
 
std::string get_selected_text ()
 Gets the selected text (if any). More...
 

Protected Member Functions

virtual wxThread::ExitCode Entry ()
 This is the main thread function and will be called repeatedly from the wxWidgets library. More...
 
- Protected Member Functions inherited from GenericTerminal
void move_cursor_editable_area (int x, int y)
 Moves the cursor to a location, if this location is editable. More...
 
void update_changes ()
 
void normal_input ()
 
void normal_output ()
 This member function is for printing the kernel's output to the console. More...
 
void resetAutoComp (int mode)
 Reset the current autocompletion list and the corresponding variables. More...
 
std::string getProcNameSpace ()
 This member function evalutes the procedure signature and returns its namespace. Will only be called from GTerm::tab(). More...
 
void cr ()
 Insert a carriage return. More...
 
void lf ()
 Insert a line feed. More...
 
void ff ()
 Insert a form feed (not used). More...
 
void bell ()
 Perform a bell sound (not used). More...
 
void tab ()
 Evaluate the tab key (do not insert a tab character but try to autocomplete the current input). More...
 
bool bs ()
 Perform a backspace operation. More...
 
bool del ()
 Perform a delete key operation. More...
 
bool delSelected ()
 Delete a selected block. More...
 
void reset ()
 Resets the terminal, so that it starts with an empty buffer. More...
 
bool cursor_left ()
 Moves the cursor to the left. More...
 
bool cursor_down ()
 Either moves the cursor down or performs a history jump. More...
 
bool cursor_right ()
 Moves the cursor to the right. More...
 
bool cursor_up ()
 Either moves the cursor up or performs a history jump. More...
 
bool ctrl_left ()
 Moves the cursor one word to the left. More...
 
bool ctrl_right ()
 Moves the cursor one word to the right. More...
 
bool home ()
 Moves the cursor to the leftmost position in the current line. More...
 
bool end ()
 Moves the cursor to the rightmost position in the current line. More...
 
bool front ()
 Moves the cursor to the leftmost position in the whole input. More...
 
bool back ()
 Moves the cursor to the rightmost position in the whole input. More...
 
void erase_line ()
 Erases the current line in the internal buffer. More...
 
void erase_usercontent_line ()
 Erases alle user-written contents from the current line. More...
 

Protected Attributes

NumeReKernel _kernel
 
wxCriticalSection m_kernelCS
 
NumeReKernel::KernelStatus m_KernelStatus
 
bool m_bCommandAvailable
 
bool m_bTableEditAvailable
 
bool m_bTableEditCanceled
 
bool m_isBusy
 
int m_nDebuggerCode
 
std::string m_sCommandLine
 
std::string m_sAnswer
 
- Protected Attributes inherited from GenericTerminal
int doing_update
 
int nTabStartPos
 
int nCursorUpDownStartPos
 
std::string sAutoCompWordStart
 
std::string sAutoCompList
 
bool m_useSmartSense
 

Private Member Functions

void pipe_command (const std::string &sCommand)
 Pass the entered command line to the kernel. More...
 
bool filterKeyCodes (int keyCode, bool ctrlDown)
 This private member function filters special key codes and handles them. More...
 
void scrollToInput ()
 This private member function scrolls the terminal all the way down. More...
 
void MarkSelection (bool bRectangular=false)
 
void DoDrawCursor (int fg_color, int bg_color, int flags, int x, int y, unsigned char c)
 
void OnChar (wxKeyEvent &event)
 
void OnKeyDown (wxKeyEvent &event)
 
void OnPaint (wxPaintEvent &event)
 
void OnLeftDown (wxMouseEvent &event)
 
void OnLoseMouseCapture (wxMouseCaptureLostEvent &event)
 This member function handles the "MouseCaptureLostEvent" and releases the mouse. More...
 
void OnLeftUp (wxMouseEvent &event)
 
void OnMouseMove (wxMouseEvent &event)
 
void OnEnter (wxMouseEvent &event)
 This member function handles the "Mouse Enter" event. More...
 
void OnTimer (wxTimerEvent &event)
 
void OnActivate (wxActivateEvent &event)
 
void OnSize (wxSizeEvent &event)
 
void OnGainFocus (wxFocusEvent &event)
 
void OnLoseFocus (wxFocusEvent &event)
 
void Busy ()
 Inform the GUI that the kernel is currently busy. More...
 
void Ready ()
 Inform the GUI that the kernel is ready for calculation. More...
 

Private Attributes

int m_charWidth
 
int m_charHeight
 
int m_init
 
int m_width
 
int m_height
 
int m_selx1
 
int m_sely1
 
int m_selx2
 
int m_sely2
 
int m_curX
 
int m_curY
 
int m_curFG
 
int m_curBG
 
int m_curFlags
 
int m_curState
 
int m_curBlinkRate
 
int m_scrollBarWidth
 
int m_charsInLine
 
int m_linesDisplayed
 
TerminalCallTipm_callTip
 
unsigned char m_curChar
 
bool m_selecting
 
bool m_marking
 
bool m_inUpdateSize
 
bool m_isActive
 
bool m_updateProcedureLibrary
 
wxColour m_color_defs [16]
 
wxColour * m_colors
 
wxPen m_colorPen_defs [16]
 
wxPen * m_colorPens
 
wxFont m_normalFont
 
wxFont m_underlinedFont
 
wxFont m_boldFont
 
wxFont m_boldUnderlinedFont
 
wxDC * m_curDC
 
wxMemoryDC m_memDC
 
wxBitmap * m_bitmap
 
wxTimer m_timer
 
NumeReWindowm_wxParent
 
Optionsm_options
 
BOLDSTYLE m_boldStyle
 

Friends

class NumeReKernel
 
class DebugViewer
 

Additional Inherited Members

- Public Attributes inherited from GenericTerminal
enum GenericTerminal:: { ... }  MODES
 

Detailed Description

The terminal class for the GUI. It's a specialisation of the GenericTerminal.

Definition at line 45 of file terminal.hpp.

Member Enumeration Documentation

◆ BOLDSTYLE

Enumerator
DEFAULT 
COLOR 
OVERSTRIKE 
FONT 

Definition at line 117 of file terminal.hpp.

Constructor & Destructor Documentation

◆ NumeReTerminal()

NumeReTerminal::NumeReTerminal ( wxWindow *  parent,
wxWindowID  id,
Options _option,
const wxString &  sPath,
const wxPoint &  pos = wxDefaultPosition,
int  width = 80,
int  height = 24,
const wxString &  name = "wxTerm" 
)

Terminal constructor.

Parameters
parentwxWindow*
idwxWindowID
_optionOptions*
sPathconst wxString&
posconst wxPoint&
widthint
heightint
nameconst wxString&

Definition at line 85 of file terminal.cpp.

References CURSOR_BLINK_DEFAULT_TIMEOUT, NumeReKernel::NUMERE_DONE, OnThreadUpdate(), SETTING_B_SMARTSENSE, and SETTING_S_TERMINALFONT.

Here is the call graph for this function:

◆ ~NumeReTerminal()

NumeReTerminal::~NumeReTerminal ( )
virtual

Terminal destructor.

Definition at line 168 of file terminal.cpp.

References m_bitmap, and m_memDC.

Member Function Documentation

◆ addBreakpoint()

void NumeReTerminal::addBreakpoint ( const std::string &  _sFilename,
size_t  nLine 
)

This member function adds a breakpoint to the passed file at the indicated line number.

Parameters
_sFilenameconst std::string&
nLinesize_t
Returns
void

Definition at line 263 of file terminal.cpp.

References _kernel, BreakpointManager::addBreakpoint(), NumeReDebugger::getBreakpointManager(), NumeReKernel::getDebugger(), and m_kernelCS.

Referenced by NumeReEditor::AddBreakpoint(), and NumeReEditor::SynchronizeBreakpoints().

Here is the call graph for this function:

◆ Bell()

void NumeReTerminal::Bell ( )
overridevirtual

public virtual Bell Rings the system bell

Returns
void
Author
Derry Bryson
Date
04-22-2004

Reimplemented from GenericTerminal.

Definition at line 1935 of file terminal.cpp.

References WinMessageBeep().

Here is the call graph for this function:

◆ Busy()

void NumeReTerminal::Busy ( )
private

Inform the GUI that the kernel is currently busy.

Returns
void

Definition at line 2215 of file terminal.cpp.

References NumeReWindow::Busy(), m_isBusy, and m_wxParent.

Referenced by filterKeyCodes(), and pass_command().

Here is the call graph for this function:

◆ Calltip()

void NumeReTerminal::Calltip ( int  x,
int  y,
NumeRe::CallTip _cTip 
)
overridevirtual

Function reimplementation to display a tooltip requested by the GenericTerminal.

Parameters
xint
yint
_cTipNumeRe::CallTip&
Returns
void

Reimplemented from GenericTerminal.

Definition at line 1839 of file terminal.cpp.

References TerminalCallTip::Highlight(), m_callTip, m_charHeight, m_charWidth, m_height, NumeRe::CallTip::nEnd, NumeRe::CallTip::nStart, TerminalCallTip::PopUp(), TerminalCallTip::Resize(), and NumeRe::CallTip::sDefinition.

Here is the call graph for this function:

◆ CalltipCancel()

void NumeReTerminal::CalltipCancel ( )
overridevirtual

Function reimplementation to close the previously opened calltip.

Returns
void

Reimplemented from GenericTerminal.

Definition at line 1865 of file terminal.cpp.

References TerminalCallTip::Dismiss(), and m_callTip.

Here is the call graph for this function:

◆ CancelCalculation()

void NumeReTerminal::CancelCalculation ( )

Inform the kernel to stop the current calculation. Used to handle the ESC key press.

Returns
void

Definition at line 994 of file terminal.cpp.

References _kernel, NumeReKernel::CancelCalculation(), and m_kernelCS.

Referenced by OnKeyDown(), DebugViewer::OnMenuEvent(), and NumeReWindow::OnMenuEvent().

Here is the call graph for this function:

◆ cancelTableEdit()

void NumeReTerminal::cancelTableEdit ( )
inline

Definition at line 207 of file terminal.hpp.

References m_bTableEditCanceled, and m_kernelCS.

Referenced by TableEditPanel::OnButtonCancel(), and TableEditPanel::OnClose().

◆ clearBreakpoints()

void NumeReTerminal::clearBreakpoints ( const std::string &  _sFilename)

This member function removes all breakpoints from the passed file.

Parameters
_sFilenameconst std::string&
Returns
void

Definition at line 295 of file terminal.cpp.

References _kernel, BreakpointManager::clearBreakpoints(), NumeReDebugger::getBreakpointManager(), NumeReKernel::getDebugger(), and m_kernelCS.

Referenced by NumeReWindow::CloseFile(), NumeReEditor::OnClearBreakpoints(), and NumeReEditor::SynchronizeBreakpoints().

Here is the call graph for this function:

◆ ClearChars()

void NumeReTerminal::ClearChars ( int  bg_color,
int  x,
int  y,
int  w,
int  h 
)
overridevirtual

public virtual ClearChars Clears a section of characters from the screen. This virtual function is called from GTerm::update_changes.

Parameters
bg_colorint The background color to replace the characters with
xint The starting x position, in characters
yint The starting y position, in characters
wint The width of the area to be cleared, in characters
hint The height of the area to be cleared, in characters
Returns
void
Author
Derry Bryson
Date
04-22-2004

Reimplemented from GenericTerminal.

Definition at line 1887 of file terminal.cpp.

References GenericTerminal::bg_color, m_charHeight, m_charWidth, m_colorPens, m_colors, and m_curDC.

◆ ClearSelection()

void NumeReTerminal::ClearSelection ( )

public ClearSelection De-selects all selected text

Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 1382 of file terminal.cpp.

References GenericTerminal::GetTM(), HasSelection(), m_selecting, m_selx1, m_selx2, m_sely1, m_sely2, and TextManager::unselectAll().

Referenced by cutText(), ModeChange(), OnChar(), OnLeftDown(), ProcessInput(), ProcessOutput(), and ResizeTerminal().

Here is the call graph for this function:

◆ clearTerminal()

void NumeReTerminal::clearTerminal ( )

This member function clears the terminal.

Returns
void

Definition at line 2290 of file terminal.cpp.

References _kernel, GenericTerminal::GetTM(), m_kernelCS, NumeReKernel::printVersionInfo(), and TextManager::Reset().

Referenced by OnThreadUpdate().

Here is the call graph for this function:

◆ continueDebug()

void NumeReTerminal::continueDebug ( )
inline

◆ copyText()

void NumeReTerminal::copyText ( )

Implements copy to clip board.

Returns
void

Definition at line 1506 of file terminal.cpp.

References GetSelection().

Referenced by cutText(), OnKeyDown(), and NumeReWindow::OnMenuEvent().

Here is the call graph for this function:

◆ cutText()

void NumeReTerminal::cutText ( )

Implements copy to clip board and deleting the selection.

Returns
void

Definition at line 1553 of file terminal.cpp.

References ClearSelection(), copyText(), and GenericTerminal::delSelected().

Referenced by NumeReWindow::OnMenuEvent().

Here is the call graph for this function:

◆ DoDrawCursor()

void NumeReTerminal::DoDrawCursor ( int  fg_color,
int  bg_color,
int  flags,
int  x,
int  y,
unsigned char  c 
)
private

private DoDrawCursor Does the actual work of drawing the cursor

Parameters
fg_colorint The index of the foreground color
bg_colorint The index of the background color
flagsint Modifier flags
xint The x position of the cursor, in characters
yint The y position of the cursor, in characters
cunsigned char The character the cursor is over
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 1662 of file terminal.cpp.

References GenericTerminal::bg_color, GenericTerminal::BOLD, COLOR, GenericTerminal::fg_color, FONT, GenericTerminal::INVERSE, GenericTerminal::IsScrolledUp(), m_boldFont, m_boldStyle, m_boldUnderlinedFont, m_charHeight, m_charWidth, m_colors, m_curDC, m_normalFont, m_underlinedFont, OVERSTRIKE, and GenericTerminal::UNDERLINE.

Referenced by DrawCursor(), and OnTimer().

Here is the call graph for this function:

◆ DrawCursor()

void NumeReTerminal::DrawCursor ( int  fg_color,
int  bg_color,
int  flags,
int  x,
int  y,
unsigned char  c 
)
overridevirtual

public virtual DrawCursor Draws the cursor on the terminal widget. This virtual function is called from GTerm::update_changes.

Parameters
fg_colorint The index of the foreground color
bg_colorint The index of the background color
flagsint Modifiers for drawing the cursor
xint The x position in character cells
yint The y position in character cells
cunsigned char The character that underlies the cursor
Returns
void
Author
Derry Bryson
Date
04-22-2004

Implements GenericTerminal.

Definition at line 1749 of file terminal.cpp.

References GenericTerminal::bg_color, DoDrawCursor(), GenericTerminal::fg_color, m_curBG, m_curBlinkRate, m_curChar, m_curFG, m_curFlags, m_curState, m_curX, m_curY, and m_timer.

Here is the call graph for this function:

◆ DrawText()

void NumeReTerminal::DrawText ( int  fg_color,
int  bg_color,
int  flags,
int  x,
int  y,
const std::string &  sText 
)
overridevirtual

public virtual DrawText Responsible for actually drawing the terminal text on the widget. This virtual function is called from GTerm::update_changes.

Parameters
fg_colorint The index of the foreground color
bg_colorint The index of the background color
flagsint Modifiers for drawing the text
xint The x position in character cells
yint The y position in character cells
sTextconst std::string& The std::string containing the characters to draw
Returns
void
Author
Derry Bryson
Date
04-22-2004

Implements GenericTerminal.

Definition at line 1578 of file terminal.cpp.

References GenericTerminal::bg_color, GenericTerminal::BOLD, GenericTerminal::fg_color, FONT, GenericTerminal::INVERSE, m_boldFont, m_boldStyle, m_boldUnderlinedFont, m_charHeight, m_charWidth, m_colors, m_curDC, m_normalFont, m_underlinedFont, OVERSTRIKE, GenericTerminal::SELECTED, and GenericTerminal::UNDERLINE.

◆ EndKernelTask()

void NumeReTerminal::EndKernelTask ( )

This function forces the thread to terminate so that the application may be shut down.

Returns
void

Definition at line 535 of file terminal.cpp.

References GenericTerminal::erase_line().

Referenced by NumeReWindow::OnClose().

Here is the call graph for this function:

◆ Entry()

wxThread::ExitCode NumeReTerminal::Entry ( )
protectedvirtual

This is the main thread function and will be called repeatedly from the wxWidgets library.

Returns
wxThread::ExitCode

Definition at line 438 of file terminal.cpp.

References _kernel, NumeReKernel::Autosave(), NumeReKernel::CloseSession(), NumeReKernel::getAutosaveInterval(), NumeReKernel::getLastSavedTime(), NumeReKernel::initializeStackTracker(), m_bCommandAvailable, m_kernelCS, m_KernelStatus, m_sCommandLine, m_updateProcedureLibrary, NumeReKernel::MainLoop(), NumeReKernel::NUMERE_PENDING, NumeReKernel::NUMERE_QUIT, NumeReKernel::printPreFmt(), NumeReKernel::printVersionInfo(), NumeReKernel::ProcLibrary, and ProcedureLibrary::updateLibrary().

Here is the call graph for this function:

◆ filterKeyCodes()

bool NumeReTerminal::filterKeyCodes ( int  keyCode,
bool  ctrlDown 
)
private

◆ GetCursorBlinkRate()

int NumeReTerminal::GetCursorBlinkRate ( )
inline

Definition at line 249 of file terminal.hpp.

References m_curBlinkRate.

◆ GetDefColors()

void NumeReTerminal::GetDefColors ( wxColor  colors[16],
NumeReTerminal::BOLDSTYLE  boldStyle = NumeReTerminal::DEFAULT 
)

public GetDefColors Gets the colors for the terminal from the internal Options object

Parameters
colorswxColour [] The colors that need to be assigned to
boldStylewxTerm::BOLDSTYLE The bold style used in the terminal
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 791 of file terminal.cpp.

References SyntaxStyles::background, Options::COMMAND, Options::COMMENT, Options::CONSOLE_STD, Options::CONSTANT, DEFAULT, SyntaxStyles::foreground, Options::FUNCTION, Options::GetSyntaxStyle(), m_boldStyle, m_options, Options::METHODS, Options::NUMBER, Options::OPERATOR, Options::OPTION, Options::PROCEDURE, Options::PROCEDURE_COMMAND, Options::SPECIALVAL, Options::STRING, NumeReSyntax::SYNTAX_COMMAND, NumeReSyntax::SYNTAX_COMMENT, NumeReSyntax::SYNTAX_CONSTANT, NumeReSyntax::SYNTAX_FUNCTION, NumeReSyntax::SYNTAX_METHODS, NumeReSyntax::SYNTAX_NPRC_COMMAND, NumeReSyntax::SYNTAX_NUMBER, NumeReSyntax::SYNTAX_OPERATOR, NumeReSyntax::SYNTAX_OPTION, NumeReSyntax::SYNTAX_PROCEDURE, NumeReSyntax::SYNTAX_SPECIALVAL, NumeReSyntax::SYNTAX_STD, and NumeReSyntax::SYNTAX_STRING.

Referenced by UpdateColors().

Here is the call graph for this function:

◆ getDocIndex()

std::vector< std::string > NumeReTerminal::getDocIndex ( )

Gets the contents of the documentation index as a vector.

Returns
std::vector<std::string>

Definition at line 324 of file terminal.cpp.

References _kernel, NumeReKernel::getDocIndex(), and m_kernelCS.

Referenced by NumeReWindow::GetDocIndex().

Here is the call graph for this function:

◆ getDocumentation()

std::string NumeReTerminal::getDocumentation ( const std::string &  sCommand)

Gets the desired documentation article as a HTML string.

Parameters
sCommandconst std::string&
Returns
std::string

Definition at line 310 of file terminal.cpp.

References _kernel, NumeReKernel::getDocumentation(), and m_kernelCS.

Referenced by NumeReWindow::GetDocContent().

Here is the call graph for this function:

◆ getFunctionLanguageStrings()

std::map< std::string, std::string > NumeReTerminal::getFunctionLanguageStrings ( )

This will return the language strings for the custom defined functions used by the language class for filling the symbols tree.

Returns
std::map<std::string, std::string>

Definition at line 354 of file terminal.cpp.

References _kernel, NumeReKernel::getFunctionLanguageStrings(), and m_kernelCS.

Referenced by NumeReWindow::prepareFunctionTree().

Here is the call graph for this function:

◆ getInstalledPackages()

const std::vector< Package > & NumeReTerminal::getInstalledPackages ( )

Returns the installed plugins as a STL vector.

Returns
const std::vector<Package>&

Definition at line 200 of file terminal.cpp.

References _kernel, NumeReKernel::getInstalledPackages(), and m_kernelCS.

Referenced by PackageRepoBrowser::DetectInstalledPackages().

Here is the call graph for this function:

◆ getKernel()

NumeReKernel & NumeReTerminal::getKernel ( )
inline

Definition at line 192 of file terminal.hpp.

References _kernel.

Referenced by PackageDialog::followBranch(), and NumeReWindow::OnCalculateDependencies().

◆ getKernelSettings()

Settings NumeReTerminal::getKernelSettings ( )

This will return a copy of the internal settings object of the kernel.

Returns
Settings

Definition at line 383 of file terminal.cpp.

References _kernel, NumeReKernel::getKernelSettings(), and m_kernelCS.

Referenced by NumeReWindow::CreateProcedureTree(), NumeReEditor::getTemplateContent(), NumeReWindow::OnClose(), NumeReWindow::OnMenuEvent(), NumeReWindow::OnOptions(), OnThreadUpdate(), NumeReWindow::UpdateMenuBar(), NumeReWindow::UpdateStatusBar(), and NumeReWindow::UpdateToolbar().

Here is the call graph for this function:

◆ getMenuMap()

std::map< std::string, std::string > NumeReTerminal::getMenuMap ( )

Returns the menu map of the installed plugins as a STL map.

Returns
std::map<std::string, std::string>

Definition at line 214 of file terminal.cpp.

References _kernel, NumeReKernel::getMenuMap(), and m_kernelCS.

Referenced by NumeReWindow::UpdatePackageMenu().

Here is the call graph for this function:

◆ getPathSettings()

◆ getPluginLanguageStrings()

std::map< std::string, std::string > NumeReTerminal::getPluginLanguageStrings ( )

This will return the language strings for the plugins used by the language class for filling the symbols tree.

Returns
std::map<std::string, std::string>

Definition at line 339 of file terminal.cpp.

References _kernel, NumeReKernel::getPluginLanguageStrings(), and m_kernelCS.

Referenced by NumeReWindow::prepareFunctionTree().

Here is the call graph for this function:

◆ GetSelection()

wxString NumeReTerminal::GetSelection ( )

public GetSelection Returns the selected text

Returns
wxString The selected text
Author
Derry Bryson
Date
04-22-2004

Definition at line 1492 of file terminal.cpp.

References GenericTerminal::get_selected_text().

Referenced by copyText().

Here is the call graph for this function:

◆ getStringTable()

NumeRe::Container< std::string > NumeReTerminal::getStringTable ( const std::string &  sStringTableName)

This member function will return the named table containing strings.

Parameters
sStringTableNameconst std::string&
Returns
NumeRe::Container<std::string>

Definition at line 979 of file terminal.cpp.

References _kernel, NumeReKernel::getStringTable(), and m_kernelCS.

Referenced by TableViewer::reloadTable(), and NumeReWindow::showTable().

Here is the call graph for this function:

◆ getTable()

NumeRe::Table NumeReTerminal::getTable ( const std::string &  sTableName)

This function will return the named table from the kernel to be shown in a GUI window.

Parameters
sTableNameconst std::string&
Returns
NumeRe::Table

Definition at line 964 of file terminal.cpp.

References _kernel, NumeReKernel::getTable(), and m_kernelCS.

Referenced by TableViewer::reloadTable(), and NumeReWindow::showTable().

Here is the call graph for this function:

◆ GetTermHeight()

int NumeReTerminal::GetTermHeight ( )
inline

Definition at line 292 of file terminal.hpp.

References m_linesDisplayed.

◆ GetTermWidth()

int NumeReTerminal::GetTermWidth ( )
inline

Definition at line 288 of file terminal.hpp.

References m_charsInLine.

◆ getTextHeight()

int NumeReTerminal::getTextHeight ( )
inline

Definition at line 130 of file terminal.hpp.

References m_charHeight.

Referenced by NumeReWindow::NumeReWindow().

◆ getVariableList()

NumeReVariables NumeReTerminal::getVariableList ( )

This will return the variable list from the kernel to be shown in the variable viewer.

Returns
NumeReVariables

Definition at line 369 of file terminal.cpp.

References _kernel, NumeReKernel::getVariableList(), and m_kernelCS.

Referenced by NumeReWindow::UpdateVarViewer().

Here is the call graph for this function:

◆ HasSelection()

bool NumeReTerminal::HasSelection ( )

public HasSelection Checks if any text is selected

Returns
bool Whether or not there's any text selected
Author
Derry Bryson
Date
04-22-2004

Definition at line 1477 of file terminal.cpp.

References m_selx1, m_selx2, m_sely1, and m_sely2.

Referenced by ClearSelection(), OnChar(), OnKeyDown(), ProcessInput(), and ProcessOutput().

◆ IsWorking()

bool NumeReTerminal::IsWorking ( )
inline

Definition at line 276 of file terminal.hpp.

Referenced by NumeReWindow::OnClose().

◆ leaveDebug()

void NumeReTerminal::leaveDebug ( )
inline

Definition at line 231 of file terminal.hpp.

References NumeReKernel::DEBUGGER_LEAVE, m_kernelCS, and m_nDebuggerCode.

Referenced by DebugViewer::OnMenuEvent().

◆ MarkSelection()

void NumeReTerminal::MarkSelection ( bool  bRectangular = false)
private

private MarkSelection Selects the text either in line or in rectangular mode

Parameters
bRectangularbool
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 1403 of file terminal.cpp.

References GenericTerminal::GetTM(), m_marking, m_selx1, m_selx2, m_sely1, m_sely2, max, min, GenericTerminal::Select(), TextManager::unselectAll(), and GenericTerminal::Width().

Referenced by OnMouseMove().

Here is the call graph for this function:

◆ ModeChange()

void NumeReTerminal::ModeChange ( int  state)
overridevirtual

public virtual ModeChange Changes the drawing mode between VT100 and PC

Parameters
stateint The new state
Returns
void
Author
Derry Bryson
Date
04-22-2004

Reimplemented from GenericTerminal.

Definition at line 1915 of file terminal.cpp.

References ClearSelection(), m_color_defs, m_colorPen_defs, m_colorPens, m_colors, and GenericTerminal::ModeChange().

Here is the call graph for this function:

◆ OnActivate()

void NumeReTerminal::OnActivate ( wxActivateEvent &  event)
private

private OnActivate Sets the terminal's active state - determines whether or not to draw the cursor

Parameters
eventwxActivateEvent & The generated activate event
Returns
void
Author
Mark Erikson
Date
04-22-2004

Definition at line 2168 of file terminal.cpp.

References m_isActive.

◆ OnChar()

void NumeReTerminal::OnChar ( wxKeyEvent &  event)
private

private OnChar Handles user keyboard input and begins processing the server's response

Parameters
eventwxKeyEvent & The generated key event
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 1012 of file terminal.cpp.

References ClearSelection(), GenericTerminal::delSelected(), filterKeyCodes(), GenericTerminal::GetMode(), HasSelection(), m_curDC, GenericTerminal::PC, GenericTerminal::ProcessInput(), GenericTerminal::resetAutoComp(), GenericTerminal::RESETCURSOR, GenericTerminal::RESETTAB, and scrollToInput().

Here is the call graph for this function:

◆ OnClose()

void NumeReTerminal::OnClose ( wxCloseEvent &  event)

This function forces the thread to terminate immediately. Should only occur in situations, where we face a crash.

Parameters
eventwxCloseEvent&
Returns
void

Definition at line 554 of file terminal.cpp.

◆ OnEnter()

void NumeReTerminal::OnEnter ( wxMouseEvent &  event)
private

This member function handles the "Mouse Enter" event.

Parameters
eventwxMouseEvent&
Returns
void

Definition at line 1361 of file terminal.cpp.

References g_findReplace.

◆ OnGainFocus()

void NumeReTerminal::OnGainFocus ( wxFocusEvent &  event)
private

private OnGainFocus Enables the cursor

Parameters
eventwxFocusEvent & The generated focus event
Returns
void
Author
Mark Erikson
Date
04-22-2004

Definition at line 2184 of file terminal.cpp.

References GenericTerminal::clear_mode_flag(), GenericTerminal::CURSORINVISIBLE, and GenericTerminal::Update().

Here is the call graph for this function:

◆ OnKeyDown()

void NumeReTerminal::OnKeyDown ( wxKeyEvent &  event)
private

private OnKeyDown Used to handle copy-paste control sequences

Parameters
eventwxKeyEvent & The generated key event
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 1187 of file terminal.cpp.

References CancelCalculation(), copyText(), GenericTerminal::erase_usercontent_line(), GenericTerminal::GetMode(), HasSelection(), m_isBusy, pasteText(), GenericTerminal::PC, GenericTerminal::resetAutoComp(), GenericTerminal::RESETCURSOR, and GenericTerminal::RESETTAB.

Here is the call graph for this function:

◆ OnLeftDown()

void NumeReTerminal::OnLeftDown ( wxMouseEvent &  event)
private

private OnLeftDown Begins selection of terminal text

Parameters
eventwxMouseEvent & The generated mouse event
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 1260 of file terminal.cpp.

References ClearSelection(), m_charHeight, m_charWidth, m_selecting, m_selx1, m_selx2, m_sely1, and m_sely2.

Here is the call graph for this function:

◆ OnLeftUp()

void NumeReTerminal::OnLeftUp ( wxMouseEvent &  event)
private

private OnLeftUp Ends text selection

Parameters
eventwxMouseEvent & The generated mouse event
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 1302 of file terminal.cpp.

References m_selecting, m_selx2, m_sely2, and GenericTerminal::move_cursor_editable_area().

Here is the call graph for this function:

◆ OnLoseFocus()

void NumeReTerminal::OnLoseFocus ( wxFocusEvent &  event)
private

private OnLoseFocus Disables the cursor

Parameters
eventwxFocusEvent & The generated focus event
Returns
void
Author
Mark Erikson
Date
04-22-2004

Definition at line 2201 of file terminal.cpp.

References GenericTerminal::CURSORINVISIBLE, GenericTerminal::set_mode_flag(), and GenericTerminal::Update().

Here is the call graph for this function:

◆ OnLoseMouseCapture()

void NumeReTerminal::OnLoseMouseCapture ( wxMouseCaptureLostEvent &  event)
private

This member function handles the "MouseCaptureLostEvent" and releases the mouse.

Parameters
eventwxMouseCaptureLostEvent&
Returns
void

Definition at line 1280 of file terminal.cpp.

References m_selecting.

◆ OnMouseMove()

void NumeReTerminal::OnMouseMove ( wxMouseEvent &  event)
private

private OnMouseMove Changes the selection if the mouse button is down

Parameters
eventwxMouseEvent & The generated mouse event
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 1325 of file terminal.cpp.

References GenericTerminal::Height(), m_charHeight, m_charWidth, m_selecting, m_selx2, m_sely2, MarkSelection(), and GenericTerminal::Width().

Here is the call graph for this function:

◆ OnPaint()

void NumeReTerminal::OnPaint ( wxPaintEvent &  event)
private

private OnPaint Redraws the terminal widget

Parameters
eventwxPaintEvent & The generated paint event
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 1233 of file terminal.cpp.

References m_curDC, and GenericTerminal::update_changes().

Here is the call graph for this function:

◆ OnSize()

void NumeReTerminal::OnSize ( wxSizeEvent &  event)
private

private OnSize Lets the terminal resize the text whenever the window is resized

Parameters
eventwxSizeEvent & The generated size event
Returns
void
Author
Mark Erikson
Date
04-22-2004

Definition at line 2264 of file terminal.cpp.

References UpdateSize().

Here is the call graph for this function:

◆ OnThreadUpdate()

void NumeReTerminal::OnThreadUpdate ( wxThreadEvent &  event)

This function is the thread update event handler member function. Here are all returned messages from the kernel and its notifications processed.

Parameters
eventwxThreadEvent&
Returns
void

Definition at line 573 of file terminal.cpp.

References _kernel, NumeReSyntax::addPlugins(), clearTerminal(), NumeReWindow::closeWindows(), Settings::copySettings(), NumeReWindow::editTable(), NumeReWindow::evaluateDebugInfo(), NumeReWindow::EvaluateOptions(), getKernelSettings(), NumeReKernel::getPluginCommands(), GenericTerminal::getSyntax(), GenericTerminal::GetTM(), m_isBusy, m_kernelCS, m_KernelStatus, m_options, m_sAnswer, m_wxParent, NumeReTask::nLine, NumeReWindow::notifyInstallationDone(), NumeReKernel::NUMERE_ANSWER_READ, NumeReKernel::NUMERE_CLC_TERMINAL, NumeReKernel::NUMERE_CLOSE_WINDOWS, NumeReKernel::NUMERE_DEBUG_EVENT, NumeReKernel::NUMERE_DONE, NumeReKernel::NUMERE_DONE_KEYWORD, NumeReKernel::NUMERE_EDIT_FILE, NumeReKernel::NUMERE_EDIT_TABLE, NumeReKernel::NUMERE_ERROR, NumeReKernel::NUMERE_INSTALLATION_DONE, NumeReKernel::NUMERE_ISSUE_WARNING, NumeReKernel::NUMERE_OPEN_DOC, NumeReKernel::NUMERE_PENDING, NumeReKernel::NUMERE_PENDING_SPECIAL, NumeReKernel::NUMERE_QUIT, NumeReKernel::NUMERE_REFRESH_FUNCTIONTREE, NumeReKernel::NUMERE_SHOW_STRING_TABLE, NumeReKernel::NUMERE_SHOW_TABLE, NumeReKernel::NUMERE_SHOW_WINDOW, NumeReWindow::openImage(), NumeReWindow::OpenSourceFile(), NumeReWindow::openTable(), ProcessOutput(), NumeReKernel::ReadOpenFileFlag(), Ready(), NumeReWindow::refreshFunctionTree(), scrollToInput(), NumeReKernel::SettingsModified(), NumeReWindow::ShowHelp(), NumeReWindow::showWindow(), NumeReTask::sString, NumeReTask::stringTable, NumeReTask::table, NumeReKernel::taskQueue, NumeReTask::taskType, NumeReTask::vDebugEvent, and NumeReTask::window.

Referenced by NumeReTerminal().

Here is the call graph for this function:

◆ OnTimer()

void NumeReTerminal::OnTimer ( wxTimerEvent &  event)
private

private OnTimer Blinks the cursor each time it goes off

Parameters
eventwxTimerEvent & The generated timer event
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 1786 of file terminal.cpp.

References GenericTerminal::CURSORINVISIBLE, DoDrawCursor(), GenericTerminal::GetMode(), m_curBG, m_curBlinkRate, m_curChar, m_curDC, m_curFG, m_curFlags, m_curState, m_curX, m_curY, m_init, and m_selecting.

Here is the call graph for this function:

◆ pass_command()

void NumeReTerminal::pass_command ( const std::string &  command,
bool  isEvent 
)

Pass the external command to the kernel without printing it to the console.

Parameters
commandconst std::string&
isEventbool Do not add to the history
Returns
void

Definition at line 925 of file terminal.cpp.

References NumeReWindow::AddToHistory(), Busy(), GenericTerminal::erase_line(), m_bCommandAvailable, m_kernelCS, m_sCommandLine, m_wxParent, and scrollToInput().

Referenced by NumeReWindow::EvaluateCommandLine(), NumeReDropTarget::OnData(), NumeReWindow::OnExecuteFile(), NumeReWindow::OnMenuEvent(), NumeReHistory::OnMouseDblClk(), NumeReWindow::OnPluginMenuEvent(), PackageRepoBrowser::OnThreadUpdate(), PackageRepoBrowser::OnUninstall(), NumeReWindow::OpenFileByType(), and NumeReWindow::pass_command().

Here is the call graph for this function:

◆ passEditedTable()

void NumeReTerminal::passEditedTable ( NumeRe::Table  _table)

Passes a table (as a container) to the kernel.

Parameters
_tableNumeRe::Table
Returns
void

Definition at line 245 of file terminal.cpp.

References _kernel, m_bTableEditAvailable, m_kernelCS, and NumeReKernel::table.

Referenced by TableEditPanel::OnButtonOk().

◆ pasteText()

void NumeReTerminal::pasteText ( )

Implements paste from clip board.

Returns
void

Definition at line 1528 of file terminal.cpp.

References ProcessInput().

Referenced by OnKeyDown(), and NumeReWindow::OnMenuEvent().

Here is the call graph for this function:

◆ pipe_command()

void NumeReTerminal::pipe_command ( const std::string &  sCommand)
private

Pass the entered command line to the kernel.

This is called when the user hits "Enter". It will get the current input line from the internal buffer and sent it to the kernel.

Parameters
sCommandconst std::string&
Returns
void

Definition at line 901 of file terminal.cpp.

References NumeReWindow::AddToHistory(), NumeReKernel::bGettingLine, m_bCommandAvailable, m_kernelCS, m_sCommandLine, and m_wxParent.

Referenced by filterKeyCodes().

Here is the call graph for this function:

◆ ProcessInput()

void NumeReTerminal::ProcessInput ( int  len,
const std::string &  sData 
)
overridevirtual

Processes text received from the keybord or clipboard.

Parameters
lenint
sDataconst std::string&
Returns
void

Reimplemented from GenericTerminal.

Definition at line 2118 of file terminal.cpp.

References ClearSelection(), GenericTerminal::delSelected(), HasSelection(), m_curDC, GenericTerminal::ProcessInput(), and scrollToInput().

Referenced by NumeReDropTarget::OnData(), NumeReWindow::OnMenuEvent(), and pasteText().

Here is the call graph for this function:

◆ ProcessOutput()

void NumeReTerminal::ProcessOutput ( int  len,
const std::string &  sData 
)
overridevirtual

Processes text received from the kernel.

Parameters
lenint
sDataconst std::string&
Returns
void

Reimplemented from GenericTerminal.

Definition at line 2146 of file terminal.cpp.

References ClearSelection(), HasSelection(), m_curDC, and GenericTerminal::ProcessOutput().

Referenced by OnThreadUpdate().

Here is the call graph for this function:

◆ Ready()

void NumeReTerminal::Ready ( )
private

Inform the GUI that the kernel is ready for calculation.

Returns
void

Definition at line 2229 of file terminal.cpp.

References m_isBusy, m_wxParent, and NumeReWindow::Ready().

Referenced by OnThreadUpdate().

Here is the call graph for this function:

◆ removeBreakpoint()

void NumeReTerminal::removeBreakpoint ( const std::string &  _sFilename,
size_t  nLine 
)

This member function removes a breakpoint from the passed file at the indicated line number.

Parameters
_sFilenameconst std::string&
nLinesize_t
Returns
void

Definition at line 280 of file terminal.cpp.

References _kernel, NumeReDebugger::getBreakpointManager(), NumeReKernel::getDebugger(), m_kernelCS, and BreakpointManager::removeBreakpoint().

Referenced by NumeReEditor::RemoveBreakpoint().

Here is the call graph for this function:

◆ ResizeTerminal()

void NumeReTerminal::ResizeTerminal ( int  width,
int  height 
)
overridevirtual

public virtual ResizeTerminal <Resizes the terminal to a given number of characters high and wide

Parameters
widthint The new number of characters wide
heightint The new number of characters high
Returns
void
Author
Derry Bryson
Date
04-22-2004

Reimplemented from GenericTerminal.

Definition at line 2052 of file terminal.cpp.

References ClearSelection(), GenericTerminal::height, m_bitmap, m_boldFont, m_charHeight, m_charWidth, m_height, m_init, m_memDC, m_width, MEASURING_STRING, GenericTerminal::ResizeTerminal(), mu::rint(), GenericTerminal::width, and wxEVT_COMMAND_TERM_RESIZE.

Referenced by SetFont(), and UpdateSize().

Here is the call graph for this function:

◆ ScrollTerminal()

void NumeReTerminal::ScrollTerminal ( int  numLines,
bool  scrollUp = true 
)

public ScrollTerminal Scrolls the terminal text

Parameters
numLinesint The number of lines to scroll
scrollUpbool [=true] True to scroll up, false to scroll down
Returns
void
Author
Mark Erikson
Date
04-22-2004

Definition at line 2247 of file terminal.cpp.

References GenericTerminal::Scroll().

Referenced by wxTermContainer::OnScrollbarScrollLineDown(), wxTermContainer::OnScrollbarScrollLineUp(), wxTermContainer::OnScrollbarScrollPageDown(), wxTermContainer::OnScrollbarScrollPageUp(), wxTermContainer::OnScrollbarScrollThumbtrack(), and wxTermContainer::OnWheelScroll().

Here is the call graph for this function:

◆ scrollToInput()

void NumeReTerminal::scrollToInput ( )
private

This private member function scrolls the terminal all the way down.

Returns
void

Definition at line 1164 of file terminal.cpp.

References GenericTerminal::GetTM(), GenericTerminal::IsScrolledUp(), GenericTerminal::Scroll(), and GenericTerminal::Update().

Referenced by OnChar(), OnThreadUpdate(), pass_command(), and ProcessInput().

Here is the call graph for this function:

◆ SetCursorBlinkRate()

void NumeReTerminal::SetCursorBlinkRate ( int  rate)

public SetCursorBlinkRate Sets how often the cursor blinks

Parameters
rateint How many milliseconds between blinks
Returns
void
Author
Derry Bryson
Date
04-22-2004

Definition at line 866 of file terminal.cpp.

References CURSOR_BLINK_MAX_TIMEOUT, m_curBlinkRate, m_init, and m_timer.

Referenced by wxTermContainer::SetCaretBlinkTime().

◆ SetFont()

bool NumeReTerminal::SetFont ( const wxFont &  font)

public SetFont Sets the font for the terminal

Parameters
fontconst wxFont & The font to be used
Returns
bool Unused (returns true)
Author
Derry Bryson
Date
04-22-2004

Definition at line 746 of file terminal.cpp.

References TerminalCallTip::ChangeFont(), m_boldFont, m_boldUnderlinedFont, m_callTip, m_height, m_init, m_normalFont, m_underlinedFont, m_width, and ResizeTerminal().

Referenced by NumeReWindow::OnOptions().

Here is the call graph for this function:

◆ setKernelSettings()

void NumeReTerminal::setKernelSettings ( const Settings _settings)

This will pass the new kernel settings to the kernel.

Parameters
_settingsconst Settings&
Returns
void

Definition at line 399 of file terminal.cpp.

References _kernel, SettingsValue::active(), Settings::getSetting(), m_kernelCS, GenericTerminal::m_useSmartSense, NumeReKernel::setKernelSettings(), and SETTING_B_SMARTSENSE.

Referenced by NumeReWindow::InitializeProgramOptions(), NumeReWindow::OnClose(), NumeReWindow::OnMenuEvent(), NumeReWindow::OnOptions(), and NumeReWindow::updateTipAtStartupSetting().

Here is the call graph for this function:

◆ SetParent()

void NumeReTerminal::SetParent ( NumeReWindow frame)
inline

Definition at line 125 of file terminal.hpp.

References m_wxParent.

Referenced by NumeReWindow::NumeReWindow().

◆ StartKernelTask()

void NumeReTerminal::StartKernelTask ( )

This member function will start the managed, second thread, in which the kernel will operate.

Returns
void

Definition at line 415 of file terminal.cpp.

References KERNEL_THREAD_STACK_SIZE.

◆ stepDebug()

void NumeReTerminal::stepDebug ( )
inline

Definition at line 221 of file terminal.hpp.

References NumeReKernel::DEBUGGER_STEP, m_kernelCS, and m_nDebuggerCode.

Referenced by DebugViewer::OnMenuEvent().

◆ stepOverDebug()

void NumeReTerminal::stepOverDebug ( )
inline

Definition at line 226 of file terminal.hpp.

References NumeReKernel::DEBUGGER_STEPOVER, m_kernelCS, and m_nDebuggerCode.

Referenced by DebugViewer::OnMenuEvent().

◆ UpdateColors()

void NumeReTerminal::UpdateColors ( )

This member function sets the new colors to the internal pen definitions.

Returns
void

Definition at line 2021 of file terminal.cpp.

References GetDefColors(), m_color_defs, m_colorPen_defs, m_colorPens, m_colors, and GenericTerminal::update_changes().

Referenced by NumeReWindow::OnOptions().

Here is the call graph for this function:

◆ UpdateLibrary()

void NumeReTerminal::UpdateLibrary ( )
inline

Definition at line 240 of file terminal.hpp.

References m_updateProcedureLibrary.

Referenced by NumeReWindow::OnFileEventTimer(), and NumeReWindow::SaveAll().

◆ updatePackage()

void NumeReTerminal::updatePackage ( const std::string &  package)

Updates an installed package with new information after the user created a package with the package creator dialog.

Parameters
packageconst std::string&
Returns
void

Definition at line 230 of file terminal.cpp.

References _kernel, PackageManager::declareNewPackage(), NumeReKernel::getProcedureInterpreter(), and m_kernelCS.

Referenced by NumeReWindow::OnCreatePackage().

Here is the call graph for this function:

◆ UpdateRemoteSize()

void NumeReTerminal::UpdateRemoteSize ( int  width,
int  height 
)
virtual

Fallback for the virtual definition.

Parameters
widthint
heightint
Returns
void

Definition at line 2278 of file terminal.cpp.

◆ UpdateSize()

void NumeReTerminal::UpdateSize ( )

public UpdateSize Updates the terminal's size in characters after it has been resized on the screen.

Returns
void
Author
Mark Erikson
Date
04-22-2004

Definition at line 1953 of file terminal.cpp.

References _kernel, m_boldFont, m_charsInLine, m_curDC, m_inUpdateSize, m_kernelCS, m_linesDisplayed, MEASURING_STRING, ResizeTerminal(), mu::rint(), and NumeReKernel::updateLineLenght().

Referenced by OnSize(), NumeReWindow::toggleConsole(), NumeReWindow::toggleFiletree(), NumeReWindow::toggleHistory(), and NumeReWindow::UpdateTerminalNotebook().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ DebugViewer

friend class DebugViewer
friend

Definition at line 50 of file terminal.hpp.

◆ NumeReKernel

friend class NumeReKernel
friend

Definition at line 49 of file terminal.hpp.

Member Data Documentation

◆ _kernel

◆ m_bCommandAvailable

bool NumeReTerminal::m_bCommandAvailable
protected

Definition at line 169 of file terminal.hpp.

Referenced by Entry(), NumeReKernel::getline(), pass_command(), and pipe_command().

◆ m_bitmap

wxBitmap* NumeReTerminal::m_bitmap
private

Definition at line 107 of file terminal.hpp.

Referenced by ResizeTerminal(), and ~NumeReTerminal().

◆ m_boldFont

wxFont NumeReTerminal::m_boldFont
private

Definition at line 97 of file terminal.hpp.

Referenced by DoDrawCursor(), DrawText(), ResizeTerminal(), SetFont(), and UpdateSize().

◆ m_boldStyle

BOLDSTYLE NumeReTerminal::m_boldStyle
private

Definition at line 138 of file terminal.hpp.

Referenced by DoDrawCursor(), DrawText(), and GetDefColors().

◆ m_boldUnderlinedFont

wxFont NumeReTerminal::m_boldUnderlinedFont
private

Definition at line 98 of file terminal.hpp.

Referenced by DoDrawCursor(), DrawText(), and SetFont().

◆ m_bTableEditAvailable

bool NumeReTerminal::m_bTableEditAvailable
protected

Definition at line 170 of file terminal.hpp.

Referenced by NumeReKernel::getTable(), and passEditedTable().

◆ m_bTableEditCanceled

bool NumeReTerminal::m_bTableEditCanceled
protected

Definition at line 171 of file terminal.hpp.

Referenced by cancelTableEdit(), and NumeReKernel::getTable().

◆ m_callTip

TerminalCallTip* NumeReTerminal::m_callTip
private

Definition at line 75 of file terminal.hpp.

Referenced by Calltip(), CalltipCancel(), and SetFont().

◆ m_charHeight

int NumeReTerminal::m_charHeight
private

◆ m_charsInLine

int NumeReTerminal::m_charsInLine
private

Definition at line 72 of file terminal.hpp.

Referenced by GetTermWidth(), and UpdateSize().

◆ m_charWidth

int NumeReTerminal::m_charWidth
private

◆ m_color_defs

wxColour NumeReTerminal::m_color_defs[16]
private

Definition at line 89 of file terminal.hpp.

Referenced by ModeChange(), and UpdateColors().

◆ m_colorPen_defs

wxPen NumeReTerminal::m_colorPen_defs[16]
private

Definition at line 92 of file terminal.hpp.

Referenced by ModeChange(), and UpdateColors().

◆ m_colorPens

wxPen * NumeReTerminal::m_colorPens
private

Definition at line 92 of file terminal.hpp.

Referenced by ClearChars(), ModeChange(), and UpdateColors().

◆ m_colors

wxColour * NumeReTerminal::m_colors
private

Definition at line 89 of file terminal.hpp.

Referenced by ClearChars(), DoDrawCursor(), DrawText(), ModeChange(), and UpdateColors().

◆ m_curBG

int NumeReTerminal::m_curBG
private

Definition at line 66 of file terminal.hpp.

Referenced by DrawCursor(), and OnTimer().

◆ m_curBlinkRate

int NumeReTerminal::m_curBlinkRate
private

Definition at line 69 of file terminal.hpp.

Referenced by DrawCursor(), GetCursorBlinkRate(), OnTimer(), and SetCursorBlinkRate().

◆ m_curChar

unsigned char NumeReTerminal::m_curChar
private

Definition at line 78 of file terminal.hpp.

Referenced by DrawCursor(), and OnTimer().

◆ m_curDC

wxDC* NumeReTerminal::m_curDC
private

◆ m_curFG

int NumeReTerminal::m_curFG
private

Definition at line 65 of file terminal.hpp.

Referenced by DrawCursor(), and OnTimer().

◆ m_curFlags

int NumeReTerminal::m_curFlags
private

Definition at line 67 of file terminal.hpp.

Referenced by DrawCursor(), and OnTimer().

◆ m_curState

int NumeReTerminal::m_curState
private

Definition at line 68 of file terminal.hpp.

Referenced by DrawCursor(), and OnTimer().

◆ m_curX

int NumeReTerminal::m_curX
private

Definition at line 63 of file terminal.hpp.

Referenced by DrawCursor(), and OnTimer().

◆ m_curY

int NumeReTerminal::m_curY
private

Definition at line 64 of file terminal.hpp.

Referenced by DrawCursor(), and OnTimer().

◆ m_height

int NumeReTerminal::m_height
private

Definition at line 58 of file terminal.hpp.

Referenced by Calltip(), ResizeTerminal(), and SetFont().

◆ m_init

int NumeReTerminal::m_init
private

Definition at line 56 of file terminal.hpp.

Referenced by OnTimer(), ResizeTerminal(), SetCursorBlinkRate(), and SetFont().

◆ m_inUpdateSize

bool NumeReTerminal::m_inUpdateSize
private

Definition at line 84 of file terminal.hpp.

Referenced by UpdateSize().

◆ m_isActive

bool NumeReTerminal::m_isActive
private

Definition at line 85 of file terminal.hpp.

Referenced by OnActivate().

◆ m_isBusy

bool NumeReTerminal::m_isBusy
protected

Definition at line 172 of file terminal.hpp.

Referenced by Busy(), OnKeyDown(), OnThreadUpdate(), and Ready().

◆ m_kernelCS

◆ m_KernelStatus

◆ m_linesDisplayed

int NumeReTerminal::m_linesDisplayed
private

Definition at line 73 of file terminal.hpp.

Referenced by GetTermHeight(), and UpdateSize().

◆ m_marking

bool NumeReTerminal::m_marking
private

Definition at line 82 of file terminal.hpp.

Referenced by MarkSelection().

◆ m_memDC

wxMemoryDC NumeReTerminal::m_memDC
private

Definition at line 104 of file terminal.hpp.

Referenced by ResizeTerminal(), and ~NumeReTerminal().

◆ m_nDebuggerCode

int NumeReTerminal::m_nDebuggerCode
protected

◆ m_normalFont

wxFont NumeReTerminal::m_normalFont
private

Definition at line 95 of file terminal.hpp.

Referenced by DoDrawCursor(), DrawText(), and SetFont().

◆ m_options

Options* NumeReTerminal::m_options
private

Definition at line 114 of file terminal.hpp.

Referenced by GetDefColors(), and OnThreadUpdate().

◆ m_sAnswer

std::string NumeReTerminal::m_sAnswer
protected

◆ m_sCommandLine

std::string NumeReTerminal::m_sCommandLine
protected

Definition at line 174 of file terminal.hpp.

Referenced by Entry(), NumeReKernel::getline(), pass_command(), and pipe_command().

◆ m_scrollBarWidth

int NumeReTerminal::m_scrollBarWidth
private

Definition at line 71 of file terminal.hpp.

◆ m_selecting

bool NumeReTerminal::m_selecting
private

◆ m_selx1

int NumeReTerminal::m_selx1
private

Definition at line 59 of file terminal.hpp.

Referenced by ClearSelection(), HasSelection(), MarkSelection(), and OnLeftDown().

◆ m_selx2

int NumeReTerminal::m_selx2
private

◆ m_sely1

int NumeReTerminal::m_sely1
private

Definition at line 60 of file terminal.hpp.

Referenced by ClearSelection(), HasSelection(), MarkSelection(), and OnLeftDown().

◆ m_sely2

int NumeReTerminal::m_sely2
private

◆ m_timer

wxTimer NumeReTerminal::m_timer
private

Definition at line 110 of file terminal.hpp.

Referenced by DrawCursor(), and SetCursorBlinkRate().

◆ m_underlinedFont

wxFont NumeReTerminal::m_underlinedFont
private

Definition at line 96 of file terminal.hpp.

Referenced by DoDrawCursor(), DrawText(), and SetFont().

◆ m_updateProcedureLibrary

bool NumeReTerminal::m_updateProcedureLibrary
private

Definition at line 86 of file terminal.hpp.

Referenced by Entry(), and UpdateLibrary().

◆ m_width

int NumeReTerminal::m_width
private

Definition at line 57 of file terminal.hpp.

Referenced by ResizeTerminal(), and SetFont().

◆ m_wxParent

NumeReWindow* NumeReTerminal::m_wxParent
private

Definition at line 112 of file terminal.hpp.

Referenced by Busy(), OnThreadUpdate(), pass_command(), pipe_command(), Ready(), and SetParent().


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