Numworks Epsilon  1.4.1
Graphing Calculator Operating System
Code::ConsoleController Class Reference

#include <console_controller.h>

Inheritance diagram for Code::ConsoleController:
ViewController ListViewDataSource SelectableTableViewDataSource SelectableTableViewDelegate TextFieldDelegate MicroPython::ExecutionEnvironment Responder TableViewDataSource ScrollViewDataSource TextInputDelegate

Public Member Functions

 ConsoleController (Responder *parentResponder, ScriptStore *scriptStore)
 
 ~ConsoleController ()
 
 ConsoleController (const ConsoleController &other)=delete
 
 ConsoleController (ConsoleController &&other)=delete
 
ConsoleController operator= (const ConsoleController &other)=delete
 
ConsoleControlleroperator= (ConsoleController &&other)=delete
 
bool loadPythonEnvironment (bool autoImportScripts=true)
 
void unloadPythonEnvironment ()
 
bool pythonEnvironmentIsLoaded ()
 
void autoImport ()
 
void autoImportScript (Script script, bool force=false)
 
void runAndPrintForCommand (const char *command)
 
Viewview () override
 
void viewWillAppear () override
 
void didBecomeFirstResponder () override
 
bool handleEvent (Ion::Events::Event event) override
 
ViewController::DisplayParameter displayParameter () override
 
int numberOfRows () override
 
KDCoordinate rowHeight (int j) override
 
KDCoordinate cumulatedHeightFromIndex (int j) override
 
int indexFromCumulatedHeight (KDCoordinate offsetY) override
 
HighlightCellreusableCell (int index, int type) override
 
int reusableCellCount (int type) override
 
int typeAtLocation (int i, int j) override
 
void willDisplayCellAtLocation (HighlightCell *cell, int i, int j) override
 
void tableViewDidChangeSelection (SelectableTableView *t, int previousSelectedCellX, int previousSelectedCellY) override
 
bool textFieldShouldFinishEditing (TextField *textField, Ion::Events::Event event) override
 
bool textFieldDidReceiveEvent (TextField *textField, Ion::Events::Event event) override
 
bool textFieldDidFinishEditing (TextField *textField, const char *text, Ion::Events::Event event) override
 
bool textFieldDidAbortEditing (TextField *textField, const char *text) override
 
ToolboxtoolboxForTextInput (TextInput *textInput) override
 
void displaySandbox () override
 
void printText (const char *text, size_t length) override
 
const char * inputText (const char *prompt) override
 
- Public Member Functions inherited from ViewController
 ViewController (Responder *parentResponder)
 
virtual const char * title ()
 
virtual void viewDidDisappear ()
 
- Public Member Functions inherited from Responder
 Responder (Responder *parentResponder)
 
virtual void willResignFirstResponder ()
 
virtual void didEnterResponderChain (Responder *previousFirstResponder)
 
virtual void willExitResponderChain (Responder *nextFirstResponder)
 
ResponderparentResponder () const
 
RespondercommonAncestorWith (Responder *responder)
 
void setParentResponder (Responder *responder)
 
Appapp ()
 
virtual Toolboxtoolbox ()
 
- Public Member Functions inherited from ListViewDataSource
virtual KDCoordinate cellWidth ()
 
KDCoordinate columnWidth (int i) override
 
int numberOfColumns () override
 
void willDisplayCellAtLocation (HighlightCell *cell, int x, int y) override
 
int indexFromCumulatedWidth (KDCoordinate offsetX) override
 
KDCoordinate cumulatedWidthFromIndex (int i) override
 
virtual void willDisplayCellForIndex (HighlightCell *cell, int index)
 
- Public Member Functions inherited from SelectableTableViewDataSource
 SelectableTableViewDataSource ()
 
int selectedRow ()
 
int selectedColumn ()
 
void selectRow (int j)
 
void selectColumn (int i)
 
void selectCellAtLocation (int i, int j)
 
- Public Member Functions inherited from ScrollViewDataSource
 ScrollViewDataSource ()
 
KDPoint offset () const
 
