Léa Saviot
6311f408b4
[escher/text_area] Fix overlap in textInsert
2020-06-04 14:50:04 +02:00
Léa Saviot
eeb42f2544
[apps/code] autocompletionText uses the right text length
...
Before, there was no notion that the autocompleted text might not be a
null terminated string.
2020-06-04 14:50:03 +02:00
Léa Saviot
938e0dd840
[apps/code] Autocompletion steps
2020-06-04 14:50:03 +02:00
Romain Goyet
84768472bd
Explicit std::min/max template usage
...
This is unfortunately required in several cases:
- Sometimes when we use either float and double (this should be changed)
- Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
- Because we mix pointer differences and ints
2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0
Use std::min and std::max
2020-04-14 09:31:02 -04:00
Émilie Feral
0348db5d2e
[escher] TextArea: fix drawStringAt action with negative length
2020-02-12 15:13:24 +01:00
Ruben Dashyan
09e1c2eb8b
[escher/text_input] insertTextAtLocation location parameter not const anymore
2020-02-12 15:13:23 +01:00
Ruben Dashyan
742ee475ea
[escher/text_area] Fix typo
2020-02-12 15:13:23 +01:00
Léa Saviot
e10bd18f8e
[escher/text_area] insertTextAtLocation removes system parentheses
2020-02-12 15:13:18 +01:00
Léa Saviot
a42b52d10e
[escher/text_area/field] When pasting, force cursor right of text
2020-02-12 15:13:18 +01:00
Léa Saviot
d9b284c1ec
[escher/text_input] ShiftUp/Down selects whole textfield on left/right
2020-02-12 15:13:18 +01:00
Léa Saviot
efc8a238ea
[escher] Rename deleteSelectedText -> deleteSelection
2020-02-12 15:13:17 +01:00
Léa Saviot
df167376f0
[escher/text_area] Handle cut event
2020-02-12 15:13:17 +01:00
Léa Saviot
9c5843500a
[escher/text_input] Fix reload and scroll after deleteSelectedText
2020-02-12 15:13:17 +01:00
Léa Saviot
20c761d3f0
[escher/text_area] Fix slection over wrote
...
Scenario: 34567 then press 0 -> we want 3067
** selected
2020-02-12 15:13:17 +01:00
Léa Saviot
73b1f7da20
[escher/text_input] Fix selection algorithm
...
There was a glitch when :
** are the selected glyphs and | is the cursor
12345678
234567|8 then Shift+up
**
2020-02-12 15:13:17 +01:00
Léa Saviot
1f44f80e4a
[escher] Scroll to cursor when selecting up / down
2020-02-12 15:13:17 +01:00
Léa Saviot
b6f3b39086
[escher/text_input] Rename currentSelectionIsEmpty -> selectionIsEmpty
2020-02-12 15:13:17 +01:00
Léa Saviot
67008f454e
[escher/text_area] Replace the selection when event with text
2020-02-12 15:13:17 +01:00
Léa Saviot
30923ed4c6
[escher/text_area] Select up/down
2020-02-12 15:13:17 +01:00
Léa Saviot
1eba12784f
[escher/text_area] Remove unnecessary scroll
2020-02-12 15:13:17 +01:00
Léa Saviot
14cc6ffc59
[escher/text_area] Select and copy
2020-02-12 15:13:17 +01:00
Émilie Feral
2861a35840
Clean some warnings
2019-08-08 16:29:38 +02:00
Ruben Dashyan
e4ec398ecd
[escher] InputEventHandler gets the app directly
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
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
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
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
Émilie Feral
1e01c5dadb
[escher] TextArea: fix cursor position when handling text with UCodePointEmpty
2019-05-07 17:13:13 +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
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
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
94b4cbc8d5
[unicode] Fix python area
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
bbb10f1993
[ion/kandinsky] Move unicode to ion
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
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
0a823da78c
[escher] Variable box pop-up is handle as Toolbox pop-up by asking
...
InputEventHandlerDelegate
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