Commit Graph

902 Commits

Author SHA1 Message Date
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
É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
É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
Léa Saviot
bbb10f1993 [ion/kandinsky] Move unicode to ion 2019-05-03 15:53:19 +02:00
Léa Saviot
76e6860f83 Remove TODOs 2019-05-03 15:53:19 +02:00
Léa Saviot
f0e8196016 [escher] Fix text field and text area navigation 2019-05-03 15:53:19 +02:00
Léa Saviot
5c39cab73e [escher] Fix text inputs so they use UTF8 2019-05-03 15:53:19 +02:00
Léa Saviot
07a910b455 [escher] Clean text_input 2019-05-03 15:53:19 +02:00
Léa Saviot
7a1fd68626 [poincare/utf8_decoder] nextCodePointPointer is now stringPosition 2019-05-03 15:53:19 +02:00
Léa Saviot
41afa92f10 [unicode] Use the UTF8Decoder to scan const char * 2019-05-03 15:53:19 +02:00
Léa Saviot
65e5adafac Remove Ion::Charset 2019-05-03 15:53:19 +02:00
Émilie Feral
ac6f23684d [poincare] Clean Expression and Layout builders
Before: Opposite(Opposite(Rational(1))) misleadingly created the
expression "-1"; now, Opposite::Builder(Opposite::Builder(Rational(1)))
creates "--1"
2019-02-21 11:29:35 +01:00
Ruben Dashyan
b3d15d7e7f [escher/table_view] layoutSubviews of m_contentView first 2019-02-18 16:49:58 +01:00
Ruben Dashyan
b5dc7f738e [escher/table_view] scrollToCell includes CellOverlap
In passing, factorize duplicate code.
2019-02-18 16:49:58 +01:00