Commit Graph

1326 Commits

Author SHA1 Message Date
É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
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
60048cb9a9 [poincare] Create a ContextWithParent that implements expressionTypeForIdentifier 2020-02-12 15:13:22 +01:00
Léa Saviot
a3a1f86f8d [apps] Add context parameter to fix tests 2020-02-12 15:13:21 +01:00
Léa Saviot
9d6bab092f [poincare/parser] Identifier is not already function -> symbol
We check the context: if an identifier is already a function, we
interpret it as such, otherwise it is a symbol.
This way, in the Equation app, x(x+1) is interpreted as x*(x+1)
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
158a45e94d [apps/shared] AbstractScrollableExactApproximateExpressionsView: let the
child class decides which subview to select
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
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
f6c15198bc [apps/regression] Power regression uses logarithm of series
This matches other apps results and we directly compute the values from
the data instead of doing a gradient descent.
2020-02-12 15:13:21 +01:00
Léa Saviot
97b495a4dc [apps/interactive_curve_view_range] Orthonormal keep max grid unit
When setting the axes then putting on the orthnormalization, 2 * (max of
the two axes units) is put to 1 cm instead of doing 2 units = 1cm. This
roughly keeps the configuration of the window.
2020-02-12 15:13:21 +01:00
Émilie Feral
21f3cd629d [apps/shared] CurveView: fix drawLabelsAndGraduations
Fix following bug: when handling label = "0", not shifted,
the label position should be computed as for the other labels.
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
dd61468056 [apps/calculation] ScrollableInputExactApproximateExpressionsCell:
relayoutSubviews after changing member variables that affect the
subviews frames
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
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
17bc808257 [apps/shared] CurveView: fix drawLabelsAndGraduations when
graduationOnly is on: the graduation are not drawn only when outside of
the drawn rect
2020-02-12 15:13:20 +01:00
Émilie Feral
95137909c6 [apps/shared] CurveView: fixes drawLabelsAndGraduations when the 'fixCoordinate' parameter is true.
This fixes the graduation drawing of the box view in the statistics app
2020-02-12 15:13:20 +01:00
Émilie Feral
29bab70dcd [apps/shared] CurveView: add a parameter "color" to drawLabel 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
98c6f4ba47 [apps/shared] CurveView: factorize code of drawLine and drawSegment 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
Émilie Feral
b47ded4074 [apps/calculation] Add a parameter in Shared::CurveView to choose the
curve thickness
2020-02-12 15:13:20 +01:00
Émilie Feral
bf07b5ab76 [apps/shared] CurveView: fix typo 2020-02-12 15:13:20 +01:00
Émilie Feral
1b83526c57 [apps/shared] Revert "ScrollableExactApproximateExpressionsView: remove useless reload"
This was not useless: without it, when you push several times the
calculation "1.2", going up in the history will display corrupted
cells...
2020-02-12 15:13:20 +01:00
Émilie Feral
80d8e8eead Coding style 2020-02-12 15:13:20 +01:00
Émilie Feral
10c906e5e2 [shared] AbstractScrollableExactApproximateExpressionsView: when the
left subview is selected, reload the scroll to display the left view
2020-02-12 15:13:19 +01:00
Émilie Feral
acd9e63cbd [shared] AbstractScrollableExactApproximateExpressionsView: fix
setDisplayLeft and setDisplayCenter to re-layoutSubviews
2020-02-12 15:13:19 +01:00
Émilie Feral
7e96ccf5a6 [shared] Typo 2020-02-12 15:13:19 +01:00
Émilie Feral
f850226341 [calculation] Fix ScrollableInputExactApproximateExpressionsView margins 2020-02-12 15:13:19 +01:00
Émilie Feral
90033a54c0 [shared] Avoid extra function call 2020-02-12 15:13:18 +01:00
Émilie Feral
ec0c7c0384 [apps/calculation] Create ScrollableInputExactApproximateExpressionsView
inheriting from Shared::ScrollableExactApproximateExpressionsView
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
904995f841 [apps/shared] ScrollableExactApproximateExpressionsView: remove useless
reload
2020-02-12 15:13:18 +01:00
Émilie Feral
29c50702ae [apps/shared] ScrollableExactApproximateExpressionsView: add a burger
view
2020-02-12 15:13:18 +01:00
Émilie Feral
f7942207f5 [apps/shared][apps/calculation] Create a methods
Shared::CurveView::drawAxisLabel and use it in ComplexGraphView
2020-02-12 15:13:18 +01:00
Émilie Feral
9c3dd84c42 [apps/shared] CurveView: factorize code of drawLabels and drawLabel 2020-02-12 15:13:18 +01:00
Émilie Feral
0beceede5f [apps/shared][apps/calculation] Create CurveView::drawLabel and use it
in complex_graph_view
2020-02-12 15:13:18 +01:00
Léa Saviot
cef4466ca8 [apps/expression_model] Smaller member variable size 2020-02-12 15:13:18 +01:00
Léa Saviot
f402f514a7 [apps/expression_model] Fix memoization of circularity
Scenario f(x)=cf(f(0)) in graph
2020-02-12 15:13:18 +01:00
Ruben Dashyan
2fb6824947 [apps/shared/interactive_curve_view_controller] Rewrite comment about addMargin 2020-02-12 15:13:16 +01:00
Léa Saviot
1434158bee [apps/graph] Faster curve navigation after some time
If the user presses the LEft/Right keys for a long time, the cursor will
move faster.
2020-02-12 15:13:15 +01:00
Léa Saviot
9f018eb9d9 [escher/view] setFrame and layoutSubviews can be forced 2020-02-12 15:13:15 +01:00
Léa Saviot
0055a59c75 [apps/banner_view] Fix minimalSizeForOptimalDisplay
Should not use m_frame as it may not be set properly. By default, a
banner view wants to take the whole screen width
This fixes the following scenario :
Draw the polar curve r=12. When navigating from the tab to the graph,
the curve was visibly redrawn because the banner view height was not
computed properly.
2020-02-12 15:13:15 +01:00
Ruben Dashyan
a3053acac4 [apps/shared/expression_model] Add TODOs for later 2020-02-12 15:13:15 +01:00
Ruben Dashyan
c3cf5c1ef4 Rename UCodePointUnknownX to UCodePointUnknown 2020-02-12 15:13:15 +01:00
Ruben Dashyan
3183ca7d7e Replace Poincare::Function unknown earlier (in Context) 2020-02-12 15:13:15 +01:00
Ruben Dashyan
34aa27ea08 [apps/shared/continuous_function] Simplify templatedApproximateAtParameter 2020-02-12 15:13:15 +01:00