Commit Graph

963 Commits

Author SHA1 Message Date
Léa Saviot
f2e2e93888 [code] Larger console button in MenuController.
Change-Id: Ia8a495d4de95a4a9d6fee698975b2c7e831c4c43
2017-11-17 14:05:23 +01:00
Léa Saviot
57633829a9 [code] Split the Menu Controller in two columns.
The scripts names are on the right and open the script edition.
The left cells open the script options.

Change-Id: I3fbab8c3861f3395c3206775c92cda3470963b26
2017-11-17 14:05:23 +01:00
Léa Saviot
07c6acada4 [escher/code] Move Accordion from escher/ to apps/code/.
Change-Id: Id90ef9791f8c18bcdce497b8e20f060314f7b58b
2017-11-17 14:05:23 +01:00
Léa Saviot
ce30428306 [escher] TextArea handles Paste event.
Change-Id: I33c0d21093f94edd987d7f4d2f7fd7363a1ee525
2017-11-17 14:05:23 +01:00
Léa Saviot
58e5e3c337 [escher] Fixed Toolbox bug.
The Toolbox did not always redraw itself when needed (for instance, when going
back from the For submenu in the Code Toolbox).

Change-Id: I157b883e321a497b4b958aae53c4e8406bad1725
2017-11-17 14:05:23 +01:00
Léa Saviot
59c840ef9a [code] Auto-indentation when inserting Toolbox items in scripts.
Change-Id: Id444ab91965999a3d322dee2fa58f73c86aa6992
2017-11-17 14:05:23 +01:00
Léa Saviot
4f74b6d849 [code] The addScript button disappears when needed.
When there is already the maximal number of scripts or when the
ScriptStore accordion buffer is full.

Change-Id: I0d43d42626da7f060a2309c66f1806b35a29bf38
2017-11-17 14:05:23 +01:00
Léa Saviot
42e6435973 [code] Fixed Script edition cursor bugs.
The scroll is now reloaded when text is inserted or a new line is
entered. When opening a script, the cursor moves to the end of the
script.

Change-Id: I027ea80db485916fc3fc962cfa9e032ca0bbc81e
2017-11-17 11:59:50 +01:00
Léa Saviot
13bf8c2d62 [code] Python toolbox.
Change-Id: I4028b05c662cae04a5ac3af5021f3438bb22dcd0
2017-11-17 11:59:50 +01:00
Léa Saviot
0d6cb75425 [escher] Inlined TextField methods.
Change-Id: I2653bd3a97ba5c5a010f17ac3f7eb054013cd9d3
2017-11-17 11:59:50 +01:00
Léa Saviot
ce51228ca8 [escher/code] Changed Console and TitleBar margins.
Change-Id: I8ac4d84da84e0194122f34bb6259a1a7b6a1c81e
2017-11-17 11:59:50 +01:00
Léa Saviot
fbdf6379d8 [code] Script editor and Console are stacked.
Before, they appeared in modal views.

Change-Id: I42ea742370cd3cf0854965f67fc44b43db4cc309
2017-11-17 11:59:50 +01:00
Léa Saviot
eadf4a018a [escher] New handling of stack view headers in StackViewController.
A boolean in ViewController states if the ViewController wants MaximumSpace (do
not show any stack view headers), or if it does not want to add its own title to
the stack view headers. If the ViewController's title is null, it is not added
to the stack view headers.
By default, ButtonRowControllers do not want to add their title (because they
are only used for now in TabViews, where the title is already displayed in the
tab).

Change-Id: I9e4c64b845262e4d44eb03cf769950f9c9e67a3a
2017-11-17 11:59:50 +01:00
Léa Saviot
68e237702b [escher/apps] Factorization of Toolbox.
MathToolbox methods moved to its parent, Toolbox (in escher).
Node and ToolboxNode classes renamed MessageTree and ToolboxMessageTree.
They are now in escher/, not in apps/.

