Commit Graph

1291 Commits

Author SHA1 Message Date
Hugo Saint-Vignes
8cd3fe679f [escher/src] Add TODO comment 2020-12-02 17:20:32 +01:00
Hugo Saint-Vignes
636e863323 [escher] Moved repetition factor logic up in Escher from poincare
Change-Id: I7c8f932e3e7d04c928ca881113ba6b5df05b94e7
2020-12-02 17:20:32 +01:00
Hugo Saint-Vignes
cfc37f1bac [apps/sequence] Factorize sequence row index offsets
Change-Id: Id6fa632521858c48fe7d3daf35fd846bf24a05eb
2020-11-24 13:26:55 +01:00
Hugo Saint-Vignes
387d3c9aa1 [apps/sequence] Fix row offset when returning to previous menu
Change-Id: Ic3eee6bb1ecb991b97dc9190fab95774938d294e
2020-11-24 13:26:55 +01:00
Gabriel Ozouf
0185e0562c [escher/run_loop] Move kandinksy include
To check whether an ExternalText could be written with Epsilon's fonts,
UTF8Helper made a reference to Kandinsky, which is prohibited. This
check is now done in Escher, before dispatching the event.

Change-Id: I55e9db1ba43c3115775499db47b90a6bdd7cc7b3
2020-11-04 15:58:38 +01:00
Gabriel Ozouf
f66bde6d31 [ion/clipboard] Rework clipboard handling
Change the way the clipboard is fetched, so as to preserve the
Poincare/Python translation feature, and remove the cap on the length of
text being imported into the simulator.

Change-Id: I0f3e83c0c8aa4b64eb08d882aa6891b31f191e22
2020-11-04 15:58:35 +01:00
Gabriel Ozouf
b9c34ace3a [ion/clipboard] Use system clipboard on simulator
Add methods to interface Epsilon's clipboard with the system's when
running a simulator.
Note that the clipboard still uses a buffer located in the
Escher::Clipboard class, as some features require a buffer to execute
computations on the clipboard's content.

Change-Id: I14c19615805d38735e64d481c617863db22db9bc
2020-11-04 15:58:35 +01:00
Hugo Saint-Vignes
2f97dab6d1 [apps/shared] Add toggle buttons in Graph view
Change-Id: I7548d11fb114b2605ce34d3bda0776277b79ff9d
2020-11-04 15:58:25 +01:00
Hugo Saint-Vignes
bd23135198 [apps/shared] Add Discard confirmation pop-up
Change-Id: Ida3878894090ecfa99145618b8e1ff0bbcb4743a
2020-11-04 15:33:04 +01:00
Gabriel Ozouf
2e2845370a [apps/math_toolbox] Add fork nodes in tree
Some nodes of the ToolboxMessageTree can be marked as "forks",
dispatching one branch or the other depending on preferences.
They are used in the Unit menu to provide a different toolbox depending
on the unit system.

Change-Id: I591f7abc3d24e682e827a540a9defac1877871b5
2020-11-04 15:33:02 +01:00
Gabriel Ozouf
6105f44a46 [escher/toolbox_message_tree] Add indirection
The children of a ToolboxMessageTree object can be stored as a simple
pointer, representing an array of all the children stored consecutively,
or as a double pointer, representing an array storing the addresses of
all children.

Change-Id: I10134684963aaafc635aaf9a2374d0f3c32d3d0c
2020-11-04 15:33:02 +01:00
Gabriel Ozouf
54c28fc87f [escher/modal_view_controller] Hide regular view
Do not display the regular view when the main view takes up all the
frame.
This fixes a bug causing the language menu to be briefly visible before
the logo on start-up.

Change-Id: Ia2de44de52ac6f852e0eca05101587042f02913b
2020-11-04 15:33:00 +01:00
Gabriel Ozouf
28d18dd6a5 [ion/utf8_helper] Signedness and capitalization
Change-Id: I3451a206fbd45a490eea0115621c07abb868344a
2020-11-04 15:33:00 +01:00
Arthur Camouseigt
ea36c6e5d7 [Clipboard] Changed the general copy/paste
Fixed issues due to copy/paste of empty formulas. When pasted, empty
formulas are now recognized by the parser and apear with the
correct layout

Without this process, copying an empty integral then pasting it gives :
int((), x, (), ()) instead of drawing an empty integral

