TextBlock.hx 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package flash.text.engine;
  2. extern final class TextBlock {
  3. @:flash.property var applyNonLinearFontScaling(get,set) : Bool;
  4. @:flash.property var baselineFontDescription(get,set) : FontDescription;
  5. @:flash.property var baselineFontSize(get,set) : Float;
  6. @:flash.property var baselineZero(get,set) : TextBaseline;
  7. @:flash.property var bidiLevel(get,set) : Int;
  8. @:flash.property var content(get,set) : ContentElement;
  9. @:flash.property var firstInvalidLine(get,never) : TextLine;
  10. @:flash.property var firstLine(get,never) : TextLine;
  11. @:flash.property var lastLine(get,never) : TextLine;
  12. @:flash.property var lineRotation(get,set) : TextRotation;
  13. @:flash.property var tabStops(get,set) : flash.Vector<TabStop>;
  14. @:flash.property var textJustifier(get,set) : TextJustifier;
  15. @:flash.property var textLineCreationResult(get,never) : TextLineCreationResult;
  16. var userData : Dynamic;
  17. function new(?content : ContentElement, ?tabStops : flash.Vector<TabStop>, ?textJustifier : TextJustifier, ?lineRotation : TextRotation, ?baselineZero : TextBaseline, bidiLevel : Int = 0, applyNonLinearFontScaling : Bool = true, ?baselineFontDescription : FontDescription, baselineFontSize : Float = 12) : Void;
  18. function createTextLine(?previousLine : TextLine, width : Float = 1000000, lineOffset : Float = 0, fitSomething : Bool = false) : TextLine;
  19. function dump() : String;
  20. function findNextAtomBoundary(afterCharIndex : Int) : Int;
  21. function findNextWordBoundary(afterCharIndex : Int) : Int;
  22. function findPreviousAtomBoundary(beforeCharIndex : Int) : Int;
  23. function findPreviousWordBoundary(beforeCharIndex : Int) : Int;
  24. function getTextLineAtCharIndex(charIndex : Int) : TextLine;
  25. private function get_applyNonLinearFontScaling() : Bool;
  26. private function get_baselineFontDescription() : FontDescription;
  27. private function get_baselineFontSize() : Float;
  28. private function get_baselineZero() : TextBaseline;
  29. private function get_bidiLevel() : Int;
  30. private function get_content() : ContentElement;
  31. private function get_firstInvalidLine() : TextLine;
  32. private function get_firstLine() : TextLine;
  33. private function get_lastLine() : TextLine;
  34. private function get_lineRotation() : TextRotation;
  35. private function get_tabStops() : flash.Vector<TabStop>;
  36. private function get_textJustifier() : TextJustifier;
  37. private function get_textLineCreationResult() : TextLineCreationResult;
  38. @:require(flash10_1) function recreateTextLine(textLine : TextLine, ?previousLine : TextLine, width : Float = 1000000, lineOffset : Float = 0, fitSomething : Bool = false) : TextLine;
  39. @:require(flash10_1) function releaseLineCreationData() : Void;
  40. function releaseLines(firstLine : TextLine, lastLine : TextLine) : Void;
  41. private function set_applyNonLinearFontScaling(value : Bool) : Bool;
  42. private function set_baselineFontDescription(value : FontDescription) : FontDescription;
  43. private function set_baselineFontSize(value : Float) : Float;
  44. private function set_baselineZero(value : TextBaseline) : TextBaseline;
  45. private function set_bidiLevel(value : Int) : Int;
  46. private function set_content(value : ContentElement) : ContentElement;
  47. private function set_lineRotation(value : TextRotation) : TextRotation;
  48. private function set_tabStops(value : flash.Vector<TabStop>) : flash.Vector<TabStop>;
  49. private function set_textJustifier(value : TextJustifier) : TextJustifier;
  50. }