scaffold.libs_as.feathers.controls.IScrollContainer.as Maven / Gradle / Ivy
/*
Feathers
Copyright 2012-2015 Bowler Hat LLC. All Rights Reserved.
This program is free software. You can redistribute and/or modify it in
accordance with the terms of the accompanying license agreement.
*/
package feathers.controls
{
import feathers.core.IFeathersControl;
import starling.display.DisplayObject;
/**
* Defines functions for a Scroller
subclass that delegates
* display list manipulations to its IViewPort
.
*
* Mainly intended for ScrollContainer
, but other subclasses
* of Scroller
could possibly implement it too.
*
* @see feathers.controls.Scroller
* @see feathers.controls.ScrollContainer
*/
public interface IScrollContainer extends IFeathersControl
{
/**
* Returns the number of raw children that are added directly to the
* Scroller
rather than delegating the call to the view
* port.
*/
function get numRawChildren():int;
/**
* Gets the name of a direct child of the Scroller
rather
* than delegating the call to the view port.
*/
function getRawChildByName(name:String):DisplayObject;
/**
* Gets the index of a direct child of the Scroller
rather
* than delegating the call to the view port.
*/
function getRawChildIndex(child:DisplayObject):int;
/**
* Gets the direct child of the Scroller
at a specific
* index rather than delegating the call to the view port.
*/
function getRawChildAt(index:int):DisplayObject;
/**
* Sets the index of a direct child of the Scroller
rather
* than delegating the call to the view port.
*/
function setRawChildIndex(child:DisplayObject, index:int):void;
/**
* Adds a child to the Scroller
rather than delegating the
* call to the view port.
*/
function addRawChild(child:DisplayObject):DisplayObject;
/**
* Adds a child to the Scroller
at a specific index rather
* than delegating the call to the view port.
*/
function addRawChildAt(child:DisplayObject, index:int):DisplayObject;
/**
* Removes a child from the Scroller
rather than delegating
* the call to the view port.
*/
function removeRawChild(child:DisplayObject, dispose:Boolean = false):DisplayObject;
/**
* Removes a child from the Scroller
at a specific index
* rather than delegating the call to the view port.
*/
function removeRawChildAt(index:int, dispose:Boolean = false):DisplayObject;
/**
* Swaps the children of the Scroller
rather than
* delegating the call to the view port.
*/
function swapRawChildren(child1:DisplayObject, child2:DisplayObject):void;
/**
* Swaps the children of the Scroller
rather than
* delegating the call to the view port.
*/
function swapRawChildrenAt(index1:int, index2:int):void;
/**
* Sorts the children of the Scroller
rather than
* delegating the call to the view port.
*/
function sortRawChildren(compareFunction:Function):void;
}
}