new GOWN.List(theme)
The basic list
Name | Type | Description |
---|---|---|
theme |
GOWN.Theme | optional theme for the list |
Extends
Members
-
static,readonlyGOWN.List.CHANGEString
-
Dispatched when the selected item changes.
-
static,readonlyGOWN.List.SKIN_NAMEString
-
Default list skin name
-
_clipContent
-
use mask to clip content
-
_interactionMode
-
the default interaction mode is drag-and-drop OR use the scrollbars
-
_scrollPosition
-
calculated horizontal and vertical scroll positions
-
_startScrollPosition
-
scroll positions at the start of an interaction (changed on touchstart/mousedown)
-
_startTouch
-
start touch/mouse position (changed on touchstart/mousedown)
-
_verticalScrollPolicy
-
scroll policy for vertical and horizontal ScrollBar (translates to x/y position of the viewport and scroll positions)
-
_viewPortOffset
-
offsets for the mask of the viewport (see this._viewport.mask)
-
allowMultipleSelectionbool
-
Allow/disallow multiple selection. If selection has been disallowed, deselect all but one.
-
dataProviderArray
-
dataProvider for list. The dataProvider is a structure that provides the data. In its simplest form it is an array containing the data
-
enabledBoolean
-
Enables/Disables the control. (not implemented yet)
-
itemRendererFactoryfunction
-
Set item renderer factory (for custom item Renderer)
-
itemRendererPropertiesObject
-
Set item renderer properties for the GOWN.List
-
itemRendererPropertiesObject
-
Set item renderer properties (e.g. labelField) and update all itemRenderer
-
layoutLayoutAlignment
-
Set layout and pass event listener to it
-
scrollInvalid
-
scrollInvalid will force viewport to set its x/y position according to horizontal/vertical Scroll Position next redraw
-
selectedIndexNumber
-
The index of the selected item
-
skinNameString
-
The skin name
- Default Value:
- List.SKIN_NAME
Methods
-
inherited _throwToTween(targetPosition, direction, duration)
-
manage tween to throw to horizontal or vertical position call finishScrolling when tween reaches the end position
Name Type Description targetPosition
number target position in pixel direction
String direction ('horizontal' or 'vertical') duration
number time needed to reach target position (in ms) -
inherited createScrollBars()
-
Creates and adds the
horizontalScrollBar
andverticalScrollBar
sub-components and removes the old instances, if they exist.Meant for internal use, and subclasses may override this function with a custom implementation.
-
protecteditemChangeHandler()
-
Gets called when new data is added or removed to the dataProvider
-
protecteditemRendererChangeHandler()
-
Item catch/forward renderer change event. This is thrown when the state of the itemRenderer changes (e.g. from unselected to selected), not when the data changes
-
inherited mousePos(){PIXI.Point}
-
Get the local mouse position from PIXI.InteractionData
Returns:
Type Description PIXI.Point -
protectedredraw()
-
Update before draw call
-
inherited refreshMask()
-
update the rectangle that defines the clipping area
-
refreshRenderers()
-
Refresh the renderers
-
selectItem(item)
-
Select one of the items
Name Type Description item
String The item to select -
inherited setTheme(theme)
-
Change the theme (every control can have a theme, even if it does not inherit Skinable, e.g. if there is only some color in the skin that will be taken or if it has some skinable components as children)
Name Type Description theme
GOWN.Theme the new theme -
inherited throwTo(targetHorizontalScrollPosition, targetVerticalScrollPosition, duration)
-
throw the scroller to the specified position
Name Type Description targetHorizontalScrollPosition
as PIXI.Point targetVerticalScrollPosition
as PIXI.Point duration