Change-Id: Ibb26b0e9016094cef79506a1e9fc6dfb492d7103
2017-11-17 11:59:50 +01:00
Léa Saviot
6ee47d6168 [code] Prevent script name extension edition.
Change-Id: I4ac8d032fd88b853670afeebaecc8d6fd5ef981d
2017-11-17 11:59:50 +01:00
Léa Saviot
95c6d9532b [escher] Fixed TextField.
A TextField delegate should process events before the TextField itself.
EditableCellTableViewController now verifies the position of the cursor to
determine if a Left or Right event should finish the TextField edition.

Change-Id: I6c8e78d6d02c7ab87e7d81770b4242a16fecde32
2017-11-17 11:59:50 +01:00
Léa Saviot
b7baec4a40 [code] Keyboard events translation, for script or command edition.
For instance, the "power" event should insert "**" in the text, not "^".
Added a universal i18n file in apps/code.

Change-Id: I5d067b0c5b86590af95aa98856522d54e42acba6
2017-11-17 11:59:50 +01:00
Léa Saviot
681be23c30 [code] Auto indentation in the script editor.
Change-Id: I7066c41fa53068e6f18a5ad226b5e72f591f02e2
2017-11-17 11:59:50 +01:00
Léa Saviot
745eddfa05 [code] Added default Fibonacci script.
Change-Id: I2766fa542ee64722018486a874e9855a5976a788
2017-11-17 11:59:50 +01:00
Léa Saviot
45aa526cd6 [code] Fixed SelectableTableView selection problem.
If adding a script fails, the selectableTableView should select the "Add
script" line.

Change-Id: I373cdfa0afcc334e4bf306b1cee4bfb817417980
2017-11-17 11:59:50 +01:00
Léa Saviot
fbb5c70339 [code] Cleaned Script and ScriptStore classes, created accordion.h
A Script object now contains its AutoImport marker, its name and its
content. The ScripStore methods have better names and the optimization
is cleaner.

Change-Id: I1b21af2d23f1c9a34f984309512b0c01b2f1c320
2017-11-17 11:59:50 +01:00
Léa Saviot
a14cfd0aea [code] Script names are displayed and can be edited.
Change-Id: I5acc468920b66673e78da130bf90a74d0c062211
2017-11-17 11:59:50 +01:00
Léa Saviot
f3200fe2e9 [code] Program store that uses an accordeon buffer to store the
programs. The user can now add scripts.
A contextual menu displays various options when clicking on a script,
such as editing.

Change-Id: I124a17f7584b0beedb897e8499ca0a1bb6c13cbe
2017-11-17 11:59:50 +01:00
Romain Goyet
3d10d3e951 Use zero-initialization for character arrays
It makes some not-fully-compliant compilers happy
2017-10-19 17:31:40 +02:00
Émilie Feral
4e5b68b45d [escher] Fix bug due to int32 overflow
Change-Id: If9760bd9082b7e3f8ebea04cef1df63bae39a2a6
2017-09-27 17:41:33 +02:00
Émilie Feral
feeec6b826 [escher] Add behaviour for end and origin events
Change-Id: I363dad3c566289a285179a9f26d3a779f0ff812f
2017-09-27 10:28:16 +02:00
Damien Nicolet
6392735e70 Add orgin/end keyboard shortcuts, by pressing shift left or shift right 2017-09-20 10:16:34 +02:00
Émilie Feral
8a50b42611 [escher] Fix bug in text area (afl-fuzz) 2017-09-06 17:40:46 +02:00
Émilie Feral
10c42e276a [escher] Add a gauge view and a message table cell with gauge 2017-09-06 17:34:18 +02:00
EmilieNumworks
16dccc3aa5 Merge pull request #1 from adriweb/master
build: fix warnings
2017-08-30 13:36:33 +02:00
Adrien Bertrand
f34bf67bab build: fix warnings
* escher/src/text_area.cpp:113:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
* liba/src/external/openbsd/k_rem_pio2f.c:66:54: disable -Wmisleading-indentation
2017-08-30 13:01:22 +02:00
Émilie Feral
f4ecacdfdc [escher] Fix bug in makefile (inliner) 2017-08-30 09:38:55 +02:00
Émilie Feral
dd8caaa82e [escher] In textfield: change the behaviour of clear event
Change-Id: I6292faf383e40e7a9b00407bb5c052f92e49a1f6
2017-08-28 11:51:17 +02:00
Émilie Feral
54336b02b5 [escher] Fix bug in textfield: layout when delete the first char after a
right scroll

