Commit Graph

98 Commits

Author SHA1 Message Date
É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
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
É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
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
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
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
Émilie Feral
340bbb5644 [apps/calculation] additional_outputs: fix ellipsis equation in
ComplexGraphView
2020-02-12 15:13:20 +01:00
Émilie Feral
c2364d27cd [apps/calculation] additional_outputs: clean and improve ComplexModel
range
2020-02-12 15:13:20 +01:00
Émilie Feral
e13cba5a90 [apps/calculation] additional_outputs: flat ellipsis to reprensent the
angle in ComplexGraphView
2020-02-12 15:13:20 +01:00
Émilie Feral
88c3f609e8 [apps/calculation] additional_outputs: improve comments of
ComplexGraphView
2020-02-12 15:13:20 +01:00
Émilie Feral
aa6d328bac [apps/calculation] additional_outputs: improve label positioning in
ComplexGraphView
2020-02-12 15:13:20 +01:00
Émilie Feral
427a3d3051 [apps/calculation] additional_outputs: draw the principal angle on
ComplexGraphView
2020-02-12 15:13:20 +01:00
Émilie Feral
7cd6d12730 [apps/calculation] additional_outputs; change position of absolute value
label in ComplexGraphView
2020-02-12 15:13:20 +01:00
Émilie Feral
56485a9733 [apps/calculation] additional_outputs; fix range of ComplexGraphView 2020-02-12 15:13:20 +01:00
Émilie Feral
61d0161e74 [apps/calculation] additional_outputs: add labels to ComplexGraphView 2020-02-12 15:13:20 +01:00
Émilie Feral
c6e54f90c3 [apps/shared] CurveView: fix confusion between after/before relative
position in drawLabel
2020-02-12 15:13:20 +01:00
Émilie Feral
8c69314fea [apps/calculation] additional_outputs: avoid potential useless cast of 0
to 0.0f
2020-02-12 15:13:20 +01:00
Émilie Feral
8175df9abd [apps/calculation] additional_outputs: improve drawRect of
ComplexGraphView
2020-02-12 15:13:20 +01:00
Émilie Feral
083074e5ac [apps/calculation] additional_outputs: ComplexGraphView has labels 2020-02-12 15:13:20 +01:00
Émilie Feral
eb4a36696a [apps/calculation] Trigonometry: set the range to see "cos(θ)" label 2020-02-12 15:13:20 +01:00
Émilie Feral
800adce876 [apps/shared] CurveView: change API; drawLabel can draw a label at a
position and the relative position of the label (above, below, to the
left or right of the graduation) can be chosen. 'positionLabel' is a
private method used by 'drawLabelsAndGraduations' and 'drawLabel' to
determine the position of the label knowing the position of the
graudation and its relative position
2020-02-12 15:13:20 +01:00
Émilie Feral
bbea104262 [apps/calculation] TrigonometryGraphView: avoid multiple calls to
std::cos and std::sin
2020-02-12 15:13:20 +01:00
Émilie Feral
027e46c237 [apps/calculation] additional_outputs: improve drawRect of TrigonometryGraphView 2020-02-12 15:13:20 +01:00
Émilie Feral
aed52236d3 [apps/calculation] additional_outputs: improve drawRect of
TrigonometryGraphView
2020-02-12 15:13:20 +01:00
Émilie Feral
dfd4811136 [apps/shared] CurveView: change API to expose 'drawLabel' and
'drawLabelsAndGraduations'
2020-02-12 15:13:20 +01:00
Émilie Feral
818067e03b [apps/shared] CurveView: add a parameter to drawSegment to draw dashed
segment
2020-02-12 15:13:20 +01:00