Commit Graph

597 Commits

Author SHA1 Message Date
Léa Saviot
042bdf3477 [escher] setEditing(true) when handling event in ScrollableEVWithCursor
Change-Id: I24760d7050fffd3ba5c38393450c4545354a7769
2018-04-16 11:38:14 +02:00
Léa Saviot
34f6729e35 [escher] Add initial text before handling event in editableEV
It seems more logical.

Change-Id: I72432221ba567b0f7b0d46946a397e4d1b53c8d0
2018-04-16 11:20:15 +02:00
Léa Saviot
e60cf7cea3 [escher] Clean code.
Change-Id: I081aa2ac6b1be4df034aeac0e274379e9daa2afd
2018-04-16 11:19:30 +02:00
Léa Saviot
e90b3fd1cd Merge branch 'SaisieJolieMerge10Apr' into SaisieJolieMerge11Apr (master)
Change-Id: I06732115ee37ffd9a037a8412e1c57751dfb3e0f
2018-04-12 09:58:09 +02:00
Léa Saviot
44e8eb1285 [escher] EditableExpressionView, fix setEditing
It should only apply to the TextField or ScrollableExpressionViewWithCursor
depending on the edition mode.

Change-Id: I2ae4a3a4e956dc1d51729c9497642b9c236f9069
2018-04-11 10:42:20 +02:00
Léa Saviot
c4b5d4cf40 Merge branch 'SaisieJolieRebase1201' into SaisieJolieMerge10Apr
Change-Id: I802dbb9f7c0eebf75a1b6cd21ddd194e89b53752
2018-04-10 17:21:54 +02:00
Léa Saviot
de25105f4a [usb] Handle the usb Plugged detection in getEvent.
Change-Id: Idfba5925a7c79c722b0aad3a1c24799b31d88298
2018-04-06 14:31:48 +02:00
Léa Saviot
5e07048bb6 [usb] To exit USB, scan if the usb is plugged or the Back key pressed
Change-Id: If92c0db8be6d07a91582c4a2d4ed0c3927020e43
2018-04-06 14:31:46 +02:00
Léa Saviot
b7829a0937 [usb] Change apps and relocate usb stack on ram.
When the device is plugged to a USB host.

Change-Id: I5d7ae3c86cacce509b6ccca2746984f7e806cb49
2018-04-06 14:31:45 +02:00
Émilie Feral
06ace4369c Clean warnings (comparison signed and unsigned) 2018-03-28 10:01:21 +02:00
Émilie Feral
b0ede47d55 [ion] Change Storage design (former kallax) 2018-03-22 14:01:38 +01:00
Émilie Feral
aa984bca74 [escher][ion] Move Record and Kallax in Ion/ 2018-03-22 14:01:38 +01:00
Émilie Feral
b9a852a9d1 [escher] Change name: File --> Record, FileSystem --> Kallax 2018-03-22 14:01:38 +01:00
Émilie Feral
338ee4e0b0 [escher] Indicate the address of the file system in the header section
of the flash
2018-03-22 14:01:38 +01: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
c37696133d [escher] Create class File and FileSystem 2018-03-22 14:01:38 +01:00
Émilie Feral
4c796d404f [escher] TextField: prevent from inserting text with \n 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
c50e57029b [escher] TextInputHelper: special case for 'random()' and handle
parenthesis already completed (ie 'u(n)')
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
7fcf77ce23 [escher] Fix bugs in TextField:
1. The cursor size is counted twice in minimalSizeForOptimalDisplay (bug
in regression table for instance)
2. Avoid layouting twice after scrolling by enabling overscroll
2018-03-22 13:12:12 +01:00
Émilie Feral
2b0b40d6d6 [escher] TextField: force layout after scroll reload when the content
size of scrollview might have changed
2018-03-22 10:22:18 +01:00
Émilie Feral
4af6e71e21 [escher] Fix bugs in TextField:
1. The cursor size is counted twice in minimalSizeForOptimalDisplay (bug
in regression table for instance)
2. Avoid layouting twice after scrolling by enabling overscroll
2018-03-22 10:22:18 +01:00
Émilie Feral
9dd637f7c3 [apps] Settings: clean number of rows 2018-03-22 10:19:15 +01:00
Émilie Feral
2f5f94ade0 [escher] Toolbox: back event on toolbox with no page depth is handled by
the modal view controller
2018-02-14 12:04:18 +01:00
Émilie Feral
612a436bf6 [escher] Revert 'Clean useless reload' 2018-02-01 14:13:26 +01:00
Romain Goyet
67f082f4e8 [emscripten] Use emterpreter
This allows us to control the runloop
2018-02-01 14:10:26 +01:00
Romain Goyet
314fde955a [escher] Add a PointerTextView class 2018-02-01 14:10:26 +01:00
Émilie Feral
bce658052c [escher] Fix uninitialized read 2018-02-01 12:19:33 +01:00
Léa Saviot
90068b5cc7 [poincare] Fix Matrix copy bug.
When selecting a matrix in the calculation history and pressing 'OK',
in the apps Calculation, there was a nullptr bug.