Change-Id: I272236f44d19266851d2ea8adef733d3459ac7d1
2017-08-28 11:51:17 +02:00
Émilie Feral
71c11bd22c [escher] In text area, change the behaviour of clear event
Change-Id: I4bc49d54f84a2db7155c63d962a2c28fe3c614a5
2017-08-28 11:51:11 +02:00
Émilie Feral
fdf1d23248 [escher] Fix bug: alternate empty view controller do not handle onOff
event

Change-Id: I9a597eef6f24e954830c79950ed11fe3536b6866
2017-08-25 13:36:30 +02:00
Émilie Feral
c6598fb24d [escher] Fix bug with modal view: linked to commit:
In modal view controller, draw the regular view only if the modal view does not cover all of it

Change-Id: Ieab97e56a8da611a029fb6b42efcd2020c1b4b30
2017-08-25 11:20:49 +02:00
Émilie Feral
c189876673 Correct typo: initiate -> initialize
Change-Id: I2282bf4df87094679135176555ac18d9678de0b4
2017-08-25 11:20:49 +02:00
Émilie Feral
b15d65eb7a [escher] Implement clear in text area
Change-Id: Id3c636a1dfc95c8989c6226db962e3e7d180d271
2017-08-25 11:20:48 +02:00
Émilie Feral
8715c53d7e [escher] Correct buffer limits check in text area
Change-Id: Id7653bc36cac300f3205c04cfa5f6c0d17b6f84d
2017-08-25 11:20:48 +02:00
Émilie Feral
a82726fdbe [escher] Avoid warning in text area
Change-Id: Ia8889670f2f489e1c881e39da60e91d98ade7748
2017-08-25 11:20:40 +02:00
Émilie Feral
8f65fb6535 [escher] In text area, correct move cursor
Change-Id: I4705129f3739c0548381a555f03e6ca08704bec7
2017-08-24 14:05:24 +02:00
Émilie Feral
779db66a15 [escher] In text area, optimize the dirty tracking
Change-Id: Icfee9e22ea4f3423064eca764491da10e1b603b6
2017-08-24 14:05:24 +02:00
Émilie Feral
5f14bba390 [escher] In text area, add bounds check to moveCursorIndex
Change-Id: I1768cad3706e1530ee74803242296301ba53ae1e
2017-08-18 13:34:35 +02:00
Émilie Feral
0449f535da [escher] In text area, EXE insert a \n
Change-Id: Ib170c6eea16ff961f6a9daee4dd94b96b6fef333
2017-08-18 13:34:35 +02:00
Émilie Feral
212384986f [escher] Fix insert text in text area
Change-Id: Ia488811bfbc7399fb3a5fa8390bd693e35639008
2017-08-18 13:34:34 +02:00
Émilie Feral
46990e1c25 [escher] Make textField used scroll view methods instead of duplicating
them

Change-Id: I10ca0b02f8a87797ce678041cba54c116961ce5c
2017-08-18 13:34:34 +02:00
Émilie Feral
ee51729eba [escher] Move from table view to scroll view the method a update the
scroll to the size of the content view

Change-Id: I2c4aa457425bf5a8a484aecc061ae27453e9aabb
2017-08-18 13:34:29 +02:00
Émilie Feral
06b47f363e [escher] In text area, fix bug regarding the size of the area
Change-Id: I2f04eedfd98373702e48e0abda421afe2c0540fa
2017-08-17 16:21:22 +02:00
Émilie Feral
e0a1653ff7 [escher] Fix bug in table view
Change-Id: I2082f827b0480ad7e40e8439c5f0c65449010f1f
2017-08-17 16:21:22 +02:00