Commit Graph

692 Commits

Author SHA1 Message Date
Émilie Feral
ad6c985111 [solver] ExpressionCell are EvenOddExpressionCell rather than former
ModelExpressionCell
2018-06-08 15:13:50 +02:00
Émilie Feral
2dec9e6244 [escher] Button: method setMessage 2018-06-07 16:21:39 +02:00
Émilie Feral
06b552c033 [escher] InputViewController: call the textField/ExpressionLayout
delegate 'DidFinishEvent' after performing the sucess or abort action
2018-06-07 16:21:39 +02:00
Émilie Feral
f6bdf56c15 [escher] TableViewDataSource: implement default cumulatedWidthFromIndex,
cumulatedWidthFromIndex, indexFromCumulatedWidth,
indexFromCumulatedHeight
2018-06-07 16:21:31 +02:00
Émilie Feral
ac9da8d559 [escher] Handle copy/cut event on Expression in selectable table view 2018-06-07 14:46:14 +02:00
Émilie Feral
24c9549866 [escher] Handle copy/cut event on selectable table view 2018-06-07 14:46:14 +02:00
Émilie Feral
218eec34e0 [escher] AlternateEmptyViewController: give the event to the default
controller
2018-06-07 13:46:18 +02:00
Émilie Feral
e160282e06 [escher] Change the function expression cell to inherit from
even odd expression cell
2018-06-07 13:46:17 +02:00
Romain Goyet
a514f2a6be [escher] TextArea now uses clearRect and drawLine 2018-06-04 16:08:11 +02:00
Romain Goyet
9e4a1c7d54 [escher] TextArea cleanup 2018-06-04 16:08:11 +02:00
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
Émilie Feral
c3b35302aa [escher] Clean Expression layout field 2018-05-17 13:53:10 +02:00
Émilie Feral
5dcfbf83e9 [escher] ExpressionLayoutFieldDelegate should not take a text as
parameter but a layout
Warning: in ExpressionField: the serialized layout is not guaranteed to
be small enough to fill in the text buffer
2018-05-17 13:53:10 +02:00
Léa Saviot
3953ca1c67 [escher] Remove duplicate method
Change-Id: Iac03f002cb6928831a8d640f1bcdeba116f71d06
2018-05-17 13:42:20 +02:00
Léa Saviot
b752ab0389 [escher] Add bool forceCursorRightOfText in handleEventWithText
Change-Id: I9124a1bacfce821fc761ddefc4d8b43de82dbc21
2018-05-17 13:42:20 +02:00
Léa Saviot
2e03812cdb [poincare] Fix cursor position when layout field is not editing
Change-Id: I39fa348a3e567621f4574b2e331b75a836353306
2018-05-17 13:42:20 +02:00
Léa Saviot
05334823e5 [escher] Handle empty text in ExpressionLayoutField::handleEventWithText
Change-Id: Ieb8433a7cf24341b576ab76014cc4cf1e36d929b
2018-05-17 13:42:20 +02:00
Léa Saviot
d84c91f547 [escher] Reorganize event handling in ExpressionLayoutField
Change-Id: I41f7ccbe742c344d1710eca844715ec2e2ec0fbc
2018-05-17 13:22:05 +02:00
Léa Saviot
08b3f73b9c [escher] Return true when layout too big to be handled
Change-Id: If15f032c4d1666021435927d90f500afbdee3bfd
2018-05-17 13:22:05 +02:00
Léa Saviot
bde05b3d8b [escher] Fix layout count verification in ExprLayField::handleEvWText
Change-Id: Ie56e61aa10c907c6ab0dac8814b9ed46aac669f8
2018-05-17 13:22:05 +02:00
Émilie Feral
6035bd904b [escher] Expression layout: Prevent from inserting XNT when the field is full 2018-05-16 19:20:34 +02:00
Léa Saviot
372a214afb [poincare] Prevent insertion of a big layout in ExprLayField
For instance when copy-pasting a layout.

Change-Id: I5967a601b783b81cb537ab4b46e03118f3bd6cdc
2018-05-16 18:37:02 +02:00
Léa Saviot
c2d273bba5 [escher/poincare] ExprLayoutField cannot have more than 152 descendants
If the number of layouts could be infinite, we would have memory
problems. A Layout uses at least one char when being serialized, so we
use the same limit as the char limit in TextField.

Change-Id: Ib8f9c05d04a4dde5b6ca96a732e3e4175dd65b9c
2018-05-16 18:37:02 +02:00
Léa Saviot
f1635515a8 [poincare] Make ExpressionLayoutField::insertLayoutAtCursor private
Change-Id: I809a04a87b933ef18dd6c02d29502ccf443ffa46
2018-05-16 18:37:02 +02:00
Léa Saviot
22b0c4c8b1 [escher] Remove duplicate function
Change-Id: I6301f10bf1598a81956909137109ed1a721d3a1a
ExpressionLayoutField::insertLayoutFromTextAtCursor
ExpressionField::handleEventWithText
2018-05-16 18:37:02 +02:00
Léa Saviot
0294ebc448 [escher] Fix signed/unsigned int comparison
Change-Id: I72b6dc3f46ee585814a540fc999001e113db0ea1
2018-05-16 17:34:34 +02:00
Léa Saviot
99f6d73e19 [apps/code] Put cursor inside parentheses when inserting function
In Code::VariableBoxController.

