Commit Graph

101 Commits

Author SHA1 Message Date
Romain Goyet
d2b2705d2d [escher] TextInput doesn't use colors anymore 2018-06-04 16:08:11 +02:00
Émilie Feral
b2b141aae4 [escher] Fix underscore replacement for subscript insertion in textfield 2018-05-17 16:53:16 +02:00
Léa Saviot
b752ab0389 [escher] Add bool forceCursorRightOfText in handleEventWithText
Change-Id: I9124a1bacfce821fc761ddefc4d8b43de82dbc21
2018-05-17 13:42:20 +02:00
Émilie Feral
2e0a70f269 [escher] Fix bug in text field: casting a unsigned char to signed char give negative
values above 127...
2018-05-16 15:53:04 +02:00
Émilie Feral
203311f81b [escher] Fix reading garbage memory in TextField 2018-05-14 13:38:28 +02:00
Léa Saviot
3b582a2e46 Merge branch 'SaisieJolie30Apr' into SaisieJolie8May
Change-Id: Ia4196119fc56c5bc3423aea752b49f3f7ba39499
2018-05-08 15:17:51 +02:00
Léa Saviot
19d5115eaa [escher] Add margins in ExpressionField
Change-Id: I51272682246403f0449be19ff6cc75fd5544ad9c
2018-04-26 16:31:09 +02:00
Léa Saviot
912d084130 [escher] Fix textfield edition when initial text.
Change-Id: Ieee10ec6fcbe6464dee2748de033f269169789d9
2018-04-23 17:18:56 +02:00
Léa Saviot
13ae1d2545 [apps/escher/toolbox] handleEventWithText for all responders.
This makes the code in the various toolbox more generic. The arguments
of the text to insert are each replaced by a Ion::Charset::Empty.
These Empty chars are used to create layouts in ExpressionLayoutFields,
and to compute the position of the cursor in other fields, before being
removed.

Change-Id: Ie81c1e394b06fef2ab801ccff919d6550f70ec30
2018-04-23 17:18:48 +02:00
Léa Saviot
c4b5d4cf40 Merge branch 'SaisieJolieRebase1201' into SaisieJolieMerge10Apr
Change-Id: I802dbb9f7c0eebf75a1b6cd21ddd194e89b53752
2018-04-10 17:21:54 +02:00
Émilie Feral
06ace4369c Clean warnings (comparison signed and unsigned) 2018-03-28 10:01:21 +02:00
Émilie Feral
b0ede47d55 [ion] Change Storage design (former kallax) 2018-03-22 14:01:38 +01:00
Émilie Feral
19ca0f0640 [apps] Code: use the FileSystem to store the scripts instead of an
accordion
2018-03-22 14:01:38 +01:00
Émilie Feral
4c796d404f [escher] TextField: prevent from inserting text with \n 2018-03-22 13:12:12 +01:00
Émilie Feral
aade7cb2fe [escher] Create a class TextInput (from which derived TextField,
TextArea)
2018-03-22 13:12:12 +01:00
Émilie Feral
576caa039f [apps][escher] Add methods 'handleEventWithText' in TextField and
TextArea to fix bug in probability (adding a toolbox text from the
calculations controller)
2018-03-22 13:12:12 +01:00
Émilie Feral
7fcf77ce23 [escher] Fix bugs in TextField:
1. The cursor size is counted twice in minimalSizeForOptimalDisplay (bug
in regression table for instance)
2. Avoid layouting twice after scrolling by enabling overscroll
2018-03-22 13:12:12 +01:00
Émilie Feral
2b0b40d6d6 [escher] TextField: force layout after scroll reload when the content
size of scrollview might have changed
2018-03-22 10:22:18 +01:00
Émilie Feral
4af6e71e21 [escher] Fix bugs in TextField:
1. The cursor size is counted twice in minimalSizeForOptimalDisplay (bug
in regression table for instance)
2. Avoid layouting twice after scrolling by enabling overscroll
2018-03-22 10:22:18 +01:00
Émilie Feral
8c32a61bb1 [escher] TextField: markAsDirty the previous text when setting a new
text
2018-01-30 18:19:27 +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
Émilie Feral
1912ad0379 [escher] Bug in dirty tracking in text field: the cursor width was
forgotten
2018-01-16 13:20:31 +01:00
Émilie Feral
e8793c429c [escher] In textfield: when calling textFieldDidHandleEvent, precise if
there was any modification in the text
2018-01-04 15:48:06 +01:00
Émilie Feral
e41ca318c7 [escher] TextField: change the method to get the optimal size for display 2018-01-04 15:48:06 +01:00
Émilie Feral
975f54c7b2 [ion] Change events name: Origin->ShiftLeft, End->ShiftRight 2017-12-07 17:42:39 +01:00
Léa Saviot
53c8b2215f [escher] Added textFieldDidHandleEvent to TextFieldDelegate.
Change-Id: Iad2ea114dd75632a0204c081b2345aeea8131798
2017-12-04 17:01:48 +01:00
Léa Saviot
b8a856dd27 [escher] Layout a Textfield's subviews when the cursor location changes.
Change-Id: If38e6d0a3034de491bff2cd622e13b3203ca82b8
2017-12-04 16:11:19 +01:00
Léa Saviot
e43bbd38f2 [escher] Fixed TextField bug.
The Statistics apps crashed when navigating the Data table.
 -> Check that the textfield is editing before calling