Change-Id: I680aaf4eea953149e2d57efa8153ab4d3f93e2a7
2020-11-04 15:32:59 +01:00
Arthur Camouseigt
8f97a332f6 [Python] Modified the paste effect in script and shell area
When a formula is pasted in a script or in the shell, some symbols are
replaced by their equivalent in python :
x turns into *
^ turns into **
√ turns into sqrt
etc
Change-Id: If6f2a22d4f3c148c2655e0892023b0e28058a9a6
2020-11-04 15:32:59 +01:00
Hugo Saint-Vignes
b92c819ea2 [escher/src/text_area] Add char limit in text_area line
Change-Id: I9284936f0202d788edc785aa3f7c82b45ab34cf5
2020-11-04 15:32:59 +01:00
Arthur Camouseigt
3dca515441 [VariableBox] Added sequences to the variable box
It is now possible to call the value of a defined sequence anywhere.

Change-Id: I1990e93c50f9add175b7ea274e07004ba63289e5
2020-11-04 15:32:58 +01:00
Hugo Saint-Vignes
aba135bc8b [escher] Add textArea line number limit
Change-Id: Ia0d9a9136282efc87c0996c141c0852ed75892f9
2020-11-04 15:11:45 +01:00
Gabriel Ozouf
a96b5d1bc4 [escher] Typo in StackViewController
Change-Id: I13bdd05759fd2f0bc6911adafe8950e46c2bfe85
2020-11-04 15:11:44 +01:00
Gabriel Ozouf
d156c8c99e [apps/i18n] Added country support
Added a list of supported countries to I18n, and created messages for
each country's names in each language.

Change-Id: I1b887d75da980d99e21f89cc151249e42c78de88
2020-11-04 15:11:44 +01:00
Gabriel Ozouf
c04a7af22f [escher/layout_field] Change cursor behavior
Some code to prevent the input field from scrolling when switching to
the history in layout mode causes problems :
  - With a calculation in the history, type an empty matrix or fraction.
    Then with the cursor on an empty square, go to the history. The
    square will appear shifted to the right.

Change-Id: I72ebee675215dc3c3a3f8432890f6fee820ef5c9
2020-11-04 15:07:20 +01:00
Hugo Saint-Vignes
e27c668c40 [apps,escher,kandinsky,poincare,python] Replace every "grey" with "gray"
Change-Id: I60a232849dce90f70e6977b6024d6e9b1ce1b731
2020-11-04 15:07:20 +01:00
Gabriel Ozouf
de681705e6 [escher/expression_field] Renamed dumpLayout
Changed dumpLayout's name to moveCursorAndDumpContent, as the name
suggested the method was only usable on layouts (while it also works on
text). The method is also no longer marked const, and the previous name
could imply that it had no side effects.
Likewise, renamed restoreLayout to restoreContent.

Change-Id: I46b320e74c07b48e256dc2146f9ecc15af38a8e6
2020-11-04 15:07:19 +01:00
Gabriel Ozouf
67af3a5b4e [apps/calculation] Fixed grey and yellow squares
When closing and reopening Calculation, if the cursor was on an
EmptyLayout, this layout would be invisible, instead of being denoted by
its usual yellow square.
This also fixes a bug that would leave the grey squares in matrices when
leaving and reopening the app, causing a failed assertion on the simulator.

Change-Id: Ib723797c079f1441f5cde174aa5c492ad4226335
2020-11-04 15:07:19 +01:00
Gabriel Ozouf
e49dc08759 [escher/expression_field] Fixed dumpLayout
Closing the Calculation app because of a full pool would crash the
device, by attempting to dump a layout with no node.

Change-Id: Ic926da61ae93f47eb576848788e1de5e3f94f5bb
2020-11-04 15:07:19 +01:00
Gabriel Ozouf
8ab23f66b5 [escher/expression_field] Methods on layout
Added some methods to manipulate the layout of a LayoutField from an
ExpressionField, like storing into and restoring from a buffer.

Change-Id: I7b7b5b53626f19237a5215bd196e897a518e9577
2020-11-04 14:45:35 +01:00
Gabriel Ozouf
e03bb7432e [escher] Tweaked LayoutField event handling
LayoutField does no redraw its content on every occasion anymore. This
allows the input window in Calculation to not scroll to the beginning
when writing an overly long formula.

