Commit Graph

132 Commits

Author SHA1 Message Date
É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
Émilie Feral
e24de79a9e [apps/calculation] HistoryController: avoid dereferencing nullptr 2020-06-04 14:50:10 +02:00
Émilie Feral
e4848a7535 [apps/calculation] HistoryController: favour understandable code 2020-06-04 14:50:01 +02:00
Ruben Dashyan
266482ef99 [apps/calculation] Additional outputs for Unit 2020-06-04 14:50:01 +02:00
Ruben Dashyan
a31524173f [apps/calculation/history_controller] Factor handleEvent 2020-06-04 14:50:01 +02:00
Ruben Dashyan
a3265996fe [apps/calculation/history_controller] Factor handleEvent 2020-06-04 14:50:01 +02:00
Ruben Dashyan
f3bcedd43d [apps/calculation/history_controller] Simplify and harmonize handleEvent 2020-06-04 14:50:01 +02:00
Ruben Dashyan
167827f0e4 [apps/calculation] EditExpressionController accesses subview directly 2020-06-04 14:50:01 +02:00
Ruben Dashyan
63ab8710b9 [apps/calculation] Factor EditExpressionController::insertTextBody 2020-06-04 14:50:01 +02:00
Léa Saviot
b034f8e054 [apps/calculation] Fix history navigation
When calculations span on two lines, better selection
2020-05-28 04:44:27 -07:00
Léa Saviot
a56a73b0ba [apps/calculation] Fix calculation height computation
It was done in two places before, which created inconsistencies
2020-05-28 04:44:27 -07:00
Léa Saviot
0379327b06 [apps/calculation] Geographic navigation in the history 2020-05-28 04:44:27 -07:00
Léa Saviot
579485c8c0 [apps/calculation] CanBeSingleLine differs if args are view/layout sizes
If the sizes are for layouts, we need to add the margins added by the
views.
2020-05-28 04:44:27 -07:00
Léa Saviot
11c39b6206 [apps/calculation] Calculation::height has two types of margin arguments
One for the margin between layouts and on top / at the bottom of the
cell, the other for the margin surrounding each layout.
2020-05-28 04:44:27 -07:00
Léa Saviot
78cac6ddae [apps/calculation] Calculation::height has CanBeSingleLine argument 2020-05-28 04:44:27 -07:00
Léa Saviot
525290427a [apps/calculation] Calculation::height takes verticalMargin argument 2020-05-28 04:44:27 -07:00
0b101
b48d3d6e4a Added a new compact result display mode 2020-05-28 04:44:27 -07:00
Émilie Feral
24d9f37205 [apps/calculation] Clean how cell subtype is selected/
This fixes crashes: indeed, in the way it was done before, we called
scrollToSubviewOfTypeOfCellAtLocation after setting the new selected subtype
and before reloading the data. However, selecting a new subtype might expand
the selected cell which can temper with the cell repartition. If so, we need to
reload the data to be able to call 'selectedCell' for instance.
2020-02-20 10:56:11 +01:00
Émilie Feral
2a03583fe0 [apps/calculation] Reset history cell memoization when reloading the
table. Otherwise, the Poincare pool store useless layouts for cells that
aren't displayed.

