You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2017/03/16 12:23:11 UTC
[1/2] git commit: [flex-asjs] [refs/heads/develop] - Initial commit
of Text
Repository: flex-asjs
Updated Branches:
refs/heads/develop 2695a9184 -> a77bfe4f2
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Kerning.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Kerning.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Kerning.as
new file mode 100644
index 0000000..b94f67f
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Kerning.as
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class Kerning
+ {
+ public static const AUTO : String = "auto";
+ public static const OFF : String = "off";
+ public static const ON : String = "on";
+
+ public function Kerning()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/LigatureLevel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/LigatureLevel.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/LigatureLevel.as
new file mode 100644
index 0000000..2b20969
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/LigatureLevel.as
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class LigatureLevel
+ {
+ public static const COMMON : String = "common";
+ public static const EXOTIC : String = "exotic";
+ public static const MINIMUM : String = "minimum";
+ public static const NONE : String = "none";
+ public static const UNCOMMON : String = "uncommon";
+ public function LigatureLevel()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/LineJustification.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/LineJustification.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/LineJustification.as
new file mode 100644
index 0000000..3d4e189
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/LineJustification.as
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class LineJustification
+ {
+ public static const ALL_BUT_LAST : String = "allButLast";
+ public static const ALL_BUT_MANDATORY_BREAK : String = "allButMandatoryBreak";
+ public static const ALL_INCLUDING_LAST : String = "allIncludingLast";
+ public static const UNJUSTIFIED : String = "unjustified";
+ public function LineJustification()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/RenderingMode.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/RenderingMode.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/RenderingMode.as
new file mode 100644
index 0000000..edfb179
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/RenderingMode.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class RenderingMode
+ {
+ //Probably don't need...
+ public static const CFF : String = "cff";
+ public static const NORMAL : String = "normal";
+ public function RenderingMode()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/SpaceJustifier.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/SpaceJustifier.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/SpaceJustifier.as
new file mode 100644
index 0000000..9ea7773
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/SpaceJustifier.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.text.engine.TextJustifier;
+ import org.apache.flex.text.engine.SpaceJustifier;
+
+ public class SpaceJustifier extends TextJustifier
+ {
+ public function SpaceJustifier(locale:String = "en", lineJustification:String = "unjustified", letterSpacing:Boolean = false)
+ {
+ this.letterSpacing = letterSpacing;
+ super(locale, lineJustification);
+ }
+
+ override public function clone():TextJustifier
+ {
+ var retVal:SpaceJustifier = new SpaceJustifier(locale, lineJustification);
+ retVal.letterSpacing = letterSpacing;
+ retVal.maximumSpacing = maximumSpacing;
+ retVal.minimumSpacing = minimumSpacing;
+ retVal.optimumSpacing = optimumSpacing;
+ return retVal;
+ }
+ public var letterSpacing : Boolean;
+ public var maximumSpacing : Number;
+ public var minimumSpacing : Number;
+ public var optimumSpacing : Number;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TabAlignment.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TabAlignment.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TabAlignment.as
new file mode 100644
index 0000000..beb7737
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TabAlignment.as
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class TabAlignment
+ {
+ public static const CENTER : String = "center";
+ public static const DECIMAL : String = "decimal";
+ public static const END : String = "end";
+ public static const START : String = "start";
+ public function TabAlignment()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TabStop.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TabStop.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TabStop.as
new file mode 100644
index 0000000..3c82e05
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TabStop.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class TabStop
+ {
+ public function TabStop(alignment:String = "start", position:Number = 0, decimalAlignmentToken:String = "")
+ {
+ this.alignment = alignment;
+ this.position = position;
+ this.decimalAlignmentToken = decimalAlignmentToken;
+ }
+
+ public var alignment : String;
+ public var decimalAlignmentToken : String;
+ public var position : Number;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextBaseline.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextBaseline.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextBaseline.as
new file mode 100644
index 0000000..ac1ca5c
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextBaseline.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class TextBaseline
+ {
+ public static const ASCENT : String = "ascent";
+ public static const DESCENT : String = "descent";
+ public static const IDEOGRAPHIC_BOTTOM : String = "ideographicBottom";
+ public static const IDEOGRAPHIC_CENTER : String = "ideographicCenter";
+ public static const IDEOGRAPHIC_TOP : String = "ideographicTop";
+ public static const ROMAN : String = "roman";
+ public static const USE_DOMINANT_BASELINE : String = "useDominantBaseline";
+ public function TextBaseline()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextElement.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextElement.as
new file mode 100644
index 0000000..a77b40b
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextElement.as
@@ -0,0 +1,94 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.events.EventDispatcher;
+
+ public class TextElement extends ContentElement
+ {
+ public function TextElement(text:String = null, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0")
+ {
+ this.text = text;
+ super(elementFormat, eventMirror, textRotation);
+ }
+ private var _text:String;
+ override public function get text():String
+ {
+ return _text;
+ }
+ public function set text(value:String):void
+ {
+ _text = value;
+ resetGlyphs();
+ }
+
+ override public function get rawText():String
+ {
+ return _text;
+ }
+ override public function set elementFormat(value:ElementFormat):void
+ {
+ super.elementFormat = value;
+ resetGlyphs();
+ }
+ private function resetGlyphs():void
+ {
+ if(glyphs)
+ glyphs = null;
+ lastComposed = -1;
+ }
+
+ private function resetText():void
+ {
+ if(words)
+ words = null;
+ }
+ public function replaceText(beginIndex:int, endIndex:int, newText:String):void
+ {
+ var b:String = _text.substring(0,beginIndex);
+ var e:String = _text.substring(endIndex);
+ _text = b + newText + e;
+ resetGlyphs();
+ resetText();
+ }
+
+ /**
+ * @private This is for the Text Engine to store internal glyph data as the text is being composed.
+ * This should not be used by client code. The text engine should clean up after itself.
+ */
+ public var glyphs:Array;
+
+ /**
+ * @private To track which glyph we broke the text on
+ */
+ public var lastComposed:int = -1;
+
+ /**
+ * @private
+ */
+ public var words:Array;
+
+ /**
+ * @private
+ */
+ public var wordWidths:Array;
+
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextEngine.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextEngine.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextEngine.as
new file mode 100644
index 0000000..921e154
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextEngine.as
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.text.engine.ITextFactory;
+
+ public class TextEngine
+ {
+ public static var textFactory:ITextFactory;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextJustifier.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextJustifier.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextJustifier.as
new file mode 100644
index 0000000..003f5e7
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextJustifier.as
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.text.engine.TextJustifier;
+
+ public class TextJustifier
+ {
+ public function TextJustifier(locale:String, lineJustification:String)
+ {
+ _locale = locale;
+ this.lineJustification = lineJustification;
+ }
+ public var lineJustification : String;
+ private var _locale:String;
+ public function get locale(): String
+ {
+ return _locale;
+ }
+ public function clone():TextJustifier
+ {
+ return new TextJustifier(locale,lineJustification);
+ }
+ public static function getJustifierForLocale(locale:String):TextJustifier
+ {
+ return new TextJustifier(locale,LineJustification.UNJUSTIFIED);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineCreationResult.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineCreationResult.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineCreationResult.as
new file mode 100644
index 0000000..1006451
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineCreationResult.as
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class TextLineCreationResult
+ {
+ public static const COMPLETE : String = "complete";
+ public static const EMERGENCY : String = "emergency";
+ public static const INSUFFICIENT_WIDTH : String = "insufficientWidth";
+ public static const SUCCESS : String = "success";
+ public function TextLineCreationResult()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineMirrorRegion.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineMirrorRegion.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineMirrorRegion.as
new file mode 100644
index 0000000..3c4a10a
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineMirrorRegion.as
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.geom.Rectangle;
+ import org.apache.flex.events.EventDispatcher;
+
+ public class TextLineMirrorRegion
+ {
+ public function TextLineMirrorRegion()
+ {
+ }
+
+ public function get bounds():Rectangle
+ {
+ return null;
+ }
+ public function get element():ContentElement
+ {
+ return null;
+ }
+ public function get mirror():EventDispatcher
+ {
+ return null;
+ }
+ public function get nextRegion():TextLineMirrorRegion
+ {
+ return null;
+ }
+ public function get previousRegion():TextLineMirrorRegion
+ {
+ return null;
+ }
+ public function get textLine():ITextLine
+ {
+ return null;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineValidity.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineValidity.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineValidity.as
new file mode 100644
index 0000000..4adaab5
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextLineValidity.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class TextLineValidity
+ {
+ public static const INVALID : String = "invalid";
+ public static const POSSIBLY_INVALID : String = "possiblyInvalid";
+ public static const STATIC : String = "static";
+ public static const VALID : String = "valid";
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextRotation.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextRotation.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextRotation.as
new file mode 100644
index 0000000..d38c391
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TextRotation.as
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class TextRotation
+ {
+ public static const AUTO : String = "auto";
+ public static const ROTATE_0 : String = "rotate0";
+ public static const ROTATE_180 : String = "rotate180";
+ public static const ROTATE_270 : String = "rotate270";
+ public static const ROTATE_90 : String = "rotate90";
+ public function TextRotation()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TypographicCase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TypographicCase.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TypographicCase.as
new file mode 100644
index 0000000..71dc953
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/TypographicCase.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class TypographicCase
+ {
+ public static const CAPS : String = "caps";
+ public static const CAPS_AND_SMALL_CAPS : String = "capsAndSmallCaps";
+ public static const DEFAULT : String = "default";
+ public static const LOWERCASE : String = "lowercase";
+ public static const SMALL_CAPS : String = "smallCaps";
+ public static const TITLE : String = "title";
+ public static const UPPERCASE : String = "uppercase";
+ public function TypographicCase()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/events/IMEEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/events/IMEEvent.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/events/IMEEvent.as
new file mode 100644
index 0000000..7569ba9
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/events/IMEEvent.as
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.events
+{
+ import org.apache.flex.events.IFlexJSEvent;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.text.ime.IIMEClient;
+
+ public class IMEEvent extends Event
+ {
+ public static const IME_COMPOSITION : String = "imeComposition";
+ public static const IME_START_COMPOSITION : String = "imeStartComposition";
+ public var text:String;
+ public var imeClient:IIMEClient;
+ public function IMEEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", imeClient:IIMEClient = null)
+ {
+ this.text = text;
+ this.imeClient = imeClient;
+ super(type, bubbles, cancelable);
+ }
+ /**
+ * Create a copy/clone of the Event object.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function cloneEvent():IFlexJSEvent
+ {
+ return new IMEEvent(type, bubbles, cancelable, text, imeClient);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/events/TextEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/events/TextEvent.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/events/TextEvent.as
new file mode 100644
index 0000000..7a45ae1
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/events/TextEvent.as
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.events
+{
+ import org.apache.flex.events.IFlexJSEvent;
+ import org.apache.flex.events.Event;
+
+ /**
+ * A TextLayoutEvent instance represents an event, such as the
+ * <code>TextLayoutEvent.SCROLL</code> event, that does not require
+ * custom properties.
+ * <p>A scroll event is represented by a TextLayoutEvent instance with its
+ * <code>type</code> property set to <code>TextLayoutEvent.SCROLL</code>.
+ * A class specifically for scroll events is not necessary because there are
+ * no custom properties for a scroll event, as there are for the other
+ * events that have specific event classes.
+ * If a new text layout event is needed, and the event does not require
+ * custom properties, the new event will also be represented by a
+ * TextLayoutEvent object, but with its <code>type</code> property
+ * set to a new static constant.
+ * </p>
+ *
+ * @includeExample examples\TextLayoutEvent_example.as -noswf
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @langversion 3.0
+ */
+ public class TextEvent extends Event
+ {
+ public static const LINK : String = "link";
+ public static const TEXT_INPUT : String = "textInput";
+
+ public function TextEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, text:String = "")
+ {
+ this.text = text;
+ super(type, bubbles, cancelable);
+ }
+ public var text:String;
+
+ /** @private */
+ override public function cloneEvent():IFlexJSEvent
+ {
+ return new TextEvent(type, bubbles, cancelable, text);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextBlock.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextBlock.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextBlock.as
new file mode 100644
index 0000000..9d2f491
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextBlock.as
@@ -0,0 +1,220 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.html
+{
+ import org.apache.flex.text.engine.ContentElement;
+ import org.apache.flex.text.engine.FontDescription;
+ import org.apache.flex.text.engine.ITextBlock;
+ import org.apache.flex.text.engine.ITextLine;
+ import org.apache.flex.text.engine.TabStop;
+ import org.apache.flex.text.engine.TextJustifier;
+ import org.apache.flex.text.engine.ITextFactory;
+
+ public class TextBlock implements ITextBlock
+ {
+ public function TextBlock(factory:ITextFactory)
+ {
+ _textFactory = factory;
+ }
+ private var _textFactory:ITextFactory;
+ public function get textFactory():ITextFactory
+ {
+ return _textFactory;
+ }
+ private var _applyNonLinearFontScaling:Boolean;
+ public function get applyNonLinearFontScaling():Boolean
+ {
+ return _applyNonLinearFontScaling;
+ }
+ public function set applyNonLinearFontScaling(value:Boolean):void
+ {
+ _applyNonLinearFontScaling = value;
+ }
+
+ private var _baselineFontDescription:FontDescription;
+ public function get baselineFontDescription():FontDescription
+ {
+ return _baselineFontDescription;
+ }
+ public function set baselineFontDescription(value:FontDescription):void
+ {
+ _baselineFontDescription = value;
+ }
+ private var _baselineFontSize:Number = 0;
+ public function get baselineFontSize():Number
+ {
+ return _baselineFontSize;
+ }
+ public function set baselineFontSize(value:Number):void
+ {
+ _baselineFontSize = value;
+ }
+
+ private var _baselineZero:String;
+ public function get baselineZero():String
+ {
+ return _baselineZero;
+ }
+ public function set baselineZero(value:String):void
+ {
+ _baselineZero = value;
+ }
+
+ private var _bidiLevel:int;
+ public function get bidiLevel():int
+ {
+ return _bidiLevel;
+ }
+ public function set bidiLevel(value:int):void
+ {
+ _bidiLevel = value;
+ }
+
+ private var _content:ContentElement;
+ public function get content():ContentElement
+ {
+ return _content;
+ }
+ public function set content(value:ContentElement):void
+ {
+ _content = value;
+ }
+
+ private var _firstInvalidLine:ITextLine;
+ public function get firstInvalidLine():ITextLine
+ {
+ return _firstInvalidLine;
+ }
+ public function set firstInvalidLine(value:ITextLine):void
+ {
+ _firstInvalidLine = value;
+ }
+
+ private var _firstLine:ITextLine;
+ public function get firstLine():ITextLine
+ {
+ return _firstLine;
+ }
+ public function set firstLine(value:ITextLine):void
+ {
+ _firstLine = value;
+ }
+
+ private var _lastLine:ITextLine;
+ public function get lastLine():ITextLine
+ {
+ return _lastLine;
+ }
+ public function set lastLine(value:ITextLine):void
+ {
+ _lastLine = value;
+ }
+
+ private var _lineRotation:String;
+ public function get lineRotation():String
+ {
+ return _lineRotation;
+ }
+ public function set lineRotation(value:String):void
+ {
+ _lineRotation = value;
+ }
+
+ private var _tabStops:Vector.<TabStop>;
+ public function get tabStops():Vector.<TabStop>
+ {
+ return _tabStops;
+ }
+ public function set tabStops(value:Vector.<TabStop>):void
+ {
+ _tabStops = value;
+ }
+
+ private var _textJustifier:TextJustifier;
+ public function get textJustifier():TextJustifier
+ {
+ return _textJustifier;
+ }
+ public function set textJustifier(value:TextJustifier):void
+ {
+ _textJustifier = value;
+ }
+
+ private var _textLineCreationResult:String;
+ public function get textLineCreationResult():String
+ {
+ return _textLineCreationResult;
+ }
+ public function set textLineCreationResult(value:String):void
+ {
+ _textLineCreationResult = value;
+ }
+
+ private var _userData:*;
+ public function get userData():*
+ {
+ return _userData;
+ }
+ public function set userData(value:*):void
+ {
+ _userData = value;
+ }
+
+ public function createTextLine(previousLine:ITextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):ITextLine
+ {
+ return null;
+ }
+ public function dump():String{
+ return null;
+ }
+ public function findNextAtomBoundary(afterCharIndex:int):int
+ {
+ return 0;
+ }
+ public function findNextWordBoundary(afterCharIndex:int):int
+ {
+ return 0;
+ }
+ public function findPreviousAtomBoundary(beforeCharIndex:int):int
+ {
+ return 0;
+ }
+ public function findPreviousWordBoundary(beforeCharIndex:int):int
+ {
+ return 0;
+ }
+ public function getTextLineAtCharIndex(charIndex:int):ITextLine
+ {
+ return null;
+ }
+ public function recreateTextLine(textLine:ITextLine, previousLine:ITextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):ITextLine
+ {
+ return null;
+ }
+ public function releaseLineCreationData():void
+ {
+ //what to do...
+ }
+ public function releaseLines(firstLine:ITextLine, lastLine:ITextLine):void
+ {
+ //TODO
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
new file mode 100644
index 0000000..fa2d5b4
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
@@ -0,0 +1,273 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.html
+{
+ import org.apache.flex.text.engine.ITextLine;
+ import org.apache.flex.text.engine.ITextBlock;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.geom.Rectangle;
+ import org.apache.flex.core.UIBase;
+
+ public class TextLine extends UIBase implements ITextLine
+ {
+ public function TextLine()
+ {
+ }
+ public function get ascent():Number
+ {
+ return 0;
+ }
+
+ public function get atomCount():int
+ {
+ return 0;
+ }
+
+ public function get blendMode():String
+ {
+ return null;
+ }
+
+ public function get cacheAsBitmap():Boolean
+ {
+ return false;
+ }
+
+ public function get descent():Number
+ {
+ return 0;
+ }
+
+ private var _doubleClickEnabled:Boolean;
+ public function get doubleClickEnabled():Boolean
+ {
+ return _doubleClickEnabled;
+ }
+ public function set doubleClickEnabled(value:Boolean):void
+ {
+ _doubleClickEnabled = value;
+ }
+
+
+ public function get hasGraphicElement():Boolean
+ {
+ return false;
+ }
+
+ public function get hasTabs():Boolean
+ {
+ return false;
+ }
+
+ public function get metaData():Object
+ {
+ return null;
+ }
+
+ public function get nextLine():ITextLine
+ {
+ return null;
+ }
+
+ public function get previousLine():ITextLine
+ {
+ return null;
+ }
+
+ public function get rawTextLength():int
+ {
+ return 0;
+ }
+
+ public function get specifiedWidth():Number
+ {
+ return 0;
+ }
+
+ public function get textBlock():ITextBlock
+ {
+ return null;
+ }
+
+ public function get textBlockBeginIndex():int
+ {
+ return 0;
+ }
+
+ public function get textHeight():Number
+ {
+ return 0;
+ }
+
+ public function get textWidth():Number
+ {
+ return 0;
+ }
+
+ public function get totalAscent():Number
+ {
+ return 0;
+ }
+
+ public function get totalDescent():Number
+ {
+ return 0;
+ }
+
+ public function get totalHeight():Number
+ {
+ return 0;
+ }
+
+ public function get unjustifiedTextWidth():Number
+ {
+ return 0;
+ }
+
+ private var _userData:*;
+ public function get userData():*
+ {
+ return _userData;
+ }
+ public function set userData(value:*):void
+ {
+ _userData = value;
+ }
+
+ private var _validity:String;
+ public function get validity():String
+ {
+ return _validity;
+ }
+ public function set validity(value:String):void
+ {
+ _validity = value;
+ }
+
+ /**
+ * Not sure if we need this.
+ */
+ public function dump():String
+ {
+ return "";
+ }
+
+ /**
+ * Gets the bidirectional level of the atom at the specified index.
+ * The FTE system seems to make no sense. Here's the "explanation":
+ *
+ * Gets the bidirectional level of the atom at the specified index. Determined by a combination of TextBlock.bidiLevel
+ * and the Unicode bidirectional properties of the characters that form the line.
+ *
+ * For example, if you start a text block with some Hebrew text, you set TextBlock.bidiLevel to 1, establishing a default of right to left.
+ * If within the text you have a quote in English (left to right), that text has an AtomBidiLevel of 2.
+ * If within the English you have a bit of Arabic (right to left), AtomBidiLevel for that run goes to 3.
+ * If within the Arabic a number (left to right) occurs, the AtomBidiLevel setting for the number is 4.
+ * It does not matter in which line the atoms end up; the Hebrew atoms are AtomBidiLevel 1,
+ * the English atoms are AtomBidiLevel 2, Arabic atoms are AtomBidiLevel 3, and the number atoms are AtomBidiLevel 4.
+ *
+ * After further research. it seems like it's being faithful to the unicode spec which allows up 125 levels of bidi nesting.
+ * Full details here: http://www.unicode.org/reports/tr9/
+ * I'm not sure why this is important from a client perspective. Maybe to properly handle cursor management?
+ * Either way, using it is pretty straight-forward: level % 2 should be 0 for ltr and 1 for rtl.
+ */
+ public function getAtomBidiLevel(atomIndex:int):int
+ {
+ //TODO implement bidi
+ return 0;
+ }
+
+ public function getAtomBounds(atomIndex:int):Rectangle
+ {
+ return null;
+ }
+
+ public function getAtomCenter(atomIndex:int):Number
+ {
+ var bounds:Rectangle = getAtomBounds(atomIndex);
+ return bounds.left + (bounds.right - bounds.left);
+ }
+
+ public function getAtomGraphic(atomIndex:int):IUIBase
+ {
+ //TODO implement embedded graphics
+ return null;
+ }
+
+ public function getAtomIndexAtCharIndex(charIndex:int):int
+ {
+ //TODO track indexes...
+ return 0;
+ }
+
+ public function getAtomIndexAtPoint(stageX:Number, stageY:Number):int
+ {
+ //TODO atom locations. This one will be fun...
+ return 0;
+ }
+
+ public function getAtomTextBlockBeginIndex(atomIndex:int):int
+ {
+ //TODO track indexes...
+ return 0;
+ }
+
+ public function getAtomTextBlockEndIndex(atomIndex:int):int
+ {
+ //TODO track indexes...
+ return 0;
+ }
+
+ public function getAtomTextRotation(atomIndex:int):String
+ {
+ //TODO returns TextRotation values.
+ return "rotate0";
+ }
+
+ public function getAtomWordBoundaryOnLeft(atomIndex:int):Boolean
+ {
+ //TODO we need to track word boundaries
+ return false;
+ }
+
+ public function getBaselinePosition(baseline:String):Number
+ {
+ //TODO baseline is one of TextBaseline, but I'm not sure what the correct value is
+ switch(baseline){
+ case "ascent":
+ break;
+ case "descent":
+ break;
+ case "ideographicBottom":
+ break;
+ case "ideographicCenter":
+ break;
+ case "ideographicTop":
+ break;
+ case "roman":
+ break;
+ case "useDominantBaseline":
+ break;
+ default:
+ throw new Error("Invalid argument");
+ }
+ return 0;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/CompositionAttributeRange.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/CompositionAttributeRange.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/CompositionAttributeRange.as
new file mode 100644
index 0000000..300bf67
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/CompositionAttributeRange.as
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.ime
+{
+
+//
+// CompositionAttributeRange
+//
+
+/**
+* The CompositionAttributeRange class represents a range of composition attributes for use with IME events.
+* For example, when editing text in the IME, the text is divided by the IME into composition ranges.
+* These composition ranges are flagged as selected (i.e. currently being lengthened, shortened, or edited),
+* and/or converted (i.e. they have made one pass through the IME dictionary lookup already).
+*
+* <p>By convention, the client should adorn these composition ranges with underlining or hiliting according to
+* the flags.</p>
+*
+* <p>For example:</p>
+* <listing>
+* !converted = thick gray underline (raw text)
+* !selected && converted = thin black underline
+* selected && converted = thick black underline
+* </listing>
+* @playerversion Flash 10.1
+ * @playerversion AIR 1.5
+* @langversion 3.0
+*/
+public final class CompositionAttributeRange
+{
+ /**
+ * The relative start from the beginning of the inline edit session
+ * i.e. 0 = the start of the text the IME can see (there may be text
+ * before that in the edit field)
+ *
+ * @helpid
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ *
+ */
+ public var relativeStart:int;
+
+ /**
+ * The relative end of the composition clause, relative to the beginning
+ * of the inline edit session.
+ * i.e. 0 = the start of the text the IME can see (there may be text
+ * before that in the edit field)
+ *
+ * @helpid
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ *
+ */
+ public var relativeEnd:int;
+
+ /**
+ * The selected flag, meaning this composition clause is active and
+ * being lengthened or shortened or edited with the IME, and the neighboring
+ * clauses are not.
+ *
+ * @helpid
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ *
+ */
+ public var selected:Boolean;
+
+ /**
+ * The converted flag, meaning this clause has been processed by the IME
+ * and is awaiting acceptance/confirmation by the user
+ *
+ * @helpid
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ *
+ */
+ public var converted:Boolean;
+
+ // Constructor
+ /**
+ * Creates a CompositionAttributeRange object.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ *
+ * @param relativeStart The zero based index of the first character included in the character range.
+ * @param relativeEnd The zero based index of the last character included in the character range.
+ * @param selected The selected flag
+ * @param converted The converted flag
+ *
+ * @tiptext Constructor for CompositionAttributeRange objects.
+ */
+ public function CompositionAttributeRange(relativeStart:int, relativeEnd:int, selected:Boolean, converted:Boolean)
+ {
+ this.relativeStart = relativeStart;
+ this.relativeEnd = relativeEnd;
+ this.selected = selected;
+ this.converted = converted;
+ }
+} // end of class
+} // end of package
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IIMEClient.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IIMEClient.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IIMEClient.as
new file mode 100644
index 0000000..7bd307b
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IIMEClient.as
@@ -0,0 +1,186 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.ime
+{
+
+ import org.apache.flex.geom.Rectangle;
+
+ //
+ // IIMEClient
+ //
+ /**
+ * Dispatched when the user begins to use an IME (input method editor).
+ * @eventType org.apache.flex.events.IMEEvent.IME_START_COMPOSITION
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @langversion 3.0
+ */
+// [Event(name="imeStartComposition", type="org.apache.flex.text.events.IMEEvent.IME_START_COMPOSITION")]
+
+ /**
+ * Dispatched when the user enters text. For IME (input method editor) clients, the receiver should
+ * insert the string contained in the event object's <code>text</code> property at the current insertion point.
+ * @eventType org.apache.flex.events.TextEvent.TEXT_INPUT
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @langversion 3.0
+ */
+// [Event(name="textInput", type="org.apache.flex.text.events.TextEvent.TEXT_INPUT")]
+
+ /**
+ * Interface for IME (input method editor) clients. Components based on the org.apache.flex.text.engine package must implement
+ * this interface to support editing text inline using an IME. This interface is not used with TextField objects.
+ * TextLayoutFramework (TLF) uses this interface to support inline IME, so clients using TLF do not need to implement this
+ * interface.
+ * <p>To support inline IME, set the <code>imeClient</code> property of an <code>ImeEvent.IME_START_COMPOSITION</code> event to
+ * an object which implements this interface.</p>
+ *
+ * @see org.apache.flex.text.ime.CompositionAttributeRange
+ * @see org.apache.flex.events.ImeEvent:imeClient
+ *
+ * @playerversion Flash 10.1
+ * @playerversion AIR 1.5
+ * @langversion 3.0
+ */
+ public interface IIMEClient
+ {
+ /**
+ * Callback for updating the contents of the inline editing session.
+ * This gets called whenever the text being edited with the IME has changed
+ * and its contents are used by the client to redraw the entire inline edit session.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ *
+ * @param text contains the text of the inline edit session from the IME
+ * @param attributes contains an array of composition clauses with adornment info
+ * @param relativeSelectionStart start of the inline session relative to the start of the text object
+ * @param relativeSelectionEnd end of the inline session relative to the start of the text object
+ */
+ function updateComposition(text:String, attributes:Vector.<CompositionAttributeRange>,
+ compositionStartIndex:int, compositionEndIndex:int):void;
+
+ /**
+ * Use this callback to end the inline editing session and confirm the text.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ *
+ * @param text the final state of the text in the inline session (the text that got confirmed).
+ * @param preserveSelection when true, you should not reset the current selection to the end of the confirmed text.
+ */
+ function confirmComposition(text:String = null, preserveSelection:Boolean = false):void;
+
+ /**
+ * This callback is used by the IME to query the bounding box of the text being edited with the IME client.
+ * Use this method to place the candidate window and set the mouse cursor in the IME client when the mouse is over the
+ * text field or other component that supports IME.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ *
+ * @param startIndex an integer that specifies the starting location of the range of text for which you need to measure the bounding box.
+ * @param endIndex Optional; an integer that specifies the ending location of the range of text for which you need to measure the bounding box.
+ *
+ * @return the bounding box of the specified range of text, or <code>null</code> if either or both of the indexes are invalid.
+ * The same value should be returned independant of whether <code>startIndex</code> is greater or less than <code>endIndex</code>.
+ */
+ function getTextBounds(startIndex:int, endIndex:int):Rectangle;
+
+ /**
+ * The zero-based character index value of the start of the current edit session text (i.e.
+ * all text in the inline session that is still not yet confirmed to the document).
+ *
+ * @return the index of the first character of the composition, or <code>-1</code> if there is no active composition.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ */
+ function get compositionStartIndex():int;
+
+ /**
+ * The zero-based character index value of the end of the current edit session text (i.e.
+ * all text in the inline session that is still not yet confirmed to the document).
+ *
+ * @return the index of the last character of the composition, or <code>-1</code> if there is no active composition.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ */
+ function get compositionEndIndex():int;
+
+ /**
+ * Indicates whether the text in the component is vertical or not. This will affect the positioning
+ * of the candidate window (beside vertical text, below horizontal text).
+ *
+ * @return <code>true</code> if the text is vertical, otherwise false.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ */
+ function get verticalTextLayout():Boolean;
+
+ /**
+ * The zero-based character index value of the first character in the current selection.
+ *
+ * @return the index of the character at the anchor end of the selection, or <code>-1</code> if no text is selected.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ */
+ function get selectionAnchorIndex():int;
+
+ /**
+ * The zero-based character index value of the last character in the current selection.
+ *
+ * @return the index of the character at the active end of the selection, or <code>-1</code> if no text is selected.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ */
+ function get selectionActiveIndex():int;
+
+ /**
+ * Sets the range of selected text in the component.
+ * If either of the arguments is out of bounds the selection should not be changed.
+ *
+ * @param anchorIndex The zero-based index value of the character at the anchor end of the selection
+ * @param activeIndex The zero-based index value of the character at the active end of the selection.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ */
+ function selectRange(anchorIndex:int, activeIndex:int):void;
+
+ /**
+ * Gets the specified range of text from the component. This method is called during IME reconversion.
+ *
+ * @param startIndex an integer that specifies the starting location of the range of text to be retrieved.
+ * @param endIndex an integer that specifies the ending location of the range of text to be retrieved.
+ *
+ * @return The requested text, or <code>null</code> if no text is available in the requested range
+ * or if either or both of the indexes are invalid. The same value should be returned
+ * independant of whether <code>startIndex</code> is greater or less than <code>endIndex</code>.
+ *
+ * @playerversion Flash 10.1
+ * @langversion 3.0
+ */
+ function getTextInRange(startIndex:int, endIndex:int):String;
+ } // end of class
+} // end of package
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IIMESupport.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IIMESupport.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IIMESupport.as
new file mode 100644
index 0000000..9194bee
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IIMESupport.as
@@ -0,0 +1,86 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.ime
+{
+
+/**
+ * The IIMESupport interface defines the interface for any component that supports IME
+ * (input method editor).
+ * IME is used for entering characters in Chinese, Japanese, and Korean.
+ *
+ * @see org.apache.flex.text.ime.IME
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+public interface IIMESupport
+{
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // enableIME
+ //----------------------------------
+
+ /**
+ * Specifies whether the IME should be enabled when
+ * this component has focus. Even if a component
+ * uses the IME, it may not in all configurations.
+ * For example, TextArea will set enableIME to false
+ * if its <code>editable</code> is <code>false</code> since no
+ * input is allowed in that configuration. Similarly
+ * DataGrid always sets enableIME to false. If
+ * the DataGrid puts up an ItemEditor, its editor
+ * will have <code>enableIME</code> set to <code>true</code>.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get enableIME():Boolean;
+
+ //----------------------------------
+ // imeMode
+ //----------------------------------
+
+ /**
+ * The IME mode of the component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get imeMode():String;
+
+ /**
+ * @private
+ */
+ function set imeMode(value:String):void;
+
+
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IME.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IME.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IME.as
new file mode 100644
index 0000000..6439221
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IME.as
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.ime
+{
+ public class IME
+ {
+ public static var conversionMode : String;
+ public static var enabled : Boolean;
+ public static var isSupported : Boolean;
+
+
+ public static function compositionAbandoned():void
+ {
+
+ }
+ public static function compositionSelectionChanged(start:int, end:int):void
+ {
+
+ }
+ public static function doConversion():void
+ {
+
+ }
+ public static function setCompositionString(composition:String):void
+ {
+
+ }
+
+ public function IME()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IMEConversionMode.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IMEConversionMode.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IMEConversionMode.as
new file mode 100644
index 0000000..a2cb581
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/ime/IMEConversionMode.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.ime
+{
+ public class IMEConversionMode
+ {
+ public static const ALPHANUMERIC_FULL : String = "ALPHANUMERIC_FULL";
+ public static const ALPHANUMERIC_HALF : String = "ALPHANUMERIC_HALF";
+ public static const CHINESE : String = "CHINESE";
+ public static const JAPANESE_HIRAGANA : String = "JAPANESE_HIRAGANA";
+ public static const JAPANESE_KATAKANA_FULL : String = "JAPANESE_KATAKANA_FULL";
+ public static const JAPANESE_KATAKANA_HALF : String = "JAPANESE_KATAKANA_HALF";
+ public static const KOREAN : String = "KOREAN";
+ public static const UNKNOWN : String = "UNKNOWN";
+
+ public function IMEConversionMode()
+ {
+
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/resources/basic-as-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/resources/basic-as-manifest.xml b/frameworks/projects/Text/src/main/resources/basic-as-manifest.xml
new file mode 100644
index 0000000..cd0f5b4
--- /dev/null
+++ b/frameworks/projects/Text/src/main/resources/basic-as-manifest.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/resources/basic-manifest.xml b/frameworks/projects/Text/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..ea6db91
--- /dev/null
+++ b/frameworks/projects/Text/src/main/resources/basic-manifest.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<componentPackage>
+ <!--<component id="Application" class="org.apache.flex.core.Application"/>-->
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/resources/defaults.css b/frameworks/projects/Text/src/main/resources/defaults.css
new file mode 100644
index 0000000..1533355
--- /dev/null
+++ b/frameworks/projects/Text/src/main/resources/defaults.css
@@ -0,0 +1,21 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+@namespace "library://ns.apache.org/flexjs/basic";
+
Re: [2/2] git commit: [flex-asjs] [refs/heads/develop] - Initial commit of Text
Posted by Harbs <ha...@gmail.com>.
FYI:
The ant build of Text should work. (Although it’s not yet functional.) I have not added this to the general build and I don’t know how to set up the maven build. I will need help with that.
The TLF project should land later today. (which will have build problems)
I realized after I committed this that I should have created a TLF branch. I will do so before my next commit.
Harbs
> On Mar 16, 2017, at 2:23 PM, harbs@apache.org wrote:
>
> Initial commit of Text
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a77bfe4f
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a77bfe4f
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a77bfe4f
>
> Branch: refs/heads/develop
> Commit: a77bfe4f23402162ab471e1923b33c127e6b1a98
> Parents: 2695a91
> Author: Harbs <ha...@in-tools.com>
> Authored: Thu Mar 16 14:23:05 2017 +0200
> Committer: Harbs <ha...@in-tools.com>
> Committed: Thu Mar 16 14:23:05 2017 +0200
>
[2/2] git commit: [flex-asjs] [refs/heads/develop] - Initial commit
of Text
Posted by ha...@apache.org.
Initial commit of Text
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a77bfe4f
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a77bfe4f
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a77bfe4f
Branch: refs/heads/develop
Commit: a77bfe4f23402162ab471e1923b33c127e6b1a98
Parents: 2695a91
Author: Harbs <ha...@in-tools.com>
Authored: Thu Mar 16 14:23:05 2017 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Mar 16 14:23:05 2017 +0200
----------------------------------------------------------------------
frameworks/js/FlexJS/projects/TextJS/build.xml | 172 ++++++++++++
.../src/main/config/compile-js-config.xml | 96 +++++++
frameworks/projects/Text/.vscode/tasks.json | 16 ++
frameworks/projects/Text/asconfig.json | 21 ++
frameworks/projects/Text/build.xml | 169 ++++++++++++
.../Text/src/main/config/compile-as-config.xml | 88 ++++++
.../projects/Text/src/main/flex/TextClasses.as | 77 ++++++
.../apache/flex/text/engine/BreakOpportunity.as | 32 +++
.../org/apache/flex/text/engine/CFFHinting.as | 29 ++
.../org/apache/flex/text/engine/Constants.as | 25 ++
.../apache/flex/text/engine/ContentElement.as | 71 +++++
.../org/apache/flex/text/engine/DigitCase.as | 30 ++
.../org/apache/flex/text/engine/DigitWidth.as | 30 ++
.../flex/text/engine/EastAsianJustifier.as | 39 +++
.../apache/flex/text/engine/ElementFormat.as | 77 ++++++
.../apache/flex/text/engine/FontDescription.as | 61 +++++
.../org/apache/flex/text/engine/FontLookup.as | 31 +++
.../org/apache/flex/text/engine/FontMetrics.as | 91 +++++++
.../org/apache/flex/text/engine/FontPosture.as | 30 ++
.../org/apache/flex/text/engine/FontWeight.as | 30 ++
.../flex/org/apache/flex/text/engine/Fonts.as | 37 +++
.../org/apache/flex/text/engine/GlyphMetrics.as | 33 +++
.../apache/flex/text/engine/GraphicElement.as | 37 +++
.../org/apache/flex/text/engine/GroupElement.as | 73 +++++
.../flex/org/apache/flex/text/engine/IFont.as | 38 +++
.../org/apache/flex/text/engine/IFontLoader.as | 35 +++
.../org/apache/flex/text/engine/ITextBlock.as | 68 +++++
.../org/apache/flex/text/engine/ITextFactory.as | 29 ++
.../org/apache/flex/text/engine/ITextLine.as | 71 +++++
.../flex/text/engine/JustificationStyle.as | 31 +++
.../flex/org/apache/flex/text/engine/Kerning.as | 31 +++
.../apache/flex/text/engine/LigatureLevel.as | 32 +++
.../flex/text/engine/LineJustification.as | 31 +++
.../apache/flex/text/engine/RenderingMode.as | 30 ++
.../apache/flex/text/engine/SpaceJustifier.as | 46 ++++
.../org/apache/flex/text/engine/TabAlignment.as | 31 +++
.../flex/org/apache/flex/text/engine/TabStop.as | 34 +++
.../org/apache/flex/text/engine/TextBaseline.as | 34 +++
.../org/apache/flex/text/engine/TextElement.as | 94 +++++++
.../org/apache/flex/text/engine/TextEngine.as | 27 ++
.../apache/flex/text/engine/TextJustifier.as | 45 +++
.../flex/text/engine/TextLineCreationResult.as | 31 +++
.../flex/text/engine/TextLineMirrorRegion.as | 55 ++++
.../apache/flex/text/engine/TextLineValidity.as | 28 ++
.../org/apache/flex/text/engine/TextRotation.as | 32 +++
.../apache/flex/text/engine/TypographicCase.as | 34 +++
.../org/apache/flex/text/events/IMEEvent.as | 50 ++++
.../org/apache/flex/text/events/TextEvent.as | 62 +++++
.../flex/org/apache/flex/text/html/TextBlock.as | 220 +++++++++++++++
.../flex/org/apache/flex/text/html/TextLine.as | 273 +++++++++++++++++++
.../flex/text/ime/CompositionAttributeRange.as | 121 ++++++++
.../flex/org/apache/flex/text/ime/IIMEClient.as | 186 +++++++++++++
.../org/apache/flex/text/ime/IIMESupport.as | 86 ++++++
.../main/flex/org/apache/flex/text/ime/IME.as | 49 ++++
.../apache/flex/text/ime/IMEConversionMode.as | 37 +++
.../src/main/resources/basic-as-manifest.xml | 24 ++
.../Text/src/main/resources/basic-manifest.xml | 24 ++
.../Text/src/main/resources/defaults.css | 21 ++
58 files changed, 3435 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/js/FlexJS/projects/TextJS/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/TextJS/build.xml b/frameworks/js/FlexJS/projects/TextJS/build.xml
new file mode 100644
index 0000000..b5c52e1
--- /dev/null
+++ b/frameworks/js/FlexJS/projects/TextJS/build.xml
@@ -0,0 +1,172 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<project name="TextJS" default="main" basedir=".">
+ <property name="FLEXJS_HOME" location="/FlexSDK/FlexJSNightly"/>
+ <!--<property name="FLEXJS_HOME" location="../../../../.."/>-->
+
+ <property file="${FLEXJS_HOME}/env.properties"/>
+ <property environment="env"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
+ <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+ <property name="target.name" value="${ant.project.name}.swc" />
+ <echo file="${basedir}/${target.name}.properties">target.name.nojs=${ant.project.name}</echo>
+ <replaceregexp file="${basedir}/${target.name}.properties" match="(.*)JS$" replace="\1" flags="m" />
+ <property file="${basedir}/${target.name}.properties"/>
+ <delete file="${basedir}/${target.name}.properties"/>
+
+ <target name="main" depends="clean,check-compiler,compile-js-swc,compile-asjs" description="Full build of ${ant.project.name}.swc">
+ </target>
+
+ <target name="clean">
+ <delete failonerror="false">
+ <fileset dir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
+ <include name="${target.name}"/>
+ </fileset>
+ </delete>
+ <delete failonerror="false" includeemptydirs="true">
+ <fileset dir="${basedir}/target">
+ <include name="**/**"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="compile-asjs" depends="check-compiler">
+ <echo message="Cross-compiling ${target.name}"/>
+ <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+ <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
+ <jvmarg value="-Xmx384m" />
+ <jvmarg value="-Dsun.io.useCanonCaches=false" />
+ <jvmarg value="-Dflexcompiler=${FALCONJX_HOME}/../compiler" />
+ <jvmarg value="-Dflexlib=${FLEXJS_HOME}/frameworks" />
+ <arg value="+flexlib=${FLEX_HOME}/frameworks" />
+ <arg value="-js-output-type=FLEXJS" />
+ <arg value="-compiler.strict-xml=true" />
+ <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion annotations -->
+ <arg value="-output=${basedir}/../../../../projects/${target.name.nojs}/target/${target.name.nojs}.swc" />
+ <!--<arg value="-output=${FLEX_HOME}/frameworks/projects/${target.name.nojs}/target/${target.name.nojs}.swc" />-->
+ <arg value="-load-config=${FLEX_HOME}/frameworks/js-config.xml" />
+ <arg value="-load-config+=${basedir}/src/main/config/compile-js-config.xml" />
+ </java>
+ </target>
+
+ <target name="compile-js-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
+ <echo message="Compiling target/${target.name}"/>
+ <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+ <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+ <mkdir dir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs"/>
+ <mkdir dir="${basedir}/target"/>
+
+ <compc fork="true"
+ output="${basedir}/target/${target.name}">
+ <jvmarg line="${compc.jvm.args}"/>
+ <arg value="-compiler.strict-xml=true" />
+ <load-config filename="${FLEX_HOME}/frameworks/js-config.xml" />
+ <load-config filename="src/main/config/compile-js-config.xml" />
+ </compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/js/FlexJS/libs/${target.name}" />
+ </target>
+
+ <target name="copy-js" >
+ <mkdir dir="${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources"/>
+ <copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources">
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
+ <include name="**/**" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="check-compiler" depends="check-falcon-home, check-falconjx-home">
+ <path id="lib.path">
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ </path>
+ <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+ </target>
+
+ <target name="check-falcon-home" unless="FALCON_HOME"
+ description="Check FALCON_HOME is a directory.">
+
+ <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+
+ <condition property="FALCON_HOME" value="${env.FALCON_HOME}">
+ <and>
+ <not>
+ <isset property="FALCON_HOME" />
+ </not>
+ <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" type="file" />
+ </and>
+ </condition>
+ <condition property="FALCON_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler">
+ <and>
+ <not>
+ <isset property="FALCON_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar" type="file" />
+ </and>
+ </condition>
+ <condition property="FALCON_HOME" value="${FLEXJS_HOME}">
+ <and>
+ <not>
+ <isset property="FALCON_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/lib/falcon-mxmlc.jar" type="file" />
+ </and>
+ </condition>
+ <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+ unless="FALCON_HOME"/>
+ </target>
+
+ <target name="check-falconjx-home" unless="FALCONJX_HOME"
+ description="Check FALCON_HOME is a directory.">
+
+ <echo message="FALCONJX_HOME is ${env.FALCONJX_HOME}"/>
+
+ <condition property="FALCONJX_HOME" value="${env.FALCONJX_HOME}">
+ <and>
+ <not>
+ <isset property="FALCONJX_HOME" />
+ </not>
+ <available file="${env.FALCONJX_HOME}/lib/jsc.jar" type="file" />
+ </and>
+ </condition>
+ <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/js">
+ <and>
+ <not>
+ <isset property="FALCONJX_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/js/lib/jsc.jar" type="file" />
+ </and>
+ </condition>
+ <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler-jx">
+ <and>
+ <not>
+ <isset property="FALCONJX_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar" type="file" />
+ </and>
+ </condition>
+ <fail message="FALCONJX_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler-jx folder in flex-falcon repo or the js folder of a FlexJS SDK"
+ unless="FALCONJX_HOME"/>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/js/FlexJS/projects/TextJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/TextJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/TextJS/src/main/config/compile-js-config.xml
new file mode 100644
index 0000000..186fdc8
--- /dev/null
+++ b/frameworks/js/FlexJS/projects/TextJS/src/main/config/compile-js-config.xml
@@ -0,0 +1,96 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<flex-config>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path append="true">
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+ <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+ <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+ <define>
+ <name>COMPILE::SWF</name>
+ <value>false</value>
+ </define>
+ <define>
+ <name>COMPILE::JS</name>
+ <value>true</value>
+ </define>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <!-- overwrite the default library-path setting -->
+ <library-path>
+ <path-element>../../../../../../../../js/libs/GCL.swc</path-element>
+ <!--<path-element>../../../../../../libs/GCL.swc</path-element>-->
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../../../../libs/CoreJS.swc</path-element>
+ <path-element>../../../../../libs/GraphicsJS.swc</path-element>
+ <path-element>../../../../../libs/HTMLJS.swc</path-element>
+ <path-element>../../../../../libs/NetworkJS.swc</path-element>
+ </library-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>../../../../../../../projects/Text/src/main/resources/basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <!--<path-element>../../../../../../../projects/Text/src/main/flex</path-element>-->
+ <path-element>../../../../../../../projects/Text/src/main/flex</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-sources>
+ </include-sources>
+
+ <include-classes>
+ <class>TextClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/.vscode/tasks.json
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/.vscode/tasks.json b/frameworks/projects/Text/.vscode/tasks.json
new file mode 100644
index 0000000..679b4ed
--- /dev/null
+++ b/frameworks/projects/Text/.vscode/tasks.json
@@ -0,0 +1,16 @@
+{
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
+ // for the documentation about the tasks.json format
+ "version": "0.1.0",
+ "command": "asconfigc",
+ "isShellCommand": true,
+ "args": [
+ "--flexHome=/FlexSDK/FlexJSNightly"
+ ],
+ "windows": {
+ "args": [
+ "--flexHome=C:\\dev\\flexjs_builds\\nightly_07"
+ ]
+ },
+ "showOutput": "always"
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/asconfig.json
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/asconfig.json b/frameworks/projects/Text/asconfig.json
new file mode 100644
index 0000000..c744be6
--- /dev/null
+++ b/frameworks/projects/Text/asconfig.json
@@ -0,0 +1,21 @@
+{
+ "config": "flex",
+ "compilerOptions": {
+ "debug": true,
+ "js-output-type": "flexjs",
+ "define": [
+ {
+ "name": "COMPILE::SWF",
+ "value": true
+ },
+ {
+ "name": "COMPILE::JS",
+ "value": false
+ }
+ ]
+ },
+ "files":
+ [
+ "src/main/flex/TextClasses.as"
+ ]
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/build.xml b/frameworks/projects/Text/build.xml
new file mode 100644
index 0000000..4130208
--- /dev/null
+++ b/frameworks/projects/Text/build.xml
@@ -0,0 +1,169 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<project name="Text" default="main" basedir=".">
+ <!--<property name="FLEXJS_HOME" location="/FlexSDK/FlexJSNightly"/>-->
+ <property name="FLEXJS_HOME" location="../../.."/>
+
+ <property file="${FLEXJS_HOME}/env.properties"/>
+ <property environment="env"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
+ <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+ <property name="target.name" value="${ant.project.name}.swc" />
+
+ <target name="main" depends="clean,check-compiler,compile,compile-js,copy-swc,test" description="Full build of ${ant.project.name}.swc">
+ </target>
+
+ <target name="compile-js">
+ <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
+ <!--<ant dir="../../js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />-->
+ </target>
+
+ <target name="copy-swc">
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
+ </target>
+
+ <target name="check-for-tests" >
+ <condition property="skip-tests" >
+ <not>
+ <available file="${basedir}/src/test/flex/build.xml" />
+ </not>
+ </condition>
+ </target>
+
+ <target name="test" depends="check-for-tests" unless="skip-tests">
+ <ant dir="src/test/flex" />
+ </target>
+
+ <target name="clean">
+ <delete failonerror="false">
+ <fileset dir="${FLEXJS_HOME}/frameworks/libs">
+ <include name="${target.name}"/>
+ </fileset>
+ </delete>
+ <delete failonerror="false" includeemptydirs="true">
+ <fileset dir="${basedir}/target">
+ <include name="**/**"/>
+ </fileset>
+ </delete>
+ <antcall target="clean-tests" />
+ </target>
+
+ <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+ <ant dir="src/test/flex" target="clean"/>
+ </target>
+
+ <target name="compile" description="Compiles .as files into .swc">
+ <echo message="Compiling libs/${ant.project.name}.swc"/>
+ <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+ <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+
+ <compc fork="true"
+ output="${basedir}/target/${target.name}">
+ <jvmarg line="${compc.jvm.args}"/>
+ <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
+ <arg value="+playerglobal.version=${playerglobal.version}" />
+ <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+ <arg value="-define=COMPILE::SWF,true" />
+ <arg value="-define=COMPILE::JS,false" />
+ </compc>
+ </target>
+
+ <target name="check-compiler" depends="check-falcon-home">
+ <path id="lib.path">
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ </path>
+ <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+ </target>
+
+ <target name="check-falcon-home" unless="FALCON_HOME"
+ description="Check FALCON_HOME is a directory.">
+
+ <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+ <condition property="FALCON_HOME" value="${env.FALCON_HOME}">
+ <and>
+ <not>
+ <isset property="FALCON_HOME" />
+ </not>
+ <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" type="file" />
+ </and>
+ </condition>
+ <condition property="FALCON_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler">
+ <and>
+ <not>
+ <isset property="FALCON_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar" type="file" />
+ </and>
+ </condition>
+ <condition property="FALCON_HOME" value="${FLEXJS_HOME}">
+ <and>
+ <not>
+ <isset property="FALCON_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/lib/falcon-mxmlc.jar" type="file" />
+ </and>
+ </condition>
+ <condition property="FALCONJX_HOME" value="${env.FALCONJX_HOME}">
+ <and>
+ <not>
+ <isset property="FALCONJX_HOME" />
+ </not>
+ <available file="${env.FALCONJX_HOME}/lib/jsc.jar" type="file" />
+ </and>
+ </condition>
+ <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/js">
+ <and>
+ <not>
+ <isset property="FALCONJX_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/js/lib/jsc.jar" type="file" />
+ </and>
+ </condition>
+ <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler-jx">
+ <and>
+ <not>
+ <isset property="FALCONJX_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar" type="file" />
+ </and>
+ </condition>
+ <condition property="GOOG_HOME" value="${env.GOOG_HOME}">
+ <and>
+ <not>
+ <isset property="GOOG_HOME" />
+ </not>
+ <available file="${env.GOOG_HOME}/closure/goog/base.js" type="file" />
+ </and>
+ </condition>
+ <condition property="GOOG_HOME" value="${FLEXJS_HOME}/js/lib/google/closure-library">
+ <and>
+ <not>
+ <isset property="GOOG_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" type="file" />
+ </and>
+ </condition>
+
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/config/compile-as-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/config/compile-as-config.xml b/frameworks/projects/Text/src/main/config/compile-as-config.xml
new file mode 100644
index 0000000..c1ddd38
--- /dev/null
+++ b/frameworks/projects/Text/src/main/config/compile-as-config.xml
@@ -0,0 +1,88 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<flex-config>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../../../../libs/Binding.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/Graphics.swc</path-element>
+ <path-element>../../../../../libs/Collections.swc</path-element>
+ <path-element>../../../../../libs/HTML.swc</path-element>
+ <path-element>../../../../../libs/Collections.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+ <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+ <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>../resources/basic-manifest.xml</manifest>
+ </namespace>
+ <!--<namespace>
+ <uri>library://ns.apache.org/flexjs/svg</uri>
+ <manifest>../resources/svg-manifest.xml</manifest>
+ </namespace>-->
+ </namespaces>
+
+ <source-path>
+ <path-element>../flex</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>defaults.css</name>
+ <path>../resources/defaults.css</path>
+ </include-file>
+
+ <include-classes>
+ <class>TextClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <!--<uri>library://ns.apache.org/flexjs/svg</uri>-->
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/TextClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/TextClasses.as b/frameworks/projects/Text/src/main/flex/TextClasses.as
new file mode 100644
index 0000000..6ad2045
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/TextClasses.as
@@ -0,0 +1,77 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ /**
+ * @private
+ * This class is used to link additional classes into Text.swc
+ * beyond those that are found by dependency analysis starting
+ * from the classes specified in manifest.xml.
+ */
+ internal class TextClasses
+ {
+ import org.apache.flex.text.html.TextLine;org.apache.flex.text.html.TextLine;
+ import org.apache.flex.text.html.TextBlock;org.apache.flex.text.html.TextBlock;
+
+ import org.apache.flex.text.engine.BreakOpportunity;BreakOpportunity;
+ import org.apache.flex.text.engine.CFFHinting;CFFHinting;
+ import org.apache.flex.text.engine.ContentElement;ContentElement;
+ import org.apache.flex.text.engine.Constants;Constants;
+ import org.apache.flex.text.engine.DigitCase;DigitCase;
+ import org.apache.flex.text.engine.DigitWidth;DigitWidth;
+ import org.apache.flex.text.engine.EastAsianJustifier;EastAsianJustifier;
+ import org.apache.flex.text.engine.ElementFormat;ElementFormat;
+ import org.apache.flex.text.engine.Fonts;Fonts;
+ import org.apache.flex.text.engine.FontDescription;FontDescription;
+ import org.apache.flex.text.engine.FontLookup;FontLookup;
+ import org.apache.flex.text.engine.FontMetrics;FontMetrics;
+ import org.apache.flex.text.engine.FontPosture;FontPosture;
+ import org.apache.flex.text.engine.FontWeight;FontWeight;
+ import org.apache.flex.text.engine.GraphicElement;GraphicElement;
+ import org.apache.flex.text.engine.GroupElement;GroupElement;
+ import org.apache.flex.text.engine.GlyphMetrics; GlyphMetrics;
+ import org.apache.flex.text.engine.ITextBlock;ITextBlock;
+ import org.apache.flex.text.engine.ITextLine;ITextLine;
+ import org.apache.flex.text.engine.JustificationStyle;JustificationStyle;
+ import org.apache.flex.text.engine.Kerning;Kerning;
+ import org.apache.flex.text.engine.LigatureLevel;LigatureLevel;
+ import org.apache.flex.text.engine.LineJustification;LineJustification;
+ import org.apache.flex.text.engine.RenderingMode;RenderingMode;
+ import org.apache.flex.text.engine.SpaceJustifier;SpaceJustifier;
+ import org.apache.flex.text.engine.TabAlignment;TabAlignment;
+ import org.apache.flex.text.engine.TabStop;TabStop;
+ import org.apache.flex.text.engine.TextBaseline;TextBaseline;
+ import org.apache.flex.text.engine.TextElement;TextElement;
+ import org.apache.flex.text.engine.TextJustifier;TextJustifier;
+ import org.apache.flex.text.engine.TextLineCreationResult;TextLineCreationResult;
+ import org.apache.flex.text.engine.TextLineMirrorRegion;TextLineMirrorRegion;
+ import org.apache.flex.text.engine.TextLineValidity;TextLineValidity;
+ import org.apache.flex.text.engine.TextRotation; TextRotation;
+ import org.apache.flex.text.engine.TypographicCase; TypographicCase;
+ import org.apache.flex.text.events.IMEEvent; IMEEvent;
+ import org.apache.flex.text.events.TextEvent; TextEvent;
+ import org.apache.flex.text.engine.TextEngine;TextEngine;
+
+ import org.apache.flex.text.ime.IME; IME;
+ import org.apache.flex.text.ime.IIMEClient; IIMEClient;
+ import org.apache.flex.text.ime.IIMESupport; IIMESupport;
+ import org.apache.flex.text.ime.IMEConversionMode; IMEConversionMode;
+ import org.apache.flex.text.ime.CompositionAttributeRange; CompositionAttributeRange;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/BreakOpportunity.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/BreakOpportunity.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/BreakOpportunity.as
new file mode 100644
index 0000000..0526fa9
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/BreakOpportunity.as
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class BreakOpportunity
+ {
+ public static const ALL : String = "all";
+ public static const ANY : String = "any";
+ public static const AUTO : String = "auto";
+ public static const NONE : String = "none";
+
+ public function BreakOpportunity()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/CFFHinting.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/CFFHinting.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/CFFHinting.as
new file mode 100644
index 0000000..a5a1a93
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/CFFHinting.as
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class CFFHinting
+ {
+ public static const HORIZONTAL_STEM : String = "horizontalStem";
+ public static const NONE : String = "none";
+ public function CFFHinting()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Constants.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Constants.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Constants.as
new file mode 100644
index 0000000..22d6669
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Constants.as
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class Constants
+ {
+ public static const MAX_LINE_WIDTH:int = 1000000;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ContentElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ContentElement.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ContentElement.as
new file mode 100644
index 0000000..1b35305
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ContentElement.as
@@ -0,0 +1,71 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.events.EventDispatcher;
+
+ public class ContentElement
+ {
+ public static const GRAPHIC_ELEMENT:uint = 0xFDEF;
+ public function ContentElement(elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0")
+ {
+ this.elementFormat = elementFormat;
+ this.eventMirror = eventMirror;
+ this.textRotation = textRotation;
+ }
+ private var _elementFormat:ElementFormat;
+ public function get elementFormat():ElementFormat
+ {
+ return _elementFormat;
+ }
+ public function set elementFormat(value:ElementFormat):void
+ {
+ _elementFormat = value;
+ }
+
+ public var eventMirror:EventDispatcher;
+
+ /**
+ * The parent
+ */
+ public function get groupElement() : GroupElement
+ {
+ return null;
+ }
+ public function get rawText() : String
+ {
+ return null;
+ }
+ public function get text() : String
+ {
+ return null;
+ }
+ public function get textBlock() : ITextBlock
+ {
+ return null;
+ }
+ public function get textBlockBeginIndex() : int
+ {
+ return null;
+ }
+
+ public var textRotation : String
+ public var userData : *
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/DigitCase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/DigitCase.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/DigitCase.as
new file mode 100644
index 0000000..7809617
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/DigitCase.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class DigitCase
+ {
+ public function DigitCase()
+ {
+ }
+ public static const DEFAULT : String = "default";
+ public static const LINING : String = "lining";
+ public static const OLD_STYLE : String = "oldStyle";
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/DigitWidth.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/DigitWidth.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/DigitWidth.as
new file mode 100644
index 0000000..6239065
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/DigitWidth.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class DigitWidth
+ {
+ public function DigitWidth()
+ {
+ }
+ public static const DEFAULT : String = "default";
+ public static const PROPORTIONAL : String = "proportional";
+ public static const TABULAR : String = "tabular";
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/EastAsianJustifier.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/EastAsianJustifier.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/EastAsianJustifier.as
new file mode 100644
index 0000000..c41eb0a
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/EastAsianJustifier.as
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class EastAsianJustifier extends TextJustifier
+ {
+ public function EastAsianJustifier(locale:String = "ja", lineJustification:String = "allButLast", justificationStyle:String = "pushInKinsoku")
+ {
+ this.justificationStyle = justificationStyle;
+ super(locale, lineJustification);
+ }
+//Specifies whether ideographic spaces at the ends of lines should be composed or dropped during justification.
+ public var composeTrailingIdeographicSpaces : Boolean;
+//Specifies the justification style for the text in a text block.
+ public var justificationStyle : String
+
+ override public function clone():TextJustifier
+ {
+ return new EastAsianJustifier(locale,lineJustification);
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ElementFormat.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ElementFormat.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ElementFormat.as
new file mode 100644
index 0000000..7e96bec
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ElementFormat.as
@@ -0,0 +1,77 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class ElementFormat
+ {
+ public function ElementFormat(fontDescription:FontDescription = null, fontSize:Number = 12.0, color:uint = 0x000000, alpha:Number = 1.0, textRotation:String = "auto", dominantBaseline:String = "roman", alignmentBaseline:String = "useDominantBaseline", baselineShift:Number = 0.0, kerning:String = "on", trackingRight:Number = 0.0, trackingLeft:Number = 0.0, locale:String = "en", breakOpportunity:String = "auto", digitCase:String = "default", digitWidth:String = "default", ligatureLevel:String = "common", typographicCase:String = "default")
+ {
+ this.alignmentBaseline = alignmentBaseline;
+ this.alpha = alpha;
+ this.baselineShift = baselineShift;
+ this.breakOpportunity = breakOpportunity;
+ this.color = color;
+ this.digitCase = digitCase;
+ this.digitWidth = digitWidth;
+ this.dominantBaseline = dominantBaseline;
+ this.fontDescription = fontDescription;
+ this.fontSize = fontSize;
+ this.kerning = kerning;
+ this.ligatureLevel = ligatureLevel;
+ this.locale = locale;
+ this.textRotation = textRotation;
+ this.trackingLeft = trackingLeft;
+ this.trackingRight = trackingRight;
+ this.typographicCase = typographicCase;
+ }
+
+ public var alignmentBaseline : String;
+ public var alpha : Number;
+ public var baselineShift : Number;
+ public var breakOpportunity : String;
+ public var color : uint;
+ public var strokeColor : uint;
+ public var strokeWeight:Number = 0;
+ public var strokeAlpha:Number = 1;
+ public var digitCase : String;
+ public var digitWidth : String;
+ public var dominantBaseline : String;
+ public var fontDescription : FontDescription;
+ public var fontSize : Number;
+ public var kerning : String;
+ public var ligatureLevel : String;
+ public var locale : String;
+ public var locked : Boolean;
+ public var textRotation : String;
+ public var trackingLeft : Number;
+ public var trackingRight : Number;
+ public var typographicCase : String;
+
+
+ public function clone():ElementFormat
+ {
+ return new ElementFormat(fontDescription, fontSize, color, alpha, textRotation, dominantBaseline, alignmentBaseline, baselineShift, kerning, trackingRight, trackingLeft, locale, breakOpportunity, digitCase, digitWidth, ligatureLevel, typographicCase)
+ }
+
+ public function getFontMetrics():FontMetrics
+ {
+ return null;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontDescription.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontDescription.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontDescription.as
new file mode 100644
index 0000000..1db5d1f
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontDescription.as
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.text.engine.IFontLoader;
+
+ public class FontDescription
+ {
+ public function FontDescription(fontName:String = "_serif", fontStyle:String = "", fontLoader:IFontLoader=null)
+ {
+ // this.cffHinting = cffHinting;
+ // this.fontLookup = fontLookup;
+ this.fontName = fontName;
+ this.fontStyle = fontStyle;
+ // this.fontPosture = fontPosture;
+ // this.fontWeight = fontWeight;
+ // this.renderingMode = renderingMode;
+ this.fontLoader = fontLoader;
+ }
+ // public var cffHinting : String;
+ // public var fontLookup : String;
+ public var fontName : String;
+ public var fontPosture : String;
+ public var fontWeight : String;
+ // public var locked : Boolean;
+ // public var renderingMode : String;
+ public var fontStyle:String;
+ public var fontLoader:IFontLoader;
+
+ public function clone():FontDescription
+ {
+ return new FontDescription(fontName, fontStyle, fontLoader);
+ }
+
+ //These two methods probably don't make sense
+ public static function isDeviceFontCompatible(fontName:String, fontStyle:String):Boolean
+ {
+ return false;
+ }
+ public static function isFontCompatible(fontName:String, fontStyle:String):Boolean
+ {
+ return false;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontLookup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontLookup.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontLookup.as
new file mode 100644
index 0000000..0b68f6e
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontLookup.as
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ //This class is probably not necessary
+ public class FontLookup
+ {
+ public static const DEVICE : String = "device";
+ public static const EMBEDDED_CFF : String = "embeddedCFF";
+
+ public function FontLookup()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontMetrics.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontMetrics.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontMetrics.as
new file mode 100644
index 0000000..5472c73
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontMetrics.as
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.geom.Rectangle;
+ import org.apache.flex.text.engine.FontMetrics;
+
+ /**
+ * The FontMetrics class contains metrics specific to the font.
+ * The information contained in this class is all located in the OS/2 font table.
+ * It is important to note that there can be two distinct uses for this class.
+ * By default IFont has a FontMetrics which contains the raw data which is dependent on unitsPerEm.
+ * Clients would usually need a FontMetrics which is calculated based on a specific font size.
+ *
+ * @toplevel
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class FontMetrics
+ {
+ public var unitsPerEm:int;
+ public var emBox : Rectangle;
+ public var lineGap : Number;
+ public var strikethroughOffset : Number;
+ public var strikethroughThickness : Number;
+ public var subscriptOffset : Number;
+ public var subscriptScale : Number;
+ public var superscriptOffset : Number;
+ public var superscriptScale : Number;
+ public var underlineOffset : Number;
+ public var underlineThickness : Number;
+ public var ascender:Number;
+ public var descender:Number;
+ public var xHeight:Number;
+ public var capsHeight:Number;
+
+ public function get isScaled():Boolean
+ {
+ return isNaN(unitsPerEm);
+ }
+
+ /**
+ * Returns a new FontMetrics object with values scaled to the specified fontSize in points/pixels.
+ */
+ public function getScaledMetrics(fontSize:Number):FontMetrics
+ {
+ var scale:Number = 1 / unitsPerEm * fontSize;
+ var metrics:FontMetrics = new FontMetrics();
+ if(emBox)
+ {
+ metrics.emBox = new Rectangle(emBox.x * scale, emBox.y * scale, emBox.width * scale, emBox.height * scale);
+ }
+ metrics.lineGap = lineGap * scale;
+ metrics.strikethroughOffset = strikethroughOffset * scale;
+ metrics.strikethroughThickness = strikethroughThickness * scale;
+ metrics.subscriptOffset = subscriptOffset * scale;
+ metrics.subscriptScale = subscriptScale * scale;
+ metrics.superscriptOffset = superscriptOffset * scale;
+ metrics.superscriptScale = superscriptScale * scale;
+ metrics.underlineOffset = underlineOffset * scale;
+ metrics.underlineThickness = underlineThickness * scale;
+ metrics.ascender = ascender * scale;
+ metrics.descender = descender * scale;
+ metrics.xHeight = xHeight * scale;
+ metrics.capsHeight = capsHeight * scale;
+ return metrics;
+ }
+ private function getScale(fontSize:Number):Number
+ {
+ return 1 / unitsPerEm * fontSize;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontPosture.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontPosture.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontPosture.as
new file mode 100644
index 0000000..2a1800d
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontPosture.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class FontPosture
+ {
+ public static const ITALIC : String = "italic";
+ public static const NORMAL : String = "normal";
+
+ public function FontPosture()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontWeight.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontWeight.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontWeight.as
new file mode 100644
index 0000000..d94df58
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/FontWeight.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class FontWeight
+ {
+ public static const BOLD : String = "bold";
+ public static const NORMAL : String = "normal";
+
+ public function FontWeight()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Fonts.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Fonts.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Fonts.as
new file mode 100644
index 0000000..da564b8
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/Fonts.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.text.engine.IFontLoader;
+
+ public class Fonts
+ {
+ private static var _loader:IFontLoader;
+ public static function get loader():IFontLoader
+ {
+ if(!_loader)
+ throw new Error("An IFontLoader must be registered!");
+ return _loader;
+ }
+ public static function registerLoader(loader:IFontLoader):void
+ {
+ _loader = loader;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GlyphMetrics.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GlyphMetrics.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GlyphMetrics.as
new file mode 100644
index 0000000..b916260
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GlyphMetrics.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class GlyphMetrics
+ {
+ public var ascent:Number;
+ public var descent:Number;
+ public var top:Number;
+ public var bottom:Number;
+ public var left:Number;
+ public var right:Number;
+ public var leftBearing:Number;
+ public var rightBearing:Number;
+ public var advanceWidth:Number;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GraphicElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GraphicElement.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GraphicElement.as
new file mode 100644
index 0000000..b865145
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GraphicElement.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.events.EventDispatcher;
+
+ public class GraphicElement extends ContentElement
+ {
+ public function GraphicElement(graphic:IUIBase = null, elementWidth:Number = 15.0, elementHeight:Number = 15.0, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0")
+ {
+ this.graphic = graphic;
+ this.elementWidth = elementWidth;
+ this.elementHeight = elementHeight;
+ super(elementFormat, eventMirror, textRotation);
+ }
+ public var elementHeight : Number;
+ public var elementWidth : Number;
+ public var graphic : IUIBase;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GroupElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GroupElement.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GroupElement.as
new file mode 100644
index 0000000..10ae494
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GroupElement.as
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.events.EventDispatcher;
+
+ public class GroupElement extends ContentElement
+ {
+ public function GroupElement(elements:Vector.<ContentElement> = null, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0")
+ {
+ super(elementFormat, eventMirror, textRotation);
+ }
+ private var _elementCount:int=0;
+ public function get elementCount():int
+ {
+ return _elementCount;
+ }
+
+ public function getElementAt(index:int):ContentElement
+ {
+ return null;
+ }
+ public function getElementAtCharIndex(charIndex:int):ContentElement
+ {
+ return null;
+ }
+ public function getElementIndex(element:ContentElement):int
+ {
+ return -1;
+ }
+ public function groupElements(beginIndex:int, endIndex:int):GroupElement
+ {
+ return null;
+ }
+ public function mergeTextElements(beginIndex:int, endIndex:int):TextElement
+ {
+ return null;
+ }
+ public function replaceElements(beginIndex:int, endIndex:int, newElements:Vector.<ContentElement>):Vector.<ContentElement>
+ {
+ return null;
+ }
+ public function setElements(value:Vector.<ContentElement>):void
+ {
+ //TODO
+ }
+ public function splitTextElement(elementIndex:int, splitIndex:int):TextElement
+ {
+ return null;
+ }
+ public function ungroupElements(groupIndex:int):void
+ {
+ //TODO
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/IFont.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/IFont.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/IFont.as
new file mode 100644
index 0000000..2e8b0a0
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/IFont.as
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine {
+ import org.apache.flex.utils.BinaryData;
+ /**
+ * @author harbs
+ */
+ public interface IFont
+ {
+ function get family():String;
+ function get style():String;
+ function get isLoaded():Boolean;
+ function get fontMetrics():FontMetrics;
+ //These callbacks should feed the IFont into the function
+ function onLoad(callback:Function):void;
+ function onError(calback:Function):void;
+ //TODO once Promise is implemented on the SWF side
+ //function loaded():Promise;
+ function load(url:String):void;
+ function loadFromBinary(data:BinaryData):void;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/IFontLoader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/IFontLoader.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/IFontLoader.as
new file mode 100644
index 0000000..1f7e18b
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/IFontLoader.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine {
+ import org.apache.flex.utils.BinaryData;
+ import org.apache.flex.text.engine.IFont;
+
+ /**
+ * @author harbs
+ */
+ public interface IFontLoader
+ {
+ function fontLoaded(family:String, style:String):Boolean;
+ function getFont(family:String, style:String):IFont;
+ function getFontFamily(family:String):Vector.<IFont>;
+ function loadFont(url:String):IFont;
+ function loadFontBinary(data:BinaryData):IFont;
+ function registerFont(font:IFont):void;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextBlock.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextBlock.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextBlock.as
new file mode 100644
index 0000000..7f9be7c
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextBlock.as
@@ -0,0 +1,68 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.text.engine.ITextFactory;
+
+ public interface ITextBlock
+ {
+ function get applyNonLinearFontScaling():Boolean;
+ function set applyNonLinearFontScaling(value:Boolean):void;
+ function get baselineFontDescription():FontDescription;
+ function set baselineFontDescription(value:FontDescription):void;
+ function get baselineFontSize():Number;
+ function set baselineFontSize(value:Number):void;
+ function get baselineZero():String;
+ function set baselineZero(value:String):void;
+ function get bidiLevel():int;
+ function set bidiLevel(value:int):void;
+ function get content():ContentElement;
+ function set content(value:ContentElement):void;
+ function get firstInvalidLine():ITextLine;
+ function set firstInvalidLine(value:ITextLine):void;
+ function get firstLine():ITextLine;
+ function set firstLine(value:ITextLine):void;
+ function get lastLine():ITextLine;
+ function set lastLine(value:ITextLine):void;
+ function get lineRotation():String;
+ function set lineRotation(value:String):void;
+ function get tabStops():Vector.<TabStop>;
+ function set tabStops(value:Vector.<TabStop>):void;
+ function get textJustifier():TextJustifier;
+ function set textJustifier(value:TextJustifier):void;
+ function get textLineCreationResult():String;
+ function set textLineCreationResult(value:String):void;
+ function get userData():*;
+ function set userData(value:*):void;
+
+ function get textFactory():ITextFactory;
+
+ function createTextLine(previousLine:ITextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):ITextLine;
+ function dump():String;
+ function findNextAtomBoundary(afterCharIndex:int):int
+ function findNextWordBoundary(afterCharIndex:int):int;
+ function findPreviousAtomBoundary(beforeCharIndex:int):int;
+ function findPreviousWordBoundary(beforeCharIndex:int):int;
+ function getTextLineAtCharIndex(charIndex:int):ITextLine;
+ function recreateTextLine(textLine:ITextLine, previousLine:ITextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):ITextLine;
+ function releaseLineCreationData():void;
+ function releaseLines(firstLine:ITextLine, lastLine:ITextLine):void;
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextFactory.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextFactory.as
new file mode 100644
index 0000000..5ef254c
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextFactory.as
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.core.IUIBase;
+
+ public interface ITextFactory
+ {
+ function getTextBlock():ITextBlock;
+ function getTextContainer():IUIBase;
+ function getFontLoader():IFontLoader;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextLine.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextLine.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextLine.as
new file mode 100644
index 0000000..33f7bbe
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextLine.as
@@ -0,0 +1,71 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ import org.apache.flex.geom.Rectangle;
+ import org.apache.flex.core.IChild;
+ import org.apache.flex.core.IParentIUIBase;
+ import org.apache.flex.core.IUIBase;
+
+ public interface ITextLine extends IParentIUIBase
+ {
+ function get ascent():Number;
+ function get atomCount():int;
+ function get blendMode():String;
+ function get cacheAsBitmap():Boolean;
+ function get descent():Number;
+ function get doubleClickEnabled():Boolean;
+ function get hasGraphicElement():Boolean;
+ function get hasTabs():Boolean;
+ function get metaData():Object;
+ function get nextLine():ITextLine;
+ function get previousLine():ITextLine;
+ function get rawTextLength():int;
+ function get specifiedWidth():Number;
+ function get textBlock():ITextBlock;
+ function get textBlockBeginIndex():int;
+ function get textHeight():Number;
+ function get textWidth():Number;
+ function get totalAscent():Number;
+ function get totalDescent():Number;
+ function get totalHeight():Number;
+ function get unjustifiedTextWidth():Number;
+ function get userData():*;
+ function get validity():String;
+
+//setters
+ function set userData(value:*):void;
+ function set doubleClickEnabled(value:Boolean):void;
+ function set validity(value:String):void;
+
+ function dump():String;
+ function getAtomBidiLevel(atomIndex:int):int;
+ function getAtomBounds(atomIndex:int):Rectangle;
+ function getAtomCenter(atomIndex:int):Number;
+ function getAtomGraphic(atomIndex:int):IUIBase;
+ function getAtomIndexAtCharIndex(charIndex:int):int;
+ function getAtomIndexAtPoint(stageX:Number, stageY:Number):int;
+ function getAtomTextBlockBeginIndex(atomIndex:int):int;
+ function getAtomTextBlockEndIndex(atomIndex:int):int;
+ function getAtomTextRotation(atomIndex:int):String;
+ function getAtomWordBoundaryOnLeft(atomIndex:int):Boolean;
+ function getBaselinePosition(baseline:String):Number;
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77bfe4f/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/JustificationStyle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/JustificationStyle.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/JustificationStyle.as
new file mode 100644
index 0000000..9b67b68
--- /dev/null
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/JustificationStyle.as
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.text.engine
+{
+ public class JustificationStyle
+ {
+ public static const PRIORITIZE_LEAST_ADJUSTMENT : String = "prioritizeLeastAdjustment";
+ public static const PUSH_IN_KINSOKU : String = "pushInKinsoku";
+ public static const PUSH_OUT_ONLY : String = "pushOutOnly";
+
+ public function JustificationStyle()
+ {
+ }
+ }
+}
\ No newline at end of file