Commit Graph

55 Commits

Author SHA1 Message Date
Émilie Feral
457fa6a925 [apps/calculation] When EditExpressionController becomes the first
responder, scroll to the bottom of the table (and not the last cell).
Indeed, the last cell might be to big to be displayed and scroll to it
might scroll to its top.

This fixes the following bug: input 1/2/3/4/5/6/7/8, OK, up, down. We
did not scroll to the bottom of the table.
2020-06-26 17:48:31 +02: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
Ruben Dashyan
7fce83d1dd [escher/expression_field] Detect whether view's height did change by memoizing the height
Such changes used to be detected only when the height was equal to the
maximal allowed value, by detecting whether the height shifted from or
to that maximal value. For that purpose, a boolean was memoized in
InputViewController and in Calculation::EditExpressionController.
2020-02-12 15:13:16 +01:00
Ruben Dashyan
b624e47ccb [apps/calculation/edit_expression_controller] Remove dummy viewDidDisappear
HistoryController does not override ViewController's default
viewDidDisappear.
2020-02-12 15:13:15 +01:00
Ruben Dashyan
7a49e23e3b [apps/calculation] Factor HistoryController::reload 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
Ruben Dashyan
310e1ab829 [apps/calculation/edit_expression_controller] Make ContentView View-specific methods private 2020-02-12 15:13:15 +01:00
Ruben Dashyan
227c9a8d68 [apps/calculation/edit_expression_controller] Inline view() in header 2020-02-12 15:13:15 +01:00
Émilie Feral
12060e2ae7 [escher] TextField: all text fields use the same draft text buffer 2019-08-13 09:44:00 +02:00
Ruben Dashyan
055d601854 [apps] Define TextFieldDelegate::textFieldDelegateApp() directly from ::app() 2019-07-19 15:06:25 +02:00
Ruben Dashyan
5058f64163 [apps] Define LayoutFieldDelegate::expressionFieldDelegateApp() directly from ::app() 2019-07-19 15:06:25 +02:00
Léa Saviot
33676e915a [apps] Check that serialized expression is not too long in Graph 2018-11-23 12:04:09 +01:00
Émilie Feral
7e7c77a0e8 [escher] TextField and LayoutField handle move events while in editing
mode to avoid leaving unexpectedly edition mode
2018-11-23 12:04:03 +01:00
Émilie Feral
698332c355 [escher] InputTextDelegate and LayoutFieldDelegate don't inherit from
InputTextDelegate to avoid diamond inheritance
2018-11-23 12:04:03 +01:00
Émilie Feral
365b145cf3 [poincare] Change names: LayoutReference-->Layout 2018-09-18 16:29:44 +02:00
Émilie Feral
616e4c0bcc [poincare] Change name: LayoutRef --> LayoutReference 2018-09-14 16:57:12 +02:00
Émilie Feral
0fbab2f35c [apps] Get rid of DynamicViewController 2018-09-07 17:55:42 +02:00
Léa Saviot
a0c427076f [apps/claculation] Remove duplicate layout reference 2018-07-05 11:08:36 +02:00
Léa Saviot
880c3e59de [poincare] Continue removing layouts 2018-07-03 18:29:08 +02:00
Émilie Feral
5dcfbf83e9 [escher] ExpressionLayoutFieldDelegate should not take a text as
parameter but a layout
Warning: in ExpressionField: the serialized layout is not guaranteed to
be small enough to fill in the text buffer
2018-05-17 13:53:10 +02:00
Émilie Feral
0c93a50018 [calculation] Increase the cache buffer to accept serialized layout
which would fit in calculation
2018-05-16 18:45:44 +02:00
Léa Saviot
ce81481922 [apps/calculation] Do not reload if the ELView is already maximal
Change-Id: Id21cc71de7d5d83a30c6b7beea3c71108bed7197
2018-04-25 18:08:35 +02:00
Léa Saviot
6dd2057593 [apps/calculation] Re-arrange private attributes.
Change-Id: I024e17fac84d8e3025745267ad488db83eeeb928
2018-04-25 13:58:42 +02:00
Léa Saviot
6d7464707d [apps/calculation] Fix member initialization order.
Change-Id: I16788edf23b9c2d70a781db5ad90ebfd67b926e7
2018-04-23 11:34:01 +02:00
Léa Saviot
5c2322a5a4 [apps/calculation] Rule of 5 in EditExpressionController::ContentView
Change-Id: I92ee8ee934c66674bb983780a5d8084a1562accf
2018-04-23 11:34:00 +02:00
Léa Saviot
117a6d460a [poincare] Stop exposing text/expressionlayout fields in ExpressionField
Change-Id: Ic1afb3f7c1f6bff5ea3bedc6f96bef986b74f6a8
2018-04-23 11:33:53 +02:00
Léa Saviot
22ab94209f [apps/escher] Rename EditableExpressionView -> ExpressionField
Change-Id: Iadfb220ee94e68762305060215f1ead0cac951fb
2018-04-23 09:41:20 +02:00
Léa Saviot
31face58a2 [apps/escher] ScrollableEVWithCursor renamed ExpressionLayoutField
Change-Id: Id0e4610fb677d8ad36721eef1a85f1c424d1743e
2018-04-23 09:41:20 +02:00
Léa Saviot
c4b5d4cf40 Merge branch 'SaisieJolieRebase1201' into SaisieJolieMerge10Apr
Change-Id: I802dbb9f7c0eebf75a1b6cd21ddd194e89b53752
2018-04-10 17:21:54 +02:00
Émilie Feral
470767340a [apps] Calculation: OK on an empty textfield re-do the last user input
kept in cache
2018-02-01 11:49:39 +01:00
Léa Saviot
a2c0eaa20b [apps/escher] Remove textFieldDidAbortEditing const char * argument.
Also removed the same argument in scrollableExpressionViewWithCursorDidAbortEditing.

