[code] Dynamic toolbox that displays script functions and variables.

Change-Id: Id1494580b3832540633d3aefaf04710d21e0a44c
This commit is contained in:
Léa Saviot
2017-11-22 16:55:10 +01:00
parent 2015bcce89
commit e6b4d07cb6
19 changed files with 588 additions and 9 deletions

View File

@@ -1,8 +1,10 @@
#include "editor_controller.h"
#include "menu_controller.h"
#include "script_parameter_controller.h"
#include "variable_box_controller.h"
#include "helpers.h"
#include <apps/code/app.h>
#include <escher/metric.h>
namespace Code {
@@ -54,6 +56,13 @@ bool EditorController::textAreaDidReceiveEvent(TextArea * textArea, Ion::Events:
return true;
}
if (event == Ion::Events::Var) {
VariableBoxController * varBoxController = (static_cast<App *>(textArea->app()))->scriptsVariableBoxController();
varBoxController->setTextAreaCaller(textArea);
textArea->app()->displayModalViewController(varBoxController, 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpLeftMargin, 0, Metric::PopUpRightMargin);
return true;
}
if (event == Ion::Events::EXE) {
// Auto-Indent
char * text = const_cast<char *>(textArea->text());