Commit Graph

129 Commits

Author SHA1 Message Date
Léa Saviot
fbb1fbd138 [apps/code] Handle nullptr prompt text in input 2019-01-10 11:42:05 +01:00
Léa Saviot
f7f77ef9f7 [apps/code] When OK or EXE on empty python input loop, stop the input 2019-01-10 11:42:05 +01:00
Léa Saviot
c4bd55ef08 [apps/code] Clean ConsoleController::printText 2019-01-10 11:42:05 +01:00
Léa Saviot
177373c5af [apps/code] Handle carriage returns in the input text 2019-01-10 11:42:05 +01:00
Léa Saviot
4f4ae4e0f7 Merge branch 'master' into python_turtle 2019-01-08 14:32:43 +01:00
Léa Saviot
1782326ed8 [apps/code] Clean ConsoleController code 2019-01-07 13:36:01 +01:00
Léa Saviot
33072eb9b1 [apps/code] Add some comments 2019-01-07 13:36:01 +01:00
Léa Saviot
8830821d0e [apps/code/python] Inline and indent some code 2019-01-07 13:36:01 +01:00
Léa Saviot
4b306791c0 [python/turtle] Turtle::m_drawn is false if sandbox not displayed
This way, Turtle::draw() and erase() are more symetrical and no not
perform themselves if the turtle is already drawn / erased.
2018-12-18 12:05:46 +01:00
Léa Saviot
ed19d19070 Merge branch 'master' into python_turtle 2018-12-17 15:49:46 +01:00
Léa Saviot
ce1cdaacc3 [apps/code] Fix console reloading that did not occur often enough
Scenario:
Write a script that prints "abc"
Open the console -> prints "abc"
Modify the script to print "ab"
Go back to the console -> "ab" not printed !
2018-12-12 11:15:50 +01:00
Léa Saviot
cc3beb6014 [python/turtle] Turtle::reset() method 2018-12-06 17:26:43 +01:00
Émilie Feral
55be86ef50 [escher] TableView::cellAtLocation should return nullptr if the cell is
invisible and therefore no view displays it.