This fixes the following issue: input "(transpose([1 2 3 4 5 6][1 2 3 4 5
6])^8", the computation works, clear the history, input the same
calculation again, it fails with a memory error.
2020-02-19 10:34:28 +01:00
Romain Goyet
7f43b73049 [apps] Don't forget to call viewWillAppear
At the moment ViewController::viewWillAppear doesn't do anything, so
there is no real impact. But if we want to use it it needs to be called
from subclasses.
2020-02-17 10:31:24 -05:00
Émilie Feral
c2540a1d8a [apps/calculation] Calculations now hold 4 texts: input, exact output
and 2 approximate outputs - one with the maximal number of significant
digits and one with the number of significant digits asked by the user.
This enables to find the approximate output without going through the
approximation routine again.
2020-02-12 15:13:23 +01:00
Émilie Feral
a82ff2b703 [apps/calculation] HistoryController: in historyViewCellDidChangeSelection,
limit the whole table reloading to cases where the cell height did
actually change to avoid useless blinking
2020-02-12 15:13:22 +01:00
Émilie Feral
767d1654cc [apps/calculation] HistoryViewCell: select the right expression of
output when coming from ellipsis subview
2020-02-12 15:13:22 +01:00
Émilie Feral
39dbb7d68c [apps/calculation] Fix relayouting when highlighted cell changed
This fixes the following scenario: add "1.2" 5 times, go up three times,
and down three times, the last cell was not correctly relayout.
2020-02-12 15:13:22 +01:00
Émilie Feral
bbe39aac14 [apps/calculation] HistoryController: display additional results pop-up
when handling OK/exe on the ellipsis view
2020-02-12 15:13:22 +01:00
Émilie Feral
251db5b60e [apps/shared][apps/calculation] Change class names:
ScrollableInputExactApproximateExpressionsCell -->
ScrollableThreeExpressionsCell
AbstractScrollableExactApproximateExpressionsView -->
AbstractScrollableMultipleExpressionsView
ScrollableExactApproximateExpressionsView -->
ScrollableTwoExpressionsView
ScrollableInputExactApproximateExpressionsView -->
ScrollableTwoExpressionsCell
2020-02-12 15:13:22 +01:00
Léa Saviot
88ab0e686c [apps] Less operations in willExitResponderChain if exiting app
If nextFirstResponder is nullptr, it means we are exiting the app, so
there is no need to relayout, reselect, ...
We did it bbefore because a long time ago, we used to keep all apps side
by side so they had to be thouroughly cleaned when exiting
2020-02-12 15:13:22 +01:00
Émilie Feral
ba159de21d [apps/calculation] Trigonometry additional results are displayed if the
input OR the output is a cosine/sine
2020-02-12 15:13:21 +01:00
Émilie Feral
398b529811 [apps/calculation][poincare] AdditionalInformationType is determined
from both input and output expressions of a Calculation
2020-02-12 15:13:21 +01:00
Émilie Feral
fef0538941 [apps/calculation] Handle OK events on additional outputs pop-up - WIP 2020-02-12 15:13:20 +01:00
Émilie Feral
1f4b823509 [apps/calculation] HistoryController: pointer to Calculation are expring
pointer, they've to be recomputed everytime we reload the table (because
of a scroll or when deselecting the table)
2020-02-12 15:13:20 +01:00
Émilie Feral
414f1eb25c [apps/calculation] HistoryController: ensure to display burger views
when scrolling up and down
2020-02-12 15:13:20 +01:00
Émilie Feral
73a8ec24f2 [calculation] Revert "HistoryViewCell: remove useless m_expandedCalculation"
When scrolling up and down, only 'setCalculation' is called by
'willDisplayCellForIndex' - and not 'cellDidSelectSubview'. So a new cell
should be informed of the expanded state in 'setCalculation'.
2020-02-12 15:13:20 +01:00
Émilie Feral
c12304a00e [calculation] Remove outdated comment 2020-02-12 15:13:20 +01:00
Émilie Feral
df47a355a2 [calculation] HistoryController: display RationalListController when
clicking on a burger of a Rational input
2020-02-12 15:13:19 +01:00
Émilie Feral
f94727b62d [calculation] HistoryController: factorize code 2020-02-12 15:13:19 +01:00
Émilie Feral
714e5f12d9 [calculation] WIP: display IntegerListController when clicking on a
burger view of an integer input
2020-02-12 15:13:19 +01:00
Émilie Feral
49d52f293e [calculation] First version of the TrigonometryListController 2020-02-12 15:13:19 +01:00
Émilie Feral
715a1a2d5e [calculation] AdditionalInformation are base on the Calculation input
instead of exact output
2020-02-12 15:13:19 +01:00
Émilie Feral
d178adc936 [apps/calculation] Improve expressions that are displayed in Complex
pop-up
2020-02-12 15:13:19 +01:00
Émilie Feral
eac83fce0b [calculation] Improve margins of additional results pop-up 2020-02-12 15:13:18 +01:00
Émilie Feral
2ebbe5ae25 [calculation] WIP: first version of ComplexListController 2020-02-12 15:13:18 +01:00
Émilie Feral
47e4abee81 [apps/calculation] Reload display output when HistoryController appears
(to avoid displaying 2 = 2 when leaving and reentering Calculation app)
2020-02-12 15:13:18 +01:00
Émilie Feral
6ed9e11de3 [apps/shared] ScrollableExactApproximateExpressionsView: split
ScrollableExactApproximateExpressionsView into
AbstractScrollableExactApproximateExpressionsView and
ScrollableExactApproximateExpressionsView to factorize code with future
ScrollableInputExactApproximateExpressionsView
2020-02-12 15:13:18 +01:00
Émilie Feral
a21689d72c [apps/calculation][poincare] Move additionalInformationType method from
Calculation to Poincare module
2020-02-12 15:13:18 +01:00
Émilie Feral
e932e8f895 [apps/calculation] Fix HistoryController: update the OutputView when
reloading the table data
2020-02-12 15:13:18 +01:00
Émilie Feral
400819d87d [apps/calculation] HistoryViewCell: remove useless m_expandedCalculation 2020-02-12 15:13:18 +01:00
Émilie Feral
6c9832c9e1 [apps/calculation] Avoid blinking in Calculation 2020-02-12 15:13:18 +01:00
Émilie Feral
f0ec2136b7 [apps/calculation] WIP: display the complex graph when clicking on the
burger menu
2020-02-12 15:13:18 +01:00
Ruben Dashyan
5787d50a45 Revert "[apps/calculation/edit_expression_controller] Define viewWillAppear"
This reverts commit 960736203ff2f816688868e3397d178d931fa3c3.
2020-02-12 15:13:16 +01:00