Commit Graph

610 Commits

Author SHA1 Message Date
Émilie Feral
bbb9e83703 [apps/calculation] Fix and add tests 2020-02-12 15:13:23 +01:00
Émilie Feral
551e4998f4 [apps/calculation][apps/solver][poincare] Simplify sign =/≈ computation
between outputs in Calculation/Solver
2020-02-12 15:13:23 +01: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
Ruben Dashyan
c4f112e5aa [apps/calculation/calculation] Do not approximate approximateOutput 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
71de56f87a [apps/calculation] HistoryViewCell: fix setHighlighted to reload
subviews highlight
2020-02-12 15:13:22 +01:00
Émilie Feral
b39b8da036 [apps/calculation] HistoryViewCell: prevent from selecting ellipsis
suview if it not visible
2020-02-12 15:13:22 +01:00
Émilie Feral
a39ca58470 [apps/calculation] HistoryViewCell: fix first responder. The first
responder is the HistoryViewCell when the ellipsis subview is selected
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
7d0a1cd0b2 [apps/calculation] HistoryViewCell: enable selecting the ellipsis 2020-02-12 15:13:22 +01:00
Émilie Feral
9a97fc01b2 [apps/calculation] HistoryViewCell: m_expandedCalculation memoizes true
only when the calculation is actually expanded (when the output is
selected and the display output is ExactApproximateToggle)

This avoid blinking when changing input/output selection
2020-02-12 15:13:22 +01:00
Émilie Feral
f276a88e79 [apps/calculation] HistoryViewCell: display ellipsis view when
highlighted
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
Émilie Feral
87e4836196 [apps/calculation][apps/shared]
AbstractScrollableExactApproximateExpressionsView children classes
reload scroll after reloading the subview selection when entering the
responder chain and when cell becomes first responder. We don't reload
scroll when setting content of cells as this is done every time we
relayout - when scrolling in the table for instance.
2020-02-12 15:13:22 +01:00
Émilie Feral
56319ef275 [apps/shared] AbstractScrollableExactApproximateExpressionsView can hold up to
three expressions but no more BurgerMenuView.
ScrollableExactApproximateExpressionsView and
ScrollableInputExactApproximateExpressionsView inherit from it.
2020-02-12 15:13:22 +01:00
Émilie Feral
3de0ee7f98 [apps/calculation] ExpressionWithEqualSignView inherits from
ExpressionView instead of composing

This is useful for future change on
ScrollableExactApproximateExpressionView
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
c629cb66ba [apps/calculation] Calculation: don't memoize the display in height
computation. It has to be updated everytime an exception is raised and
this was forgotten.
2020-02-12 15:13:22 +01:00
Émilie Feral
8deb81b8c2 [apps/calculation] CalculationStore: Equal and Store node are always at
the root, no need to recursively check their presence
2020-02-12 15:13:22 +01:00
Émilie Feral
0c19b54365 [apps/calculation] Do not display additional results for Equal or Store
expressions
2020-02-12 15:13:22 +01:00
Émilie Feral
2a37fa4447 [apps/calculation] ComplexListController: change the way the
Complex model parameters are computed.