Change-Id: I8f05771b76bcb3c68b51cf8ca33a49011144abf9
2018-01-31 10:32:07 +01:00
Émilie Feral
8c32a61bb1 [escher] TextField: markAsDirty the previous text when setting a new
text
2018-01-30 18:19:27 +01:00
Émilie Feral
5d8256435e [apps] Probability: fix bug; in calculation controller, when reloading cells after editing textfield, do not reload selection (it corrupts the responder chain if the first reponder was a modal view for ex) 2018-01-30 18:09:59 +01:00
Émilie Feral
126212e25b [escher] SelectableTableView: add an option when reloading data 2018-01-30 18:09:59 +01:00
Émilie Feral
f97cbd6d20 [escher] Clean useless reloadData 2018-01-30 18:09:59 +01:00
Léa Saviot
bc21aa919f [escher] Missing return statement.
Change-Id: I96feaeac32a8a01098b5446e9bc11321442b1022
2018-01-26 14:27:45 +01:00
Léa Saviot
acf8fe25ff [escher] Fix text field bug when editing a sequence.
The InputViewController inserted the text to edit in the TextField then
set the edition to true, which deleted the text.

Change-Id: Id77e740c0b615066e647512a19731214a435a2f0
2018-01-26 14:23:47 +01:00
Léa Saviot
4b79175fa8 [escher] Handle Clear event in ScrollableExpressionViewWithCursor.
Change-Id: I8a71a3f866420cd62514a7431f89a468580ff4eb
2018-01-25 17:31:51 +01:00
Léa Saviot
f38bbff447 [escher] Fix responder order bug.
EditableExpressionView cannot pass the first responder state to one of
its children, otherwise Calculation::EditableExpressionView's overriden
handleEvent method is never called.

Change-Id: Id2b56b9501e67431e860573cf4c62a16651c3958
2018-01-24 10:20:09 +01:00
Léa Saviot
b9a7973961 [escher/poincare] Move the cursor when inserting a layout (if wanted).
The new pointed layout can be specified. If not, the cursor will be on
the right of the new layout.

Change-Id: I5e0c37cf6365447f8eaf354dc5e86a24c6981034
2018-01-24 10:18:12 +01:00
Léa Saviot
b3c5b93d21 [escher] Fix invalid pointer access.
A layout might be deleted after calling addLayout: for instance, if the
layout is horizontal and added as a child to another horizontal layout,
its children are stolen and it is deleted.

Change-Id: Icc2c344dd7878d7df2ec72f014a98dd0d27dc258
2018-01-23 17:13:58 +01:00
Jean-Baptiste Boric
56c6c17b57 [escher] Fix Valgrind uninitialized read 2018-01-23 11:36:27 +01:00
Léa Saviot
bea0d208c1 [escher] ScrollableExpressionViewWithCursor handles Back event.
Change-Id: I8d98040e34740b48ee8285e5356ea94cd48f2e98
2018-01-23 10:28:02 +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
Léa Saviot
4d778b5d9f [apps/escher/poincare] Use 2D Edition in Sequence and Graph apps.
EditableExpressionView is renamed ScrollableViewWithCursor.
EditableExpressionView is now a View that displays either a TextField or
a ScrollableViewWithCursor, depending on Poincare::Preferences.

Change-Id: Id44ddcd9a83f5fd17d65753ca4c94c5c7cda9b8a
2018-01-23 10:28:02 +01:00
Léa Saviot
7094bcef75 [escher] EditableExpressionView handles Paste events.
Change-Id: Ie23fe49a4b300592ffb77c5548305d1c50279dd1
2018-01-19 15:38:49 +01:00
Léa Saviot
1ad4e6e744 [escher/poincare] Remove unneeded layout computation.
When moving a cursor in an EditableExpressionView, do not recompute the
layout, unless specified otherwise (for instance when entering or
exiting a MatrixLayout).

Change-Id: Ic2471095d6f6a08014a79f1d9d8fb7d39a1a6864
2018-01-18 17:55:16 +01:00
Léa Saviot
d8803c610c [apps] "New Matrix" item in math toolbox.
Change-Id: Iec01ffa96ec64f42d2cbc4b15b14eea7cfe4eaa4
2018-01-17 14:26:50 +01:00
Léa Saviot
e1811e0399 [apps/calculation] Fix redraw bug.
Change-Id: I86cf0839f4aa7f1285ed378850f6d09e811252a2
2018-01-17 10:55:34 +01:00
Léa Saviot
627e96e5e3 [escher] Black cursor color.
Change-Id: I150e4f51a1162ded51af5e6a72cdaa70b428965d
2018-01-16 17:30:55 +01:00
Léa Saviot
62ae5840e9 [apps/poincare] Handle cursor positioning in EditableExpressionView.
There cursor was not in the right place for log(), cos(), ...

Change-Id: I8fe1f350f3054460204cb5d40508212642333e3e
2018-01-16 16:43:40 +01:00