Sets styles on a Feathers UI component by passing the component to a callback function when the style provider's applyStyles() method is called.

In the following example, a FunctionStyleProvider is created:

var button = new Button();
button.text = "Click Me";
button.styleProvider = new FunctionStyleProvider(function(target:Button):Void
{
	target.backgroundSkin = new Bitmap(bitmapData);
	// set other styles...
});
this.addChild(button);

Events:

feathers.events.StyleProviderEvent.STYLES_CHANGE

Dispatched when the styles have changed, and style objects should request for their styles to be re-applied.

Available since

1.0.0

.

See also:

Constructor

new(?callback:Dynamic ‑> Void)

Creates a new FunctionStyleProvider object with the given arguments.

Available since

1.0.0

.

Variables

@:bindable("stylesChange")callback:Dynamic ‑> Void

The function that is called when this style provider is asked to apply styles to a target object.

Available since

1.0.0

.

Methods

applyStyles(target:IStyleObject):Void

Applies styles to the target object.

Available since

1.0.0

.