TextField.hx 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. package flash.text;
  2. extern class TextField extends flash.display.InteractiveObject {
  3. var alwaysShowSelection : Bool;
  4. var antiAliasType : AntiAliasType;
  5. var autoSize : TextFieldAutoSize;
  6. var background : Bool;
  7. var backgroundColor : UInt;
  8. var border : Bool;
  9. var borderColor : UInt;
  10. var bottomScrollV(default,null) : Int;
  11. var caretIndex(default,null) : Int;
  12. var condenseWhite : Bool;
  13. var defaultTextFormat : TextFormat;
  14. var displayAsPassword : Bool;
  15. var embedFonts : Bool;
  16. var gridFitType : GridFitType;
  17. var htmlText : String;
  18. var length(default,null) : Int;
  19. var maxChars : Int;
  20. var maxScrollH(default,null) : Int;
  21. var maxScrollV(default,null) : Int;
  22. var mouseWheelEnabled : Bool;
  23. var multiline : Bool;
  24. var numLines(default,null) : Int;
  25. var restrict : String;
  26. var scrollH : Int;
  27. var scrollV : Int;
  28. var selectable : Bool;
  29. var selectedText(default,null) : String;
  30. var selectionBeginIndex(default,null) : Int;
  31. var selectionEndIndex(default,null) : Int;
  32. var sharpness : Float;
  33. var styleSheet : StyleSheet;
  34. var text : String;
  35. var textColor : UInt;
  36. var textHeight(default,null) : Float;
  37. @:require(flash11) var textInteractionMode(default,null) : TextInteractionMode;
  38. var textWidth(default,null) : Float;
  39. var thickness : Float;
  40. var type : TextFieldType;
  41. var useRichTextClipboard : Bool;
  42. var wordWrap : Bool;
  43. function new() : Void;
  44. function appendText(newText : String) : Void;
  45. function copyRichText() : String;
  46. function getCharBoundaries(charIndex : Int) : flash.geom.Rectangle;
  47. function getCharIndexAtPoint(x : Float, y : Float) : Int;
  48. function getFirstCharInParagraph(charIndex : Int) : Int;
  49. function getImageReference(id : String) : flash.display.DisplayObject;
  50. function getLineIndexAtPoint(x : Float, y : Float) : Int;
  51. function getLineIndexOfChar(charIndex : Int) : Int;
  52. function getLineLength(lineIndex : Int) : Int;
  53. function getLineMetrics(lineIndex : Int) : TextLineMetrics;
  54. function getLineOffset(lineIndex : Int) : Int;
  55. function getLineText(lineIndex : Int) : String;
  56. function getParagraphLength(charIndex : Int) : Int;
  57. function getRawText() : String;
  58. function getTextFormat(beginIndex : Int = -1, endIndex : Int = -1) : TextFormat;
  59. function getTextRuns(beginIndex : Int = 0, endIndex : Int = 2147483647) : Array<Dynamic>;
  60. function getXMLText(beginIndex : Int = 0, endIndex : Int = 2147483647) : String;
  61. function insertXMLText(beginIndex : Int, endIndex : Int, richText : String, pasting : Bool = false) : Void;
  62. function pasteRichText(richText : String) : Bool;
  63. function replaceSelectedText(value : String) : Void;
  64. function replaceText(beginIndex : Int, endIndex : Int, newText : String) : Void;
  65. function setSelection(beginIndex : Int, endIndex : Int) : Void;
  66. function setTextFormat(format : TextFormat, beginIndex : Int = -1, endIndex : Int = -1) : Void;
  67. @:require(flash10) static function isFontCompatible(fontName : String, fontStyle : String) : Bool;
  68. }