bool setOffset (KDPoint offset)
 
- Public Member Functions inherited from TextFieldDelegate
virtual bool textFieldDidHandleEvent (TextField *textField, bool returnValue, bool textHasChanged)
 
- Public Member Functions inherited from MicroPython::ExecutionEnvironment
 ExecutionEnvironment ()
 
void runCode (const char *)
 

Static Public Attributes

static constexpr KDText::FontSize k_fontSize = KDText::FontSize::Large
 

Additional Inherited Members

- Public Types inherited from ViewController
enum  DisplayParameter { DisplayParameter::Default, DisplayParameter::DoNotShowOwnTitle, DisplayParameter::WantsMaximumSpace }
 
- Static Public Member Functions inherited from MicroPython::ExecutionEnvironment
static ExecutionEnvironmentcurrentExecutionEnvironment ()
 
- Protected Attributes inherited from MicroPython::ExecutionEnvironment
bool m_sandboxIsDisplayed
 

Detailed Description

Definition at line 15 of file console_controller.h.

Constructor & Destructor Documentation

◆ ConsoleController() [1/3]

Code::ConsoleController::ConsoleController ( Responder parentResponder,
ScriptStore scriptStore 
)

Definition at line 18 of file console_controller.cpp.

◆ ~ConsoleController()

Code::ConsoleController::~ConsoleController ( )

Definition at line 47 of file console_controller.cpp.

◆ ConsoleController() [2/3]

Code::ConsoleController::ConsoleController ( const ConsoleController other)
delete

◆ ConsoleController() [3/3]

Code::ConsoleController::ConsoleController ( ConsoleController &&  other)
delete

Member Function Documentation

◆ autoImport()

void Code::ConsoleController::autoImport ( )

Definition at line 81 of file console_controller.cpp.

◆ autoImportScript()

void Code::ConsoleController::autoImportScript ( Script  script,
bool  force = false 
)

Definition at line 337 of file console_controller.cpp.

◆ cumulatedHeightFromIndex()

KDCoordinate Code::ConsoleController::cumulatedHeightFromIndex ( int  j)
overridevirtual

Implements TableViewDataSource.

Definition at line 189 of file console_controller.cpp.

◆ didBecomeFirstResponder()

void Code::ConsoleController::didBecomeFirstResponder ( )
overridevirtual

Reimplemented from Responder.

Definition at line 131 of file console_controller.cpp.

◆ displayParameter()

ViewController::DisplayParameter Code::ConsoleController::displayParameter ( )
inlineoverridevirtual

Reimplemented from ViewController.

Definition at line 43 of file console_controller.h.

◆ displaySandbox()

void Code::ConsoleController::displaySandbox ( )
overridevirtual

Reimplemented from MicroPython::ExecutionEnvironment.

Definition at line 304 of file console_controller.cpp.

◆ handleEvent()

bool Code::ConsoleController::handleEvent ( Ion::Events::Event  event)
overridevirtual

Reimplemented from Responder.

Definition at line 135 of file console_controller.cpp.

◆ indexFromCumulatedHeight()

int Code::ConsoleController::indexFromCumulatedHeight ( KDCoordinate  offsetY)
overridevirtual

Implements TableViewDataSource.

Definition at line 193 of file console_controller.cpp.

◆ inputText()

const char * Code::ConsoleController::inputText ( const char *  prompt)
overridevirtual

Reimplemented from MicroPython::ExecutionEnvironment.

Definition at line 96 of file console_controller.cpp.

◆ loadPythonEnvironment()

bool Code::ConsoleController::loadPythonEnvironment ( bool  autoImportScripts = true)

Definition at line 51 of file console_controller.cpp.

◆ numberOfRows()

int Code::ConsoleController::numberOfRows ( )
overridevirtual

Implements TableViewDataSource.

Definition at line 181 of file console_controller.cpp.

◆ operator=() [1/2]

ConsoleController Code::ConsoleController::operator= ( const ConsoleController other)
delete

◆ operator=() [2/2]

ConsoleController& Code::ConsoleController::operator= ( ConsoleController &&  other)
delete