Change-Id: I14276828884035463b0a6438bfca4dd76c7f5057
2020-11-04 14:45:34 +01:00
Hugo Saint-Vignes
af32f33141 [ion] Remove unused function and rename longRepetitionScrollSpeed
Change-Id: I11268eb34060c74eb8770ba0eb999f84737c76d8
2020-11-04 14:45:34 +01:00
Hugo Saint-Vignes
70cd166da5 [escher] Scroll speed increase for long repetition in layout fields
Change-Id: I9460cb44631f0b225598804334da5a0e74029915
2020-11-04 14:45:34 +01:00
Hugo Saint-Vignes
70830e0b74 [escher] Scroll speed increase for long repetition in selectable table
Change-Id: Idfc3edcedff5a933b6f2168b475e22ea56ea0ab0
2020-11-04 14:45:34 +01:00
Hugo Saint-Vignes
e35f2cc938 [escher] Scroll speed increase for long repetition in text area
Change-Id: Ia468bd3ae3f247937127228a11e3d51653dd2ae2
2020-11-04 14:45:34 +01:00
Hugo Saint-Vignes
c9964e69c2 [escher] Scroll speed increase for long repetition in scrollable views.
Change-Id: Ie7671ced53da1a144068756f6b584dbb287f9e0e
2020-11-04 14:45:34 +01:00
Émilie Feral
ad1ef783ce [ion][escher] Revert previous commit: move inliner back to escher 2020-09-30 17:30:34 +02:00
Émilie Feral
f7479e0cf5 [ion][escher] Move image inliner to ion 2020-09-30 17:30:34 +02:00
Léa Saviot
759fa6a60a [escher] Fix constexpr due to linux warning 2020-07-02 17:09:38 +02:00
Émilie Feral
736833da34 [escher] Typo 2020-06-26 17:48:31 +02:00
Émilie Feral
1da2f23914 [escher] SelectableTableView: fix delegate notification when
deselecting table view

This fixes the following bug: input 1.2/2, OK, up, down, the exact ouput
is still displayed but should have toggled
2020-06-26 17:48:31 +02:00
Émilie Feral
bac2949a5e [escher][apps] SelectableTableViewDelegate: add
tableViewDidChangeSelectionAndDidScroll method and implement it for
Calculation::HistoryController

This fixes the following bug: In the calculation application, input 1,
OK, 1/2/3/4/5/6/7/8, OK, up, up, left, down, up. The selection failed.
2020-06-25 13:48:47 +02:00
Arthur
59bf8bbcf4 [matplotlib] Added cyan color to the color palette
Change-Id: I29476d8148ad98285505adc460b90628573518fa
2020-06-04 14:50:09 +02:00
Émilie Feral
5725ba1c14 [escher] LayoutField: reset selection when clearing layout 2020-06-04 14:50:08 +02:00
Émilie Feral
9a3e2c960f [escher] LayoutField: update the grey squares when using insertion
cursor
2020-06-04 14:50:08 +02:00
Émilie Feral
79e7626dc3 [escher] LayoutField: the insertion cursor can't point to an EmptyLayout
as it might be destroyed

This fixes the following crash: input 1, OK, input ans/[], go up to the history --> crash
2020-06-04 14:50:08 +02:00
Émilie Feral
465fa5c63f [escher] TextField: fix insertTextAtLocation (confusion between size and
length)

This fixes the following bug: in a textfield, input '000', clear, input
'00', backspace --> crash
2020-06-04 14:50:08 +02:00
Léa Saviot
b096d6f5e4 [escher/table_view] COding style 2020-06-04 14:50:08 +02:00
Léa Saviot
44af4b1fde [escher/table_view] Fix numberOfDisplayableRows/Columns
Did not take into account the margin so was too big sometimes
2020-06-04 14:50:08 +02:00
Léa Saviot
515aa543d3 [escher/table_view] Remove dead code 2020-06-04 14:50:08 +02:00
Léa Saviot
12a45ef8e6 [escher/poincare] Coding style 2020-06-04 14:50:08 +02:00
Léa Saviot
9d5e58f32b [escher/scroll_view] Do not compute offset if view invisible 2020-06-04 14:50:08 +02:00
Léa Saviot
3e4478454c [escher] Avoid useless redrawing in ExpressionView::setLayout 2020-06-04 14:50:08 +02:00
Léa Saviot
5f26ca40cc [apps/escher] Fix scroll view indicator margin
So it does not overflow the scrolled view. Fixed for the language
controllers (on boarding app and settings), one value was changed from a
magic 14 to Metric::CommonTopMargin = 15, it did not seem to break
anything.
2020-06-04 14:50:07 +02:00