Commit Graph

23 Commits

Author SHA1 Message Date
Émilie Feral
9eb672bb5f [apps/shared] Fix
ExpressionFieldDelegateApp::layoutFieldDidReceiveEvent

Layouts have two potential serializations. For example,
HorizontalLayout(CharLayout(2), CharLayout(a)) can be serialized as:
"2a" and "2*a". In layoutFieldDidReceiveEvent, we want to check that the
longest serialisation is bounded by maxBufferSize. (We could have used
Layout::serializeParsedExpression but we don't to avoid parsing the
expression twice)
2019-03-11 13:20:08 +01:00
Romain Goyet
4f2c7a3763 [build] Update the i18n processing to fit the out-of-tree build 2019-03-06 15:00:59 +01:00
Léa Saviot
94603b2b7d [poincare] Layout::serialize is serializeForParsing or ParsedExpression
serializeForParsing serializes the layout once,
serializeParsedExpression serializes the layout, parses it and
serializes it again.
2018-11-23 12:04:09 +01:00
Léa Saviot
f5586b3d36 [apps] Clean the syntax error warning displaying 2018-11-23 12:04:09 +01:00
Léa Saviot
f6804c2d67 [apps] Use ExpressionFieldDelegateApp methods in Calculation::App
For methods textFieldDidReceiveEvent and layoutFieldDidReceiveEvent
2018-11-23 12:04:08 +01:00
Léa Saviot
fbe4c14d0d [apps] Prevent function defined as a store
For instance, from the Graph application, one should not be able to
defined f(x) as 3->g(x)
2018-11-23 12:04:04 +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
Émilie Feral
7778c694d1 [escher] Create an InputEventHandlerDelegate that gives the toolbox to
be used by an InputEventHandler
2018-11-23 12:04:02 +01:00
Émilie Feral
3a3a17b3ce [shared] Factorize ExpressionFieldDelegateApp and TextFieldDelegateApp 2018-11-23 12:03:59 +01:00
Émilie Feral
cf68a9ed18 [shared] Change TextFieldDelegateApp::XNT() signature 2018-11-23 12:03:59 +01:00
Émilie Feral
a93e9566ad [escher] Create a parent class Field of TextField and
LayoutField
2018-11-23 12:03:59 +01:00
Émilie Feral
cb900d9560 [shared] Factorize code between ExpressionFieldDelegateApp and
TextFieldDelegateApp
2018-11-23 12:03:59 +01:00
Léa Saviot
71c807b565 [poincare] Node->isDefined becomes !Node->isUninitialized 2018-08-14 16:40:12 +02:00
Émilie Feral
17e63a5b07 [shared] Fix references to Poincare 2018-08-10 13:18:46 +02:00
Émilie Feral
aaa20a58fa [poincare] Implement SerializationHelper and
SerializationHelperInterface. WriteTextInBuffer->serialize
2018-08-08 15:31:40 +02:00
Léa Saviot
880c3e59de [poincare] Continue removing layouts 2018-07-03 18:29:08 +02:00
Léa Saviot
416a45c11b [apps/shared] Fix buffer size initialization 2018-06-12 15:09:06 +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
Léa Saviot
a27963597b [apps] More generic VariableBoxController methods
Before, the class differentiated between TextField and
ExpressionLayoutField

Change-Id: I1fce8bb650a0bfccb11ddf61d05335e452374abb
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
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
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