Commit Graph

963 Commits

Author SHA1 Message Date
Léa Saviot
66d2eb0e7a [poincare] Handle MultiplicationSign in ExpressionLayoutCursor::insertText
Change-Id: Ie2dd1c48cedbb3f80eac4db1ff9ffeeefb1ede71
2018-05-07 14:24:44 +02:00
Romain Goyet
29aca1a7dc [escher] Add a BankViewController 2018-05-04 17:04:24 +02:00
Léa Saviot
4576b88f81 [escher] Fix cursor display in ELField, when the cursor is on the right
Change-Id: I44e9bc53440b4ce7b074a94b733a636d3582ac3c
2018-05-02 14:46:10 +02:00
Léa Saviot
7ea0ddb2a7 [escher] OnFinishEditing, clear the layout.
The layout should never be deleted + this fixes the ELField size that
might stay big once emptied (e.g. 1 / 2 OK would leave an empty ELField,
but with a big vertical size).

Change-Id: I3971115d3bad48ce36a449e01bd12d5d8229ca4c
2018-05-02 11:05:08 +02:00
Léa Saviot
21f083d926 [escher] Fix Graph/Sequence cursor display in 2D edition.
When inserting a layout, the ELField was not put in Edition mode and the
cursor did not appear.

Change-Id: I47154829bda4a51201a4b1417ce86cae4099c1b9
2018-05-02 10:56:32 +02:00
Léa Saviot
951f31e951 [escher] Fix bug in CursorIndexInCommand (when bufferSize = 0)
Change-Id: I3494ce7faeb6925e7ed6c7b532d34172420c4620
2018-05-02 10:16:52 +02:00
Léa Saviot
80d50d2a79 [escher] Fix horizontal scroll in ELField
Change-Id: Id2502f84514a1aeb76c84f7648dea110b0676ee4
2018-04-30 18:10:44 +02:00
Léa Saviot
c8a95b6acd [escher] ELField size should take into account the cursor.
Else, when it is on the extrema, it does not appear.

Change-Id: I2a8620ef38773e51d2087f842ec2dade2d8e0bac
2018-04-30 18:10:03 +02:00
Léa Saviot
acf79de1d4 [escher] Better cursor scroll (scroll to see the cursor baseline)
Change-Id: I4ddd1818d783d6f5f22c8b6f1e17ad09aea77527
2018-04-26 18:11:10 +02:00
Léa Saviot
87becaa854 [escher] The layout should not change if ELField cannot handle event.
Change-Id: Ie3a59400a054680aa8cc42ab755708aa2fa19e2d
2018-04-26 17:34:48 +02:00
Léa Saviot
4b79bd544e [escher/poincare] Insert ".10^()" in ELField on EE event.
Change-Id: Ic30016c7cb7d2186b6e1b6f0ef1d676f1a512714
2018-04-26 16:43:49 +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
30bffac99b [escher] Move settings to initializer list
Change-Id: I2e915e6290d2fc8a219898ab5369290d220f217d
2018-04-26 11:53:51 +02:00
Léa Saviot
49c17f743a [escher] Fix ExpressionLayoutFieldScrolling
Change-Id: I6f8a265e01bce454732e53affa9ddd01f0e78f08
2018-04-26 11:49:05 +02:00
Léa Saviot
b3d1f8975c [poincare] cursorLeftOf, RightOf, etc., use a cursor object, not pointer
Change-Id: If9a148e663cd7a18a303adc9175aab953d825945
2018-04-26 10:21:26 +02:00
Léa Saviot
cff95c2ac1 [escher/poincare] Fix non ELField size change.
When adding a big layout (e.g. SumLayout), the inputView did not change
it size (in calculation and in Saquence for instance).