Sometimes, approximation without simplification doesn't not give the
same results as approximation after simplification. As we decided to
display the additional results from an approximation without
simplifcation (done in Expression::hasDefinedComplexApproximation), we
compute the model parameters the same way (to ensure that both
parameters are defined)
2020-02-12 15:13:21 +01:00
Émilie Feral
8d7eebbf0e [apps/calculation] Calculation: fix variable confusion 2020-02-12 15:13:21 +01:00
Léa Saviot
756eeeb2d8 [poincare/parser] Add context 2020-02-12 15:13:21 +01:00
Émilie Feral
d61336936e [apps/shared] Create a class Dots to share dots masks between CurveView
and RoundCursorView. Use the same dot for illustrations of additional
results in Calculation app and Function app
2020-02-12 15:13:21 +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
3fa4e0838a [escher] Create a class Bordered instead of BorderedCell: this enable
non-cell view to use it as well
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
be6f11208f [apps/calculation] additional_outputs: make a parent class to
TrigonometryGraphCell and ComplexGraphCell inheriting from
BorderedCell
2020-02-12 15:13:21 +01:00
Émilie Feral
404c0945f9 [apps/calculation] additional_outputs: ComplexGraphView: simplify
computation of ellipsis equation (avoid computational errors for real =
-6 and imaginary = 1E-8 for instance)
2020-02-12 15:13:21 +01:00
Émilie Feral
06fa3bba5b [apps/shared][apps/calculation] CurveView: enable to personalize the
maximal glyph length of graduation labels. Shorten them in
ComplexGraphView
2020-02-12 15:13:21 +01:00
Léa Saviot
97c5ef79af [apps/calc] Display ApproximateOnly if approximate layout cannot be created 2020-02-12 15:13:21 +01:00
Léa Saviot
1af28d4310 [apps/calc] Display ApproximateOnly if exact layout cannot be created 2020-02-12 15:13:21 +01:00
Émilie Feral
8e407bd01e [apps/calculation] additional_outputs: fix assertion which checks that
both real and imaginary are well defined in ComplexGraphView
2020-02-12 15:13:21 +01:00
Émilie Feral
71a968ec05 [apps/calculation] Clean Unicode character treated as a whitespace 2020-02-12 15:13:21 +01:00
Émilie Feral
2b18f585d0 [poincare] additionalInformationType returns "Complex" only when both
real and imaginary parts are defined (not NAN or INFINITY)
2020-02-12 15:13:21 +01:00
Émilie Feral
a4d630ace0 [apps/calculation] additional_outputs: IllustratedListController:
textAtIndex depends on the selected subview
2020-02-12 15:13:21 +01:00
Émilie Feral
9d540ca16c [apps/calculation] additional_outputs: In RationalListController,
special case for textAtIndex of the Euclidean division: copy only the
right part of the equality
2020-02-12 15:13:21 +01:00
Émilie Feral
685f030f83 [apps/calculation] Fix ScrollableInputExactApproximateExpressionCell and
ScrollableExactAppromiateExpressionsCell layout (layout of cells can be
asked at any moment - when handling copy/cut events)
2020-02-12 15:13:21 +01:00
Émilie Feral
a4e8d24a23 [apps/calculation] Improve text inserted in EditExpressionController
when handling OK events on additional outputs pop-ups
2020-02-12 15:13:20 +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
c441611190 [apps/calculation] Do no display the factor expression if it is
undefined in Integer additional outputs
2020-02-12 15:13:20 +01:00
Émilie Feral
90957d137a [apps/calculation] HistoryViewCell: avoid blinking 2020-02-12 15:13:20 +01:00
Émilie Feral
272d405eb7 [apps/calculation] additional_outputs: Always force selection on the
left subviews of cells when IllustratedListController pop-up is displayed
2020-02-12 15:13:20 +01:00
Émilie Feral
dd61468056 [apps/calculation] ScrollableInputExactApproximateExpressionsCell:
relayoutSubviews after changing member variables that affect the
subviews frames
2020-02-12 15:13:20 +01:00
Émilie Feral
a655d60d0f [apps/calculation] additional_outputs: fix rowHeight of
illustrated_list_controller (calculation are all expanded)
2020-02-12 15:13:20 +01:00
Émilie Feral
2c55e0d6d9 [apps/calculation] additional_outputs: factorize flat ellipsis handling 2020-02-12 15:13:20 +01:00
Émilie Feral
2dbd840c00 [apps/calculation] additional_outputs: fix flat ellipsis for pure
imaginary in ComplexGraphView
2020-02-12 15:13:20 +01:00
Émilie Feral
e382d8f15e [apps/calculation] additional_outputs: improve labels layout in
ComplexGraphView
2020-02-12 15:13:20 +01:00