◆ printText()

void Code::ConsoleController::printText ( const char *  text,
size_t  length 
)
overridevirtual

Reimplemented from MicroPython::ExecutionEnvironment.

Definition at line 314 of file console_controller.cpp.

◆ pythonEnvironmentIsLoaded()

bool Code::ConsoleController::pythonEnvironmentIsLoaded ( )

Definition at line 77 of file console_controller.cpp.

◆ reusableCell()

HighlightCell * Code::ConsoleController::reusableCell ( int  index,
int  type 
)
overridevirtual

Implements TableViewDataSource.

Definition at line 197 of file console_controller.cpp.

◆ reusableCellCount()

int Code::ConsoleController::reusableCellCount ( int  type)
overridevirtual

Implements TableViewDataSource.

Definition at line 209 of file console_controller.cpp.

◆ rowHeight()

KDCoordinate Code::ConsoleController::rowHeight ( int  j)
overridevirtual

Implements TableViewDataSource.

Definition at line 185 of file console_controller.cpp.

◆ runAndPrintForCommand()

void Code::ConsoleController::runAndPrintForCommand ( const char *  command)

Definition at line 87 of file console_controller.cpp.

◆ tableViewDidChangeSelection()

void Code::ConsoleController::tableViewDidChangeSelection ( SelectableTableView t,
int  previousSelectedCellX,
int  previousSelectedCellY 
)
overridevirtual

Reimplemented from SelectableTableViewDelegate.

Definition at line 235 of file console_controller.cpp.

◆ textFieldDidAbortEditing()

bool Code::ConsoleController::textFieldDidAbortEditing ( TextField textField,
const char *  text 
)
overridevirtual

Reimplemented from TextFieldDelegate.

Definition at line 282 of file console_controller.cpp.

◆ textFieldDidFinishEditing()

bool Code::ConsoleController::textFieldDidFinishEditing ( TextField textField,
const char *  text,
Ion::Events::Event  event 
)
overridevirtual

Reimplemented from TextFieldDelegate.

Definition at line 266 of file console_controller.cpp.

◆ textFieldDidReceiveEvent()

bool Code::ConsoleController::textFieldDidReceiveEvent ( TextField textField,
Ion::Events::Event  event 
)
overridevirtual

Implements TextFieldDelegate.

Definition at line 257 of file console_controller.cpp.

◆ textFieldShouldFinishEditing()

bool Code::ConsoleController::textFieldShouldFinishEditing ( TextField textField,
Ion::Events::Event  event 
)
overridevirtual

Implements TextFieldDelegate.

Definition at line 251 of file console_controller.cpp.

◆ toolboxForTextInput()

Toolbox * Code::ConsoleController::toolboxForTextInput ( TextInput textInput)
overridevirtual

Implements TextInputDelegate.

Definition at line 299 of file console_controller.cpp.

◆ typeAtLocation()

int Code::ConsoleController::typeAtLocation ( int  i,
int  j 
)
overridevirtual

Implements TableViewDataSource.

Definition at line 217 of file console_controller.cpp.

◆ unloadPythonEnvironment()

void Code::ConsoleController::unloadPythonEnvironment ( )

Definition at line 68 of file console_controller.cpp.

◆ view()

View* Code::ConsoleController::view ( )
inlineoverridevirtual

Implements ViewController.

Definition at line 39 of file console_controller.h.

◆ viewWillAppear()

void Code::ConsoleController::viewWillAppear ( )
overridevirtual

Reimplemented from ViewController.

Definition at line 118 of file console_controller.cpp.

◆ willDisplayCellAtLocation()

void Code::ConsoleController::willDisplayCellAtLocation ( HighlightCell cell,
int  i,
int  j 
)
overridevirtual

Reimplemented from TableViewDataSource.

Definition at line 228 of file console_controller.cpp.

Member Data Documentation

◆ k_fontSize

constexpr KDText::FontSize Code::ConsoleController::k_fontSize = KDText::FontSize::Large
static

Definition at line 17 of file console_controller.h.


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