Change-Id: Ic8604a4085c29e69d2aecc7ac8a88ca9889f34f1
2018-04-25 18:00:53 +02:00
Léa Saviot
728537c7ff [escher/poincare] Remove ELCursor::pointedELEquivalentChild
Change-Id: Iac459394b8743030243dc9e7e682c427f265a817
2018-04-25 17:10:40 +02:00
Léa Saviot
43e81a6fb3 [escher] setFrame marks as dirty the olf frame minus the new frame.
Change-Id: I0658551541971f9f36a60ef87380f55d7ff148b8
2018-04-25 15:21:06 +02:00
Léa Saviot
8778516fe2 [escher] expressionLayoutFieldDidChangeSize reloads only the modalView
Change-Id: Ib406c7d10e2befae9d660e025c84df58a2e9b70c
2018-04-25 15:15:12 +02:00
Léa Saviot
832f7c3c74 [escher] Only ExpressionLayoutField::reload calls eLFdidChangeSize
Change-Id: I0e75c53750dfb2213b926b3d7e988bb6b37f9d05
2018-04-25 15:14:08 +02:00
Léa Saviot
9f09ee8339 [escher] Remove big modal view drawing hack.
Change-Id: I09b0d9ee1db8db9a736577770f540e69cc78d660
2018-04-25 13:58:43 +02:00
Léa Saviot
d9c89ea0c9 [escher] ModalViewCtrlr: don't dirty main view when dislaying sibling
Change-Id: I7d1a555055bc3d9a3f9801e96c792d45ab2011d4
2018-04-25 13:58:43 +02:00
Léa Saviot
f6c3f7b0e9 [poincare] Remove old expression_view_with_cursor.h file
Change-Id: I0f96e79fdf2d374c88c0f590101ff4e7205dcb54
2018-04-25 13:58:42 +02:00
Léa Saviot
772187725c [escher/poincare] Missing "override" keywords.
Change-Id: Icbb9e25cb0983eb27913a4a7efd358a971664b7e
2018-04-25 13:58:42 +02:00
Léa Saviot
0ae7c8a723 [xnt] Insert the right XNT char.
Change-Id: Ibc91a2ece310313fb368a68483c5a1b6fe14aad2
2018-04-25 13:58:42 +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
e5cabe6bda [escher] Fix ExpressionLayoutField::hasText()
Change-Id: I1e0bb0f7dfea6f6b35bbc3ea7374891ea75f48f1
2018-04-23 11:34:01 +02:00
Léa Saviot
d436e06a73 [escher] ~InputViewController and rule of 5
Change-Id: Iec7a3f005df01c59162c8898e136d94f7e69c236
2018-04-23 11:34:01 +02:00
Léa Saviot
ce056e085b [escher] Remove View::frame(), create TextCursorView::frame()
Change-Id: I69c1aa5e94d93d2832564040abcca62bddc377ae
2018-04-23 11:34:00 +02:00
Léa Saviot
117a6d460a [poincare] Stop exposing text/expressionlayout fields in ExpressionField
Change-Id: Ic1afb3f7c1f6bff5ea3bedc6f96bef986b74f6a8
2018-04-23 11:33:53 +02:00
Léa Saviot
894080f1ab [apps/escher] EVWithCursor becomes ELField::ContentView
Change-Id: I719218e4d1d360800e0f1ef3eebeea774c8d5660
2018-04-23 09:41:20 +02:00
Léa Saviot
22ab94209f [apps/escher] Rename EditableExpressionView -> ExpressionField
Change-Id: Iadfb220ee94e68762305060215f1ead0cac951fb
2018-04-23 09:41:20 +02:00
Léa Saviot
31face58a2 [apps/escher] ScrollableEVWithCursor renamed ExpressionLayoutField
Change-Id: Id0e4610fb677d8ad36721eef1a85f1c424d1743e
2018-04-23 09:41:20 +02:00
Léa Saviot
9e87172800 [poincare] moveLeft renamed cursorOnLeft, same for other directions
Change-Id: Ic46604ea81eabdb2e10755a67307169d90654efd
2018-04-23 09:41:19 +02:00
Léa Saviot
56b2b505cd [escher] Avoid using floats to compute ints.
Change-Id: I5637194badc75eec6f016f44bb9660b51d2157b9
2018-04-19 16:42:03 +02:00
Léa Saviot
b90dea7cee [escher] Rename frame() method in ModalViewController.
Change-Id: I157b3fb20af5cb3013d53bef51ba98d192654409
2018-04-19 16:31:35 +02:00
Léa Saviot
7e9fba1032 [escher] Fix markRectAsDirty call.
Change-Id: I50b3e7ce9bbeed2ab8b1c76857914d798d3f05b5
2018-04-19 16:31:02 +02:00
Léa Saviot
70f28aea4b [Coding style] Change "brother" into "sibling"
Change-Id: I6f07be262358641875d3024d1741285c5895b8d6
2018-04-19 16:16:17 +02:00
Romain Goyet
84561a929f [escher] Clean the ScrollView, TableView and SelectableTableView constructors 2018-04-18 18:08:07 +02:00
Léa Saviot
afcac95315 [poincare] The cursor changes its size.
Change-Id: I3366ff956a9f12b347a8b05066800619e61308c5
2018-04-18 15:23:55 +02:00
Léa Saviot
ef83756cd4 [escher] Reload did not work properly when inserting a high layout
Change-Id: I17d0be33bed325107e183598374f6399427ae9a1
2018-04-17 16:08:22 +02:00
Léa Saviot
f07127b68b [escher/poincare] Remove duplicate function
Change-Id: Ie7ab03d1f2716d751f85a9f9747b064892a9b19e
2018-04-17 15:42:07 +02:00
Léa Saviot
0fee6685fe [escher] Hide and show empty layouts
Change-Id: I3a54848108e1168dfdecf76a562381c7bd1dd65d
2018-04-17 15:36:46 +02:00
Léa Saviot
193aefd5a6 [poincare] Each leayout gives the layoutToPointWhenInserting
Change-Id: I5f054643decd27731e77d0f1cf2e6874cf6ff8d5
2018-04-17 15:33:40 +02:00
Léa Saviot
9b22175877 [poincare] Hide EmptyLayout when the cursor is next to it.
Change-Id: I487b99105229451d033999a12e510b3370e63093
2018-04-16 17:26:57 +02:00
Léa Saviot
c97c1b6231 Remove debug comment.
Change-Id: I2bd6731e8045606fb0132d29e2aea353f0518380
2018-04-16 11:42:32 +02:00
Léa Saviot
042bdf3477 [escher] setEditing(true) when handling event in ScrollableEVWithCursor
Change-Id: I24760d7050fffd3ba5c38393450c4545354a7769
2018-04-16 11:38:14 +02:00
Léa Saviot
34f6729e35 [escher] Add initial text before handling event in editableEV
It seems more logical.

Change-Id: I72432221ba567b0f7b0d46946a397e4d1b53c8d0
2018-04-16 11:20:15 +02:00
Léa Saviot
e60cf7cea3 [escher] Clean code.
Change-Id: I081aa2ac6b1be4df034aeac0e274379e9daa2afd
2018-04-16 11:19:30 +02:00