Change-Id: Iadc6b708cfc0fab44b9fd4edb980cb759d41e8d0
2018-01-23 10:28:02 +01:00
Léa Saviot
4d778b5d9f [apps/escher/poincare] Use 2D Edition in Sequence and Graph apps.
EditableExpressionView is renamed ScrollableViewWithCursor.
EditableExpressionView is now a View that displays either a TextField or
a ScrollableViewWithCursor, depending on Poincare::Preferences.

Change-Id: Id44ddcd9a83f5fd17d65753ca4c94c5c7cda9b8a
2018-01-23 10:28:02 +01:00
Léa Saviot
169913b800 [apps/calculation] Fix background redraw bug.
The margins around the textfield did not redraw themselves properly
after dismissing a toolbox for instance. The textfield now takes the
full height of edition zone.

Change-Id: I0794b8273a880a2dc921c5f492eb0f41aef7fe97
2018-01-17 14:26:58 +01:00
Léa Saviot
05de98ea04 [apps/calculation] Fetch the edition mode in the preferences.
Change-Id: Iec7cfc5695907b8c410077a48749fd43efb6cc65
2018-01-17 10:39:20 +01:00
Léa Saviot
51e33b6903 [apps/calculation] Fix margins.
Change-Id: If799563af90c9de4ea02d3177a0ee2375d8ddbb4
2018-01-16 17:33:58 +01:00
Léa Saviot
53556ffacf [apps/calculation] Handle "ans" event in EditableExpressionView.
Change-Id: I7761f36b5a94bb5c8190cd5b238542280666c256
2018-01-16 16:43:38 +01:00
Léa Saviot
91c05b3bb7 [apps/calculation] EditableExpressionView in calculation app.
Change-Id: I8b67353682652695f7296f0222939930f4b21794
2018-01-16 16:43:15 +01:00
Émilie Feral
d4f3fc6b5c [apps/calculation] Insert text rather than overwrite when selecting a
history cell

Change-Id: Ie2cbe92a14a64caa3d1b4eabce6dc6de4baaaa34
2017-05-31 11:54:54 +02:00
Émilie Feral
99eb670821 [apps/calculation] Repeat last calculation with event "OK/EXE" on empty
text field

Change-Id: I77a3dc5c1522a67780c5d1b6f89b3e322ed17c84
2017-05-24 16:48:42 +02:00
Émilie Feral
3e3df48051 [apps/sequence|graph|calculation] ADd a margin in edited text fields
Change-Id: I5450720bc0d58bceb8ab490d4fb837b4d79eef73
2017-05-10 16:30:46 +02:00
Émilie Feral
70fc734f7b [escher] Change dynamic view controller paradigm
Change-Id: I57fd41c9b9ad8a1e8b684b97fdf80ddffd71881d
2017-05-03 14:22:51 +02:00
Émilie Feral
f3eb2b80df [escher] In textField, record edited data when changing selection
Change-Id: I74e1cac2188986244f79e7c5ad0eb1d300510475
2017-04-24 17:36:32 +02:00
Émilie Feral
80873cf025 [apps/calculation] Make calculation views dynamically allocated
Change-Id: I45946e46203bd8dde21793ee2395c76dc15db06c
2017-04-20 12:12:04 +02:00
Émilie Feral
024e55abeb [apps][escher] Delete magic numbers
Change-Id: If7a589d9f02895fc1b2e8b496133ab11381e733c
2017-04-14 18:30:58 +02:00
Émilie Feral
0a3692cfac [apps/shared] Do not reset the textfield is the data has not been
updated (syntax, math error)

Change-Id: I53301c2bdf59e03d0c2bcdb56b0da4d86d83bb5e
2017-03-29 18:36:39 +02:00
Émilie Feral
52cd5a704e [apps/calculation] Improve edit expression rendering
Change-Id: I972d9cf6fd018799966bd8765c6ee35be07aab10
2017-03-20 14:55:59 +01:00
Émilie Feral
adc80cd71b [apps][escher] I18n
Change-Id: I4d6f40155a8a182184af9ef2a583d0469196ffd5
2017-03-16 15:12:12 +01:00
Émilie Feral
8f1d37c28c [escher] Add a cursor to text fields
Change-Id: Ib4a80a3c6d4b5d76cb56645275e8ecc6d69528ca
2017-03-08 15:42:14 +01:00
Émilie Feral
c584d1fb4e [escher] Add toolbox event handling in responder [apps] Correct the text
field delegate app accordingly

Change-Id: I180fe53aaa1e0929b357d3985f584937fba2ecca
2017-02-20 10:48:50 +01:00
Émilie Feral
8c284ba34f [escher][apps] CHange textField API
Change-Id: I766d153b7f7429473f297707a08358051123accc
2016-12-15 13:51:40 +01:00