package starling.display {
import starling.textures.Texture;
import starling.text.TextFormat;
import starling.styles.MeshStyle;
import openfl.geom.Rectangle;
import openfl.geom.Point;
[Event(name="triggered",type="starling.events.Event")]
/**
 *  Dispatched when the user triggers the button. Bubbles. 
 * @externs
 */
public class Button extends starling.display.DisplayObjectContainer {
	/**
	 *  Creates a button with a set of state-textures and (optionally) some text.
	 *      * Any state that is left 'null' will display the up-state texture. Beware that all
	 *      * state textures should have the same dimensions. 
	 */
	public function Button(upState:starling.textures.Texture, text:String = undefined, downState:starling.textures.Texture = undefined, overState:starling.textures.Texture = undefined, disabledState:starling.textures.Texture = undefined) {
		super();
	}
	/**
	 *  @inheritDoc 
	 */
	override public function dispose():void {}
	/**
	 *  @private 
	 */
	override public function hitTest(localPoint:openfl.geom.Point):starling.display.DisplayObject { return null; }
	/**
	 *  Readjusts the dimensions of the button according to its current state texture.
	 *      * Call this method to synchronize button and texture size after assigning a texture
	 *      * with a different size. Per default, this method also resets the bounds of the
	 *      * button's text. 
	 */
	public function readjustSize(resetTextBounds:Boolean = undefined):void {}
	/**
	 *  The current state of the button. The corresponding strings are found
	 *      * in the ButtonState class. 
	 */
	public function get state():String { return null; }
	public function set state(value:String):void {}
	/**
	 *  The scale factor of the button on touch. Per default, a button without a down state
	 *      * texture will be made slightly smaller, while a button with a down state texture
	 *      * remains unscaled. 
	 */
	public function get scaleWhenDown():Number { return 0; }
	public function set scaleWhenDown(value:Number):void {}
	/**
	 *  The scale factor of the button while the mouse cursor hovers over it. @default 1.0 
	 */
	public function get scaleWhenOver():Number { return 0; }
	public function set scaleWhenOver(value:Number):void {}
	/**
	 *  The alpha value of the button on touch. @default 1.0 
	 */
	public function get alphaWhenDown():Number { return 0; }
	public function set alphaWhenDown(value:Number):void {}
	/**
	 *  The alpha value of the button when it is disabled. @default 0.5 
	 */
	public function get alphaWhenDisabled():Number { return 0; }
	public function set alphaWhenDisabled(value:Number):void {}
	/**
	 *  Indicates if the button can be triggered. 
	 */
	public function get enabled():Boolean { return false; }
	public function set enabled(value:Boolean):void {}
	/**
	 *  The text that is displayed on the button. 
	 */
	public function get text():String { return null; }
	public function set text(value:String):void {}
	/**
	 *  The format of the button's TextField. 
	 */
	public function get textFormat():starling.text.TextFormat { return null; }
	public function set textFormat(value:starling.text.TextFormat):void {}
	/**
	 *  The style that is used to render the button's TextField. 
	 */
	public function get textStyle():starling.styles.MeshStyle { return null; }
	public function set textStyle(value:starling.styles.MeshStyle):void {}
	/**
	 *  The style that is used to render the button.
	 *      *  Note that a style instance may only be used on one mesh at a time. 
	 */
	public function get style():starling.styles.MeshStyle { return null; }
	public function set style(value:starling.styles.MeshStyle):void {}
	/**
	 *  The texture that is displayed when the button is not being touched. 
	 */
	public function get upState():starling.textures.Texture { return null; }
	public function set upState(value:starling.textures.Texture):void {}
	/**
	 *  The texture that is displayed while the button is touched. 
	 */
	public function get downState():starling.textures.Texture { return null; }
	public function set downState(value:starling.textures.Texture):void {}
	/**
	 *  The texture that is displayed while mouse hovers over the button. 
	 */
	public function get overState():starling.textures.Texture { return null; }
	public function set overState(value:starling.textures.Texture):void {}
	/**
	 *  The texture that is displayed when the button is disabled. 
	 */
	public function get disabledState():starling.textures.Texture { return null; }
	public function set disabledState(value:starling.textures.Texture):void {}
	/**
	 *  The bounds of the textfield on the button. Allows moving the text to a custom position. 
	 */
	public function get textBounds():openfl.geom.Rectangle { return null; }
	public function set textBounds(value:openfl.geom.Rectangle):void {}
	/**
	 *  The color of the button's state image. Just like every image object, each pixel's
	 *      * color is multiplied with this value. @default white 
	 */
	public function get color():int { return 0; }
	public function set color(value:int):void {}
	/**
	 *  The smoothing type used for the button's state image. 
	 */
	public function get textureSmoothing():String { return null; }
	public function set textureSmoothing(value:String):void {}
	/**
	 *  The overlay sprite is displayed on top of the button contents. It scales with the
	 *      * button when pressed. Use it to add additional objects to the button (e.g. an icon). 
	 */
	public function get overlay():starling.display.Sprite { return null; }
	/**
	 *  Controls whether or not the instance snaps to the nearest pixel. This can prevent the
	 *      *  object from looking blurry when it's not exactly aligned with the pixels of the screen.
	 *      *  @default true 
	 */
	public function get pixelSnapping():Boolean { return false; }
	public function set pixelSnapping(value:Boolean):void {}
	/**
	 *  The current scaling grid used for the button's state image. Use this property to create
	 *      *  buttons that resize in a smart way, i.e. with the four corners keeping the same size
	 *      *  and only stretching the center area.
	 *      *
	 *      *  @see Image#scale9Grid
	 *      *  @default null
	 *      
	 */
	public function get scale9Grid():openfl.geom.Rectangle { return null; }
	public function set scale9Grid(value:openfl.geom.Rectangle):void {}
	/**
	 *  The button's hit area will be extended to have at least this width / height.
	 * 	 *  @default on Desktop: 16, on mobile: 44 
	 */
	public function get minHitAreaSize():Number { return 0; }
	public function set minHitAreaSize(value:Number):void {}
	public function get_minHitAreaSize():Number { return 0; }
	public function set_minHitAreaSize(value:Number):Number { return 0; }
	/**
	 *  The distance you can move away your finger before triggering is aborted.
	 * 	 *  @default 50 
	 */
	public function get abortDistance():Number { return 0; }
	public function set abortDistance(value:Number):void {}
	public function get_abortDistance():Number { return 0; }
	public function set_abortDistance(value:Number):Number { return 0; }
}
}
