Ruben Dashyan
c1470ed9d3
[escher/input_view_controller] Define isEditing method
2019-08-29 11:07:22 +02:00
Ruben Dashyan
0f3fc46ad1
[escher/message_table_cell_with_chevron_and_expression] subAccessoryView has margin by default
2019-08-29 11:07:22 +02:00
Émilie Feral
cbe6d312d4
[escher] Add a comment for future improvement on TextField
2019-08-13 09:44:00 +02:00
Émilie Feral
011142427a
[esher] TextField: fix issues:
...
- when textFieldDidFinishEditing failed ("1+ln(-2)" in a scalar
entry for instance), the previous text was modified even if edition aborted
- The draft buffer was not reinitialized when overriding the draft text
buffer with a text event
2019-08-13 09:44:00 +02:00
Émilie Feral
12060e2ae7
[escher] TextField: all text fields use the same draft text buffer
2019-08-13 09:44:00 +02:00
Léa Saviot
c839fb52a3
[escher/layout_field] Fix cursor position on Empty layout
...
Scenario: In the calculations app, write 1, Enter, write •|/2, go up,
then go down. There is a problem with the empty layout and the cursor.
2019-08-08 17:22:03 +02:00
Léa Saviot
ce15bc202d
[escher/layout_field] Fix EmptyLayout disappearance
...
Scenario :
In the calculation app, write 1, press Enter.
•|
Write ---
2
Then go up. The empty layout on top of the fraction disappears.
2019-08-08 17:22:03 +02:00
Émilie Feral
2ecc566c2c
[escher] TextField: when handling event with text, replace system
...
parenthesis by user parenthesis to switch from layout structure to
linear text.
When copying a layout and pasting it to a textfield, we add required
parentheses:
2+1
----- serializes to ---> [2+1]/3 and is turned to (2+1)/3 before being
3
handled by a textfield.
2019-08-08 17:22:02 +02:00
Émilie Feral
059c596a80
Makefiles: avoid building all sources for each target; introduce more
...
modularity
2019-08-08 17:22:01 +02:00
Émilie Feral
2861a35840
Clean some warnings
2019-08-08 16:29:38 +02:00
Léa Saviot
e8be088478
[apps/escher] Factorize TxtArea and Code::EditorCtrlr's k_indentSpaces
2019-08-08 16:22:28 +02:00
Émilie Feral
7a4ee746b2
[escher] TextField: call reinitDraftBuffer after edition is complete to
...
avoid erasing text that is required later.
Fix bug: OK handling on function list in linear mode did not copy the
function expression into the textfield before editing
2019-07-30 11:47:42 +02:00
Ruben Dashyan
bc8b5af2e6
[escher/modal_view_controller] didBecomeFirstResponder selects modal view if displayed
2019-07-19 15:06:25 +02:00
Ruben Dashyan
44809f4b3f
Substitute Escher app() by Container::activeApp()
2019-07-19 15:06:25 +02:00
Ruben Dashyan
b4cac92af2
[escher/modal_view_controller] Clean didBecomeFirstResponder
2019-07-19 15:06:25 +02:00
Ruben Dashyan
772610d9e0
[escher/container] Assert activeApp() does not return nullptr
2019-07-19 15:06:25 +02:00
Ruben Dashyan
224f7873f7
[*container] Make Container::s_activeApp protected
2019-07-19 15:06:25 +02:00
Ruben Dashyan
a0e6151b26
[*container] Remove static Container::sharedContainer
2019-07-19 15:06:25 +02:00
Ruben Dashyan
80981ce865
[escher/container] Make activeApp static
2019-07-19 15:06:25 +02:00
Ruben Dashyan
17795eed87
[escher] Include container.h instead of app.h
...
app.h did actually include container.h
2019-07-19 15:06:25 +02:00
Ruben Dashyan
0531187cda
[escher] Cleaner app header inclusion
2019-07-19 15:06:25 +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
Ruben Dashyan
2888eddd06
[escher/button_row_controller] Access the app directly
2019-07-19 15:06:25 +02:00
Ruben Dashyan
e4ec398ecd
[escher] InputEventHandler gets the app directly
2019-07-19 15:06:25 +02:00
Romain Goyet
21907fb89a
[apps] Get rid of App casts
2019-07-19 15:06:25 +02:00
Romain Goyet
581ec55832
[escher] Inline the App::snapshot() function
2019-07-19 15:06:25 +02:00
Romain Goyet
45875dd642
[escher] Make app() a global function
...
This way it can easily be reached by anyone, including non-responders.
And it can easily be overwritten in namespaced apps.
2019-07-19 15:06:25 +02:00
Ruben Dashyan
652cbae9ac
[escher/responder] Access the app directly from the shared container
2019-07-19 15:06:25 +02:00
Ruben Dashyan
ba2a98f5e5
[escher/app] Remove poor man's RTTI
2019-07-19 15:06:25 +02:00
Ruben Dashyan
443f974cbb
[escher/container] Inline activeApp() accessor
2019-07-19 15:06:25 +02:00
Ruben Dashyan
1f06819974
[apps] Remove Container * parameter from all App constructors
2019-07-19 15:06:25 +02:00
Ruben Dashyan
5f8a745957
[escher/app] Remove Container
2019-07-19 15:06:25 +02:00
Ruben Dashyan
268ad3f3ba
Access the shared container from escher and apps
2019-07-19 15:06:25 +02:00
Léa Saviot
e72c7d8564
[escher/layout_field] Fix cursor position when inserting layout
...
Scenario : In calculation, write 10/7, enter
Go up, press OK on 10/7 -> the cursor is not on the right of the layout
2019-06-26 10:08:03 +02:00
Léa Saviot
cc8403e020
[escher/text_input] Factorize and clean handleEvent Right and Left
2019-06-21 14:30:14 -04:00
Léa Saviot
5a8596acd7
[ion/utf8_helper] Put default parameter in RemovePreviousGlyph
2019-06-21 14:30:14 -04:00
Léa Saviot
b696668422
[escher/text_field] Fix cursor navigation on combining code points
2019-06-21 14:30:14 -04:00
Léa Saviot
5f549b514e
[escher] Fix backspace on utf8 combining code point
2019-06-21 14:30:14 -04:00
Léa Saviot
67eea0802f
[escher/text_area] Fix cursor navigation on combining code points
2019-06-21 14:30:14 -04:00
Léa Saviot
0478fc816e
[escher/layout_field] Fix cursor position when inserting "cos()"
2019-06-17 08:25:29 -04:00
Léa Saviot
e17658181d
[escher/layout_field] Compute the pointed layout after the insertion
...
Otherwise it breaks the scenario:
Initial layout: '0
"abs(x)" pressed in the toolbox => |•| is added, • being an empty layout
Final layout: |0'|
2019-06-14 08:20:54 -04:00
Léa Saviot
2061c5d692
[escher/text_area] Fix text indentation handling
...
We used a small buffer to preprocess a text to insert in text area (add
indentation, remove empty code points, compute the next cursor location),
but the size of this buffer was sometimes too small and caused a crash.
Now we do all the text odification in place in the text area buffer.
2019-06-13 11:40:13 -04:00
Léa Saviot
3d991e56da
[escher/poincare] Cleaner way to find the cursored layout in LayoutField
...
Everything is now in the virtual method
LayoutNode::layoutToPointWhenInserting
This removes a dirty inclusion of apps/i18n.h in escher
2019-05-27 17:24:11 +02:00
Émilie Feral
4dd7d1d792
[escher] ExpressionView: discard optimization that triggers a bug
2019-05-13 17:54:45 +02:00
Émilie Feral
1e01c5dadb
[escher] TextArea: fix cursor position when handling text with UCodePointEmpty
2019-05-07 17:13:13 +02:00
Léa Saviot
a7d8160ee0
[escher/text_field] Add missing cursor location update
...
Fixes the scenario: go to statistics, press the root key, then the XNT
key -> crash
2019-05-03 15:54:22 +02:00
Léa Saviot
5316372d72
[escher/text_field] When fetching XNT code point, text is draftText
2019-05-03 15:54:22 +02:00
Émilie Feral
2217eebaec
[escher] SelectableTableView: when reloading data, we temporary deselect
...
the table. We warn the SelectableTableViewDelegate that the selection
change is 'within a temporary selection change' when notifying it of the
change.
2019-05-03 15:54:21 +02:00
Émilie Feral
5e280c7538
[escher] ExpressionView: optimize setLayouts to avoid marking the whole
...
view as dirty when the layout did not really changed
2019-05-03 15:54:21 +02:00