Commit Graph

1019 Commits

Author SHA1 Message Date
Léa Saviot
a2981c22a5 [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 16:47:59 +02:00
Léa Saviot
990da289f9 [escher/text_input] Factorize and clean handleEvent Right and Left 2019-06-21 15:47:48 -04:00
Léa Saviot
4f63e4058e [ion/utf8_helper] Put default parameter in RemovePreviousGlyph 2019-06-21 15:47:48 -04:00
Léa Saviot
b3c9831f66 [escher/text_field] Fix cursor navigation on combining code points 2019-06-21 15:47:48 -04:00
Léa Saviot
e7a81e4094 [escher] Fix backspace on utf8 combining code point 2019-06-21 15:47:48 -04:00
Léa Saviot
376599093b [escher/text_area] Fix cursor navigation on combining code points 2019-06-21 15:47:48 -04:00
Léa Saviot
ddce497916 [escher/layout_field] Fix cursor position when inserting "cos()" 2019-06-17 15:38:53 -04:00
Léa Saviot
a29994e84f [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-17 15:38:53 -04:00
Léa Saviot
e5190f38ab [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-17 15:38:53 -04:00
Léa Saviot
852c43c092 [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-06-06 10:00:32 +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
Émilie Feral
c1a0e94ec7 [escher] Clean empty lines 2019-05-03 15:54:21 +02:00
Émilie Feral
9665f11d06 [poincare] Layout: discard methods isVerticalOffset(), isHorizontal(),
isRightParenthesisLayout(), isLeftBracket(), isRightBracket(),
isCodePoint(),
isLeftParenthesisLayout() and use type() instead
2019-05-03 15:54:21 +02:00
Émilie Feral
240ed439e0 [escher] ScrollableView: discard duplicate data source of scrolling
offset
2019-05-03 15:54:21 +02:00
Émilie Feral
a3f669fb08 [escher] TextView: avoid useless markRectAsDirty when updating
backgroundColor and textColor
2019-05-03 15:54:20 +02:00
Émilie Feral
50ad6b6761 [escher] SelectableTableViewDataSource: avoid calling m_delegate->tableViewDidChangeSelection when only reloading the data. 2019-05-03 15:54:20 +02:00
Ruben Dashyan
a3fe99da21 [escher] Simplify TableView::scrollToCell 2019-05-03 15:54:20 +02:00
Ruben Dashyan
7b426adf5b [escher] Fix ExpressionField::inputViewHeight
Since commit

  [escher] Implement ScrollView::minimalSizeForOptimalDisplay including margins

minimalSizeForOptimalDisplay includes the ScrollView margins.
2019-05-03 15:53:21 +02:00
Léa Saviot
a88a1bcbef [escher] Increase TextField::maxBufferSize
In order to be able to write a 10*10 adjacency matrix
2019-05-03 15:53:21 +02:00
Émilie Feral
578c65d5dd [shared] Clean class names containing storage 2019-05-03 15:53:20 +02:00
Émilie Feral
067577ea02 [escher] Avoid unnecessary relayouts 2019-05-03 15:53:20 +02:00
Léa Saviot
b3d0de564a [coding style] Small inlining 2019-05-03 15:53:20 +02:00
Léa Saviot
3f0bdc6630 [escher] Fix TextArea::handleEventWithText
It did not handle properly a new line (placed the cursor wrongly).
2019-05-03 15:53:20 +02:00
Léa Saviot
d4feebc2c6 [escher] Fix null termination for drawString in ScrollViewIndicator 2019-05-03 15:53:20 +02:00
Léa Saviot
07b22f44d2 [escher/text_field] Fix rect dirtying in setText
The content of the buffers might no be initialized before the setText,
so we cannot use reloadRectFromPosition, as it requires to perform
stringSize, which needs valid content.
2019-05-03 15:53:20 +02:00
Léa Saviot
cbb1055218 [escher] Fix TextField::ContentView::setEditing 2019-05-03 15:53:20 +02:00
Léa Saviot
b2a97cfc7a [escher] Fix buffer choice in TextField::glyphFrameAtPosition 2019-05-03 15:53:20 +02:00
Léa Saviot
e338577793 [unicode] Clean decoder use 2019-05-03 15:53:20 +02:00
Léa Saviot
4c5251f04f [unicode] Use unicode when dealing with chars - Part 2 2019-05-03 15:53:19 +02:00
Léa Saviot
ac5311d257 [escher/text_area] Fix rect dirtying after Clear event 2019-05-03 15:53:19 +02:00
Léa Saviot
d91fdeb12b [unicode] Fix stop condition in TextArea::Text::removeRemainingLine 2019-05-03 15:53:19 +02:00
Léa Saviot
5df9e0af71 Use correct unicode symbols 2019-05-03 15:53:19 +02:00
Léa Saviot
4e93a564b6 [escher/ion] Fix wrong assertions 2019-05-03 15:53:19 +02:00
Léa Saviot
7f4ef39d0c [text_area] Fix Text::Position use with unicode
A glyph offset is not equivalent to a code point offset since a code
point can be several glyphs long.
2019-05-03 15:53:19 +02:00
Léa Saviot
c476ea5380 [escher/text_field] Fix removeCodePoint rect dirtying 2019-05-03 15:53:19 +02:00
Léa Saviot
34fc647ccd [escher/text_field] Code cleaning 2019-05-03 15:53:19 +02:00
Léa Saviot
94b4cbc8d5 [unicode] Fix python area 2019-05-03 15:53:19 +02:00
Léa Saviot
39f6f4f5bb Remove compilation warnings 2019-05-03 15:53:19 +02:00
Léa Saviot
f9fbcabb30 [escher/ion] Factorize code for removing a code point in text field/area 2019-05-03 15:53:19 +02:00
Léa Saviot
9e06b23bbb [escher/ion] Standard methods in UTF8Helper used in text_area
String manipulations need to be done using an UTF8 decoder, but some
manipulations can be optimized if the code points we manipulate are only
one char long. These optimizations are done inside UTF8Helper methods.
2019-05-03 15:53:19 +02:00
Léa Saviot
e6b61b257b [unicode] Methods optimized when code points are one char long 2019-05-03 15:53:19 +02:00
Léa Saviot
bd2ea41fbe [apps/escher] Rename cursorTextLocation as cursorLocation 2019-05-03 15:53:19 +02:00
Léa Saviot
496d346049 Remove max/min inline from KDCoordinate header 2019-05-03 15:53:19 +02:00
Léa Saviot
cfbb1318ad [escher] Clean TextView 2019-05-03 15:53:19 +02:00
Léa Saviot
7b5c51b3c3 [escher] Fix textfield edition 2019-05-03 15:53:19 +02:00