textFieldShouldFinishEditing.
 -> Changed textLength() to draftTextLength().

Change-Id: Id373a7cd50438303f470abc5bcee7a795c33926a
2017-12-01 13:19:30 +01:00
Léa Saviot
13bf8c2d62 [code] Python toolbox.
Change-Id: I4028b05c662cae04a5ac3af5021f3438bb22dcd0
2017-11-17 11:59:50 +01:00
Léa Saviot
0d6cb75425 [escher] Inlined TextField methods.
Change-Id: I2653bd3a97ba5c5a010f17ac3f7eb054013cd9d3
2017-11-17 11:59:50 +01:00
Léa Saviot
6ee47d6168 [code] Prevent script name extension edition.
Change-Id: I4ac8d032fd88b853670afeebaecc8d6fd5ef981d
2017-11-17 11:59:50 +01:00
Léa Saviot
95c6d9532b [escher] Fixed TextField.
A TextField delegate should process events before the TextField itself.
EditableCellTableViewController now verifies the position of the cursor to
determine if a Left or Right event should finish the TextField edition.

Change-Id: I6c8e78d6d02c7ab87e7d81770b4242a16fecde32
2017-11-17 11:59:50 +01:00
Damien Nicolet
6392735e70 Add orgin/end keyboard shortcuts, by pressing shift left or shift right 2017-09-20 10:16:34 +02:00
Émilie Feral
dd8caaa82e [escher] In textfield: change the behaviour of clear event
Change-Id: I6292faf383e40e7a9b00407bb5c052f92e49a1f6
2017-08-28 11:51:17 +02:00
Émilie Feral
54336b02b5 [escher] Fix bug in textfield: layout when delete the first char after a
right scroll

Change-Id: I272236f44d19266851d2ea8adef733d3459ac7d1
2017-08-28 11:51:17 +02:00
Émilie Feral
46990e1c25 [escher] Make textField used scroll view methods instead of duplicating
them

Change-Id: I10ca0b02f8a87797ce678041cba54c116961ce5c
2017-08-18 13:34:34 +02:00
Émilie Feral
ee51729eba [escher] Move from table view to scroll view the method a update the
scroll to the size of the content view

Change-Id: I2c4aa457425bf5a8a484aecc061ae27453e9aabb
2017-08-18 13:34:29 +02:00
Émilie Feral
5c4740913b [kandinsky] Replace KDText::stringSize(" ") by KDText::charSize()
Change-Id: Ie962d7784b54ff41431d21f64d9af0887a86f9b7
2017-08-17 16:21:17 +02:00
Romain Goyet
5a4fc8af5d [escher] ScrollableView can now scroll in both directions
Change-Id: Ic389c6eaa0ee182b8f9167248ca369e51fd9e54a
2017-08-03 23:25:47 +02:00
Émilie Feral
f96a4556aa [apps/sequence][apps/graph] Switch to editing the function after event
'toolbox' or 'variables'

Change-Id: Iaa7b04871c4a74abf2ddcfc5905804448c7a44a4
2017-05-31 11:54:54 +02:00
Émilie Feral
d7091397e5 [escher] Rule of 5 in view
Change-Id: Iba04e9046845b544e184530562e34f831fce96f6
2017-05-24 15:32:22 +02:00
Émilie Feral
bb6ffaeca0 [escher] Fix bug in text field
Change-Id: Ia77786c449de89d3155bfdba6e873f9d6dd5b901
2017-05-11 09:51:31 +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
4e0e285501 [apps][escher] EXE and OK trigger the same behaviour
Change-Id: Ide7d38fbc445be717e50ed46f2d784c02c9830e4
2017-05-10 12:04:30 +02:00
Émilie Feral
0517066cc0 [escher] Extrude scroll view model to its delegate
Change-Id: If863de63f5f77edb5e2905633067e03aecdd8937
2017-05-03 10:22:01 +02:00
Romain Goyet
d3d9d43cba [escher] TextField: remove an useless reload
Change-Id: Ifed46f3b62189c7fb3940966d274050af7fc614f
2017-04-26 18:33:47 +02:00
Émilie Feral
4b40e68ac9 [escher] Do no insert empty text in text field
Change-Id: I9e82eb9c3d7d1ba680fd5895ec421cb2f04b92ec
2017-04-25 14:59:01 +02:00
Émilie Feral
b08200c7ef [escher] Correct paste in textfield
Change-Id: Ia0982ed7889a79c6be4f56b4c6718bcf5a7ac606
2017-04-25 14:45:27 +02:00
Émilie Feral
1f312d8d54 [escher] Change name clipboard
Change-Id: Ie222b9c7c380346759eaec26626cf76068576a94
2017-04-25 14:01:31 +02:00
Émilie Feral
069af60e9a [escher] In text field, implement copy/cut/paste event handling
Change-Id: I8a4ada4aa983630e57b1a80cc766335b90aa8623
2017-04-25 11:58:42 +02:00