Change-Id: Ib129781d46159c017bcb02e97c6667b6084f5b67
2018-05-16 16:00:24 +02:00
Léa Saviot
ea8bd568bf [apps/escher] Fix ExprFieldDelegateApp::exprLayoutFieldDidReceiveEvent
Fix the buffer size and check the length of the serialized expression

Change-Id: I7d53365313c0e0307db3393d46537d35ed799b3b
2018-05-16 15:56:13 +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
bb8ab2a42e Merge branch 'saisie-jolie' into master-merge-saisie-jolie 2018-05-16 11:28:07 +02:00
Léa Saviot
40d9fc4c42 [escher] Fix signed/unsigned comparison warning
Change-Id: I3278e2e1a951475f96adae4f0c6ba6b6b52a170e
2018-05-16 11:22:47 +02:00
Émilie Feral
dcf1e7d8a2 [escher] Fix transparent view: absolute origin can be undefined
(because superviews have not been filled yet). Rather use m_frame.
2018-05-16 10:01:38 +02:00
Émilie Feral
33ad49789b [escher][apps] Make View using blendRectWithMask without background
inherit from TransparentView
2018-05-15 17:24:27 +02:00
Émilie Feral
6f08a77cac [escher] create TransparentView 2018-05-15 17:24:27 +02:00
Léa Saviot
48d1d248ea [poincare] Fix cursor position in 2D when inserting "random()"
Change-Id: I3851e79cd7b0a1f2b1b13c4cf7c604ad0d95d6d3
2018-05-15 11:03:07 +02:00
Léa Saviot
678a0db4e4 Merge with current GitHub master branch
Change-Id: Ie1b83cfabdee1369eb66f53c01314324d5d88a74
2018-05-14 17:03:12 +02:00
Léa Saviot
9a94cbe934 [poincare] Scroll to show whole layout inserted from toolbox
Change-Id: If3e39659bdfc36b5e52a29845dfd213424233ab4
2018-05-14 16:57:08 +02:00
Léa Saviot
2f55660ce4 [escher] Fix addding Grey Squares when adding matrix from toolbox
Change-Id: Ie96122033de7ae80ddf5378f0f3fe07d52c3453e
2018-05-14 15:14:30 +02:00
Léa Saviot
de799a1323 [escher] Remove superfluous code
Change-Id: I5d0718195592c6223795c94069da7a3c345b242d
2018-05-14 14:58:57 +02:00
Émilie Feral
203311f81b [escher] Fix reading garbage memory in TextField 2018-05-14 13:38:28 +02:00
Émilie Feral
db38f027d4 [poincare] Fix memory leak: parsed expression must be delete 2018-05-11 17:58:18 +02:00
Romain Goyet
daee2998c5 [escher] Add a ScrollViewDelegate 2018-05-09 17:46:09 +02:00
Léa Saviot
30007a3574 [poincare] Handle Matrix GreySquares on ShiftLeft/Right events.
Change-Id: Id0b0b6c99c683808d3b21123e208da8b6e8e1175
2018-05-09 13:43:00 +02:00
Léa Saviot
0ea3d488f1 [escher] Clean code in expression_layout_field.cpp
Change-Id: I80a7d8445209efece8c0f293d5761b04d087b884
2018-05-09 11:12:30 +02:00
Léa Saviot
d56f94224f [escher] Fix cursor position when copy pasting in ELField
Change-Id: I7408e89ceb6ef6e7bce7e47dc6b3d2a4945cfdbf
2018-05-09 11:10:35 +02:00
Léa Saviot
7b6fdf6a1c [escher] Fix ScrollableView content view size.
Change-Id: I531236e7527b3922dac81067d41024e0c5d6bf88
2018-05-08 17:32:55 +02:00
Léa Saviot
3aeb5b9eef [poincare] Fix Layout Field vertical margins.
Change-Id: I36c90574aca915d0f1cb803948b8c85cd28852ab
2018-05-08 16:24:13 +02:00
Léa Saviot
2fd332fba5 [poincare] Fix background fill in ExpressionField.
Change-Id: If12a043525cafe7b98015df88ad144057a5ffdcb
2018-05-08 15:43:41 +02:00
Léa Saviot
3b582a2e46 Merge branch 'SaisieJolie30Apr' into SaisieJolie8May
Change-Id: Ia4196119fc56c5bc3423aea752b49f3f7ba39499
2018-05-08 15:17:51 +02:00