package flash.text;

extern class TextField extends flash.display.InteractiveObject {
	@:flash.property var alwaysShowSelection(get,set) : Bool;
	@:flash.property var antiAliasType(get,set) : AntiAliasType;
	@:flash.property var autoSize(get,set) : TextFieldAutoSize;
	@:flash.property var background(get,set) : Bool;
	@:flash.property var backgroundColor(get,set) : UInt;
	@:flash.property var border(get,set) : Bool;
	@:flash.property var borderColor(get,set) : UInt;
	@:flash.property var bottomScrollV(get,never) : Int;
	@:flash.property var caretIndex(get,never) : Int;
	@:flash.property var condenseWhite(get,set) : Bool;
	@:flash.property var defaultTextFormat(get,set) : TextFormat;
	@:flash.property var displayAsPassword(get,set) : Bool;
	@:flash.property var embedFonts(get,set) : Bool;
	@:flash.property var gridFitType(get,set) : GridFitType;
	@:flash.property var htmlText(get,set) : String;
	@:flash.property var length(get,never) : Int;
	@:flash.property var maxChars(get,set) : Int;
	@:flash.property var maxScrollH(get,never) : Int;
	@:flash.property var maxScrollV(get,never) : Int;
	@:flash.property var mouseWheelEnabled(get,set) : Bool;
	@:flash.property var multiline(get,set) : Bool;
	@:flash.property var numLines(get,never) : Int;
	@:flash.property var restrict(get,set) : String;
	@:flash.property var scrollH(get,set) : Int;
	@:flash.property var scrollV(get,set) : Int;
	@:flash.property var selectable(get,set) : Bool;
	@:flash.property var selectedText(get,never) : String;
	@:flash.property var selectionBeginIndex(get,never) : Int;
	@:flash.property var selectionEndIndex(get,never) : Int;
	@:flash.property var sharpness(get,set) : Float;
	@:flash.property var styleSheet(get,set) : StyleSheet;
	@:flash.property var text(get,set) : String;
	@:flash.property var textColor(get,set) : UInt;
	@:flash.property var textHeight(get,never) : Float;
	@:flash.property @:require(flash11) var textInteractionMode(get,never) : TextInteractionMode;
	@:flash.property var textWidth(get,never) : Float;
	@:flash.property var thickness(get,set) : Float;
	@:flash.property var type(get,set) : TextFieldType;
	@:flash.property var useRichTextClipboard(get,set) : Bool;
	@:flash.property var wordWrap(get,set) : Bool;
	function new() : Void;
	function appendText(newText : String) : Void;
	@:ns("flash.text",internal) function copyRichText() : String;
	function getCharBoundaries(charIndex : Int) : flash.geom.Rectangle;
	function getCharIndexAtPoint(x : Float, y : Float) : Int;
	function getFirstCharInParagraph(charIndex : Int) : Int;
	function getImageReference(id : String) : flash.display.DisplayObject;
	function getLineIndexAtPoint(x : Float, y : Float) : Int;
	function getLineIndexOfChar(charIndex : Int) : Int;
	function getLineLength(lineIndex : Int) : Int;
	function getLineMetrics(lineIndex : Int) : TextLineMetrics;
	function getLineOffset(lineIndex : Int) : Int;
	function getLineText(lineIndex : Int) : String;
	function getParagraphLength(charIndex : Int) : Int;
	function getRawText() : String;
	function getTextFormat(beginIndex : Int = -1, endIndex : Int = -1) : TextFormat;
	function getTextRuns(beginIndex : Int = 0, endIndex : Int = 2147483647) : Array<Dynamic>;
	function getXMLText(beginIndex : Int = 0, endIndex : Int = 2147483647) : String;
	private function get_alwaysShowSelection() : Bool;
	private function get_antiAliasType() : AntiAliasType;
	private function get_autoSize() : TextFieldAutoSize;
	private function get_background() : Bool;
	private function get_backgroundColor() : UInt;
	private function get_border() : Bool;
	private function get_borderColor() : UInt;
	private function get_bottomScrollV() : Int;
	private function get_caretIndex() : Int;
	private function get_condenseWhite() : Bool;
	private function get_defaultTextFormat() : TextFormat;
	private function get_displayAsPassword() : Bool;
	private function get_embedFonts() : Bool;
	private function get_gridFitType() : GridFitType;
	private function get_htmlText() : String;
	private function get_length() : Int;
	private function get_maxChars() : Int;
	private function get_maxScrollH() : Int;
	private function get_maxScrollV() : Int;
	private function get_mouseWheelEnabled() : Bool;
	private function get_multiline() : Bool;
	private function get_numLines() : Int;
	private function get_restrict() : String;
	private function get_scrollH() : Int;
	private function get_scrollV() : Int;
	private function get_selectable() : Bool;
	private function get_selectedText() : String;
	private function get_selectionBeginIndex() : Int;
	private function get_selectionEndIndex() : Int;
	private function get_sharpness() : Float;
	private function get_styleSheet() : StyleSheet;
	private function get_text() : String;
	private function get_textColor() : UInt;
	private function get_textHeight() : Float;
	private function get_textInteractionMode() : TextInteractionMode;
	private function get_textWidth() : Float;
	private function get_thickness() : Float;
	private function get_type() : TextFieldType;
	private function get_useRichTextClipboard() : Bool;
	private function get_wordWrap() : Bool;
	function insertXMLText(beginIndex : Int, endIndex : Int, richText : String, pasting : Bool = false) : Void;
	@:ns("flash.text",internal) function pasteRichText(richText : String) : Bool;
	function replaceSelectedText(value : String) : Void;
	function replaceText(beginIndex : Int, endIndex : Int, newText : String) : Void;
	function setSelection(beginIndex : Int, endIndex : Int) : Void;
	function setTextFormat(format : TextFormat, beginIndex : Int = -1, endIndex : Int = -1) : Void;
	private function set_alwaysShowSelection(value : Bool) : Bool;
	private function set_antiAliasType(value : AntiAliasType) : AntiAliasType;
	private function set_autoSize(value : TextFieldAutoSize) : TextFieldAutoSize;
	private function set_background(value : Bool) : Bool;
	private function set_backgroundColor(value : UInt) : UInt;
	private function set_border(value : Bool) : Bool;
	private function set_borderColor(value : UInt) : UInt;
	private function set_condenseWhite(value : Bool) : Bool;
	private function set_defaultTextFormat(value : TextFormat) : TextFormat;
	private function set_displayAsPassword(value : Bool) : Bool;
	private function set_embedFonts(value : Bool) : Bool;
	private function set_gridFitType(value : GridFitType) : GridFitType;
	private function set_htmlText(value : String) : String;
	private function set_maxChars(value : Int) : Int;
	private function set_mouseWheelEnabled(value : Bool) : Bool;
	private function set_multiline(value : Bool) : Bool;
	private function set_restrict(value : String) : String;
	private function set_scrollH(value : Int) : Int;
	private function set_scrollV(value : Int) : Int;
	private function set_selectable(value : Bool) : Bool;
	private function set_sharpness(value : Float) : Float;
	private function set_styleSheet(value : StyleSheet) : StyleSheet;
	private function set_text(value : String) : String;
	private function set_textColor(value : UInt) : UInt;
	private function set_thickness(value : Float) : Float;
	private function set_type(value : TextFieldType) : TextFieldType;
	private function set_useRichTextClipboard(value : Bool) : Bool;
	private function set_wordWrap(value : Bool) : Bool;
	@:require(flash10) static function isFontCompatible(fontName : String, fontStyle : String) : Bool;
}