Fix bug: add 4 functions, in the values table one cell is wrong as soon
as you edit an x value
2018-11-26 11:24:30 +01:00
Émilie Feral
932782bec4 [code] Load Variable box content only once in the ConsoleController (to
avoid memory exhaustion later)
2018-11-23 12:04:03 +01:00
Émilie Feral
a4f7d83805 [code] Load Variable box content before compiling any other python code
to avoid memory exhaustion when displaying variable box
2018-11-23 12:04:03 +01:00
Émilie Feral
c7e001a01d [code] ConsoleController: TextField handle any move event so escaping by going up needs to be handled in textFieldDidReceiveEvent 2018-11-23 12:04:03 +01:00
Émilie Feral
99054df77b [code] Remove useless code: force edition on Var event is already
handled by TextField
2018-11-23 12:04:03 +01:00
Émilie Feral
698332c355 [escher] InputTextDelegate and LayoutFieldDelegate don't inherit from
InputTextDelegate to avoid diamond inheritance
2018-11-23 12:04:03 +01:00
Émilie Feral
7778c694d1 [escher] Create an InputEventHandlerDelegate that gives the toolbox to
be used by an InputEventHandler
2018-11-23 12:04:02 +01:00
Léa Saviot
71d8358722 [apps/escher/poincare] Change KDText::FontSize to KDFont 2018-11-23 12:04:02 +01:00
Émilie Feral
01e433a9f2 [escher] Clean Field and Input class hierarchy:
Class hierarchy:
- InputEventHandler
- TextInput
- EditableField derives from InputEventHandler
- LayoutField, TextField and ExpressioField derives from EditableField
- TextArea and TextField derives from TextInput
2018-11-23 12:04:02 +01:00
Léa Saviot
b0e29bb9d7 [apps/code] Storage extensions do not include the dot 2018-11-23 12:04:02 +01:00
Léa Saviot
52a21198a4 [apps/ion] Use the new storage API 2018-11-23 12:03:58 +01:00
Léa Saviot
5d92f13c26 Clean strlcpy arguments 2018-10-17 11:22:37 +02:00
Romain Goyet
f8beae3b86 [kandinsky] Move to KDFont 2018-10-11 16:44:02 +02:00
Léa Saviot
c16d9e7ffe [apps/code] Load Python in the viewWillAppear of the controllers 2018-09-21 12:26:57 +02:00
Léa Saviot
2661032993 [apps/code] Fix Python loading when going in the VarBoxController
The Var box controller deinited python on exit, and the console
controller did not reload python + it made the console controller lose
all its context, such as imported scripts
2018-09-21 11:55:12 +02:00
Émilie Feral
afce751eb7 [code] Get rid of malloc: keep a buffer in Code::App to be used as python heap 2018-09-19 18:20:30 +02:00
Émilie Feral
7df03ec762 [code] In lock-on-console mode: enable poping controllers on the stack
which are above the console controller
2018-06-13 13:23:46 +02:00
Émilie Feral
769bc1ad3c [code] In lock-on-console mode: Enable interrupting input loop and execution when clicking on 'home' or 'back' 2018-06-13 13:23:46 +02:00
Émilie Feral
24c9549866 [escher] Handle copy/cut event on selectable table view 2018-06-07 14:46:14 +02:00
Émilie Feral
da8286d3f7 [code] Escaping the input loop on a 'home' event should be handled by
the code app instead of the console controller to ensure to escape the
input loop even when the toolbox (or any modal) is displayed
2018-05-23 10:01:15 +02:00
Léa Saviot
3b582a2e46 Merge branch 'SaisieJolie30Apr' into SaisieJolie8May
Change-Id: Ia4196119fc56c5bc3423aea752b49f3f7ba39499
2018-05-08 15:17:51 +02:00
Romain Goyet
84561a929f [escher] Clean the ScrollView, TableView and SelectableTableView constructors 2018-04-18 18:08:07 +02:00
Léa Saviot
c4b5d4cf40 Merge branch 'SaisieJolieRebase1201' into SaisieJolieMerge10Apr
Change-Id: I802dbb9f7c0eebf75a1b6cd21ddd194e89b53752
2018-04-10 17:21:54 +02:00
Émilie Feral
b714d9242e [apps] Code: when in input loop, handle 'up' event 2018-04-09 14:42:26 +02:00
Émilie Feral
9cadc49264 [apps] Code: Fix autoImportScript to avoid corrupting stack 2018-03-28 10:03:36 +02:00
Émilie Feral
f1ddf1dbf4 Valgrind: uninitialized value, memory leak 2018-03-28 10:02:09 +02:00
Émilie Feral
19ca0f0640 [apps] Code: use the FileSystem to store the scripts instead of an
accordion
2018-03-22 14:01:38 +01:00
Émilie Feral
3db86a8111 [apps] Code: merge actions for text input in ConsoleController and
EditorController
2018-03-22 13:12:12 +01:00
Émilie Feral
aade7cb2fe [escher] Create a class TextInput (from which derived TextField,
TextArea)
2018-03-22 13:12:12 +01:00
Émilie Feral
576caa039f [apps][escher] Add methods 'handleEventWithText' in TextField and
TextArea to fix bug in probability (adding a toolbox text from the
calculations controller)
2018-03-22 13:12:12 +01:00
Émilie Feral
c5e525ddb7 Enable to give options at run-time 2018-03-22 11:58:56 +01:00
Romain Goyet
fd7516f8ac [python] "input" now displays the provided prompt 2018-02-01 14:10:26 +01:00
Romain Goyet
0682d21a32 [python] Implement ExecutionEnvironment::input
By using a re-entrant RunLoop call
2018-02-01 14:10:26 +01:00
Romain Goyet
651d5715e4 [python] Adding mp_hal_input 2018-02-01 14:10:26 +01:00
Léa Saviot
a2c0eaa20b [apps/escher] Remove textFieldDidAbortEditing const char * argument.
Also removed the same argument in scrollableExpressionViewWithCursorDidAbortEditing.

Change-Id: Iadc6b708cfc0fab44b9fd4edb980cb759d41e8d0
2018-01-23 10:28:02 +01:00
Émilie Feral
077a95197e [escher] SelectableTableView handles setting the ccell as first
responder if needed
2017-12-20 17:17:41 +01:00
Léa Saviot
dcd5d05537 [code] Fixed selection bug in the console history.
When clearing the console history, the previously selected cell was not
unhighlighted. This sometimes caused a random cell to be highlighted when
adding new commands.

Change-Id: I393446527fc06d7ae075c21124cb78e09d63ef99
2017-12-05 11:28:23 +01:00
Léa Saviot
56ac5071f2 [code] Fixed table reload when executing one script.
Before, the history would not redraw itself properly when selecting
"Execute Script" from a script's options.

Change-Id: Ibefd920eb038165a81ddb464dbf889047ad1f370
2017-12-04 13:51:38 +01:00