C# Class FairyGUI.GList

Inheritance: GComponent
Mostra file Open project: fairygui/FairyGUI-unity Class Usage Examples

Public Properties

Property Type Description
autoResizeItem bool
defaultItem string
foldInvisibleItems bool
itemProvider ListItemProvider
itemRenderer ListItemRenderer
scrollItemToViewOnClick bool
selectionMode ListSelectionMode

Public Methods

Method Description
AddChildAt ( GObject child, int index ) : GObject

AddItemFromPool ( ) : GObject

Add a item to list, same as GetFromPool+AddChild

AddItemFromPool ( string url ) : GObject

Add a item to list, same as GetFromPool+AddChild

AddSelection ( int index, bool scrollItToView ) : void

AdjustItemsSize ( ) : void

CheckVirtualList ( ) : void
ChildIndexToItemIndex ( int index ) : int
ClearSelection ( ) : void

ClearSelectionExcept ( GObject obj ) : void
Dispose ( ) : void
GList ( ) : System
GetFirstChildInView ( ) : int

Get first child in view.

GetFromPool ( string url ) : GObject

GetSelection ( ) : List

HandleArchOrder1 ( ) : void
HandleArchOrder2 ( ) : void
HandleArrowKey ( int dir ) : void

HandleScroll ( bool forceUpdate ) : void
HandleScroll1 ( bool forceUpdate ) : void
HandleScroll2 ( bool forceUpdate ) : void
HandleScroll3 ( bool forceUpdate ) : void
ItemIndexToChildIndex ( int index ) : int
RefreshVirtualList ( ) : void
RefreshVirtualList ( object param ) : void
RemoveChildAt ( int index, bool dispose ) : GObject

RemoveChildToPool ( GObject child ) : void

RemoveChildToPoolAt ( int index ) : void

RemoveChildrenToPool ( ) : void

RemoveChildrenToPool ( int beginIndex, int endIndex ) : void

RemoveSelection ( int index ) : void

ResizeToFit ( int itemCount ) : void

Resize to list size to fit specified item count. If list layout is single column or flow horizontally, the height will change to fit. If list layout is single row or flow vertically, the width will change to fit.

ResizeToFit ( int itemCount, int minSize ) : void

Resize to list size to fit specified item count. If list layout is single column or flow horizontally, the height will change to fit. If list layout is single row or flow vertically, the width will change to fit.

ReturnToPool ( GObject obj ) : void
ScrollToView ( int index ) : void

Scroll the list to make an item with certain index visible.

ScrollToView ( int index, bool ani ) : void

Scroll the list to make an item with certain index visible.

ScrollToView ( int index, bool ani, bool setFirst ) : void

Scroll the list to make an item with certain index visible.

SelectAll ( ) : void

SelectNone ( ) : void

SelectReverse ( ) : void

SetSelectionOnEvent ( GObject item, FairyGUI.InputEvent evt ) : void
SetVirtual ( ) : void

Set the list to be virtual list. 设置列表为虚拟列表模式。在虚拟列表模式下,列表不会为每一条列表数据创建一个实体对象,而是根据视口大小创建最小量的显示对象,然后通过itemRenderer指定的回调函数设置列表数据。 在虚拟模式下,你不能通过AddChild、RemoveChild等方式管理列表,只能通过设置numItems设置列表数据的长度。 如果要刷新列表,可以通过重新设置numItems,或者调用RefreshVirtualList完成。 ‘单行’或者‘单列’的列表布局可支持不等高的列表项目。 除了‘页面’的列表布局,其他布局均支持使用不同资源构建列表项目,你可以在itemProvider里返回。如果不提供,默认使用defaultItem。

SetVirtual ( bool loop ) : void
SetVirtualAndLoop ( ) : void

Set the list to be virtual list, and has loop behavior.

SetVirtualListChangedFlag ( bool layoutChanged ) : void
Setup_BeforeAdd ( XML xml ) : void
__clickItem ( EventContext context ) : void
__itemTouchBegin ( EventContext context ) : void
__scrolled ( EventContext context ) : void

Protected Methods

Method Description
GetSnappingPosition ( float &xValue, float &yValue ) : void
HandleSizeChanged ( ) : void

UpdateBounds ( ) : void

Private Methods

Method Description
GetIndexOnPos1 ( float &pos, bool forceUpdate ) : int
GetIndexOnPos2 ( float &pos, bool forceUpdate ) : int
GetIndexOnPos3 ( float &pos, bool forceUpdate ) : int
HandleAlign ( float contentWidth, float contentHeight ) : void

Method Details

AddChildAt() public method

public AddChildAt ( GObject child, int index ) : GObject
child GObject
index int
return GObject

AddItemFromPool() public method

Add a item to list, same as GetFromPool+AddChild
public AddItemFromPool ( ) : GObject
return GObject

AddItemFromPool() public method

Add a item to list, same as GetFromPool+AddChild
public AddItemFromPool ( string url ) : GObject
url string Item resource url
return GObject

AddSelection() public method

public AddSelection ( int index, bool scrollItToView ) : void
index int
scrollItToView bool
return void

AdjustItemsSize() public method

public AdjustItemsSize ( ) : void
return void

CheckVirtualList() public method

public CheckVirtualList ( ) : void
return void

ChildIndexToItemIndex() public method

public ChildIndexToItemIndex ( int index ) : int
index int
return int

ClearSelection() public method

public ClearSelection ( ) : void
return void

ClearSelectionExcept() public method

public ClearSelectionExcept ( GObject obj ) : void
obj GObject
return void

Dispose() public method

public Dispose ( ) : void
return void

GList() public method

public GList ( ) : System
return System

GetFirstChildInView() public method

Get first child in view.
public GetFirstChildInView ( ) : int
return int

GetFromPool() public method

public GetFromPool ( string url ) : GObject
url string
return GObject

GetSelection() public method

public GetSelection ( ) : List
return List

GetSnappingPosition() protected method

protected GetSnappingPosition ( float &xValue, float &yValue ) : void
xValue float
yValue float
return void

HandleArchOrder1() public method

public HandleArchOrder1 ( ) : void
return void

HandleArchOrder2() public method

public HandleArchOrder2 ( ) : void
return void

HandleArrowKey() public method

public HandleArrowKey ( int dir ) : void
dir int
return void

HandleScroll() public method

public HandleScroll ( bool forceUpdate ) : void
forceUpdate bool
return void

HandleScroll1() public method

public HandleScroll1 ( bool forceUpdate ) : void
forceUpdate bool
return void

HandleScroll2() public method

public HandleScroll2 ( bool forceUpdate ) : void
forceUpdate bool
return void

HandleScroll3() public method

public HandleScroll3 ( bool forceUpdate ) : void
forceUpdate bool
return void

HandleSizeChanged() protected method

protected HandleSizeChanged ( ) : void
return void

ItemIndexToChildIndex() public method

public ItemIndexToChildIndex ( int index ) : int
index int
return int

RefreshVirtualList() public method

public RefreshVirtualList ( ) : void
return void

RefreshVirtualList() public method

public RefreshVirtualList ( object param ) : void
param object
return void

RemoveChildAt() public method

public RemoveChildAt ( int index, bool dispose ) : GObject
index int
dispose bool
return GObject

RemoveChildToPool() public method

public RemoveChildToPool ( GObject child ) : void
child GObject
return void

RemoveChildToPoolAt() public method

public RemoveChildToPoolAt ( int index ) : void
index int
return void

RemoveChildrenToPool() public method

public RemoveChildrenToPool ( ) : void
return void

RemoveChildrenToPool() public method

public RemoveChildrenToPool ( int beginIndex, int endIndex ) : void
beginIndex int
endIndex int
return void

RemoveSelection() public method

public RemoveSelection ( int index ) : void
index int
return void

ResizeToFit() public method

Resize to list size to fit specified item count. If list layout is single column or flow horizontally, the height will change to fit. If list layout is single row or flow vertically, the width will change to fit.
public ResizeToFit ( int itemCount ) : void
itemCount int Item count
return void

ResizeToFit() public method

Resize to list size to fit specified item count. If list layout is single column or flow horizontally, the height will change to fit. If list layout is single row or flow vertically, the width will change to fit.
public ResizeToFit ( int itemCount, int minSize ) : void
itemCount int >Item count
minSize int If the result size if smaller than minSize, then use minSize.
return void

ReturnToPool() public method

public ReturnToPool ( GObject obj ) : void
obj GObject
return void

ScrollToView() public method

Scroll the list to make an item with certain index visible.
public ScrollToView ( int index ) : void
index int Item index
return void

ScrollToView() public method

Scroll the list to make an item with certain index visible.
public ScrollToView ( int index, bool ani ) : void
index int Item index
ani bool True to scroll smoothly, othewise immdediately.
return void

ScrollToView() public method

Scroll the list to make an item with certain index visible.
public ScrollToView ( int index, bool ani, bool setFirst ) : void
index int Item index
ani bool True to scroll smoothly, othewise immdediately.
setFirst bool If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view.
return void

SelectAll() public method

public SelectAll ( ) : void
return void

SelectNone() public method

public SelectNone ( ) : void
return void

SelectReverse() public method

public SelectReverse ( ) : void
return void

SetSelectionOnEvent() public method

public SetSelectionOnEvent ( GObject item, FairyGUI.InputEvent evt ) : void
item GObject
evt FairyGUI.InputEvent
return void

SetVirtual() public method

Set the list to be virtual list. 设置列表为虚拟列表模式。在虚拟列表模式下,列表不会为每一条列表数据创建一个实体对象,而是根据视口大小创建最小量的显示对象,然后通过itemRenderer指定的回调函数设置列表数据。 在虚拟模式下,你不能通过AddChild、RemoveChild等方式管理列表,只能通过设置numItems设置列表数据的长度。 如果要刷新列表,可以通过重新设置numItems,或者调用RefreshVirtualList完成。 ‘单行’或者‘单列’的列表布局可支持不等高的列表项目。 除了‘页面’的列表布局,其他布局均支持使用不同资源构建列表项目,你可以在itemProvider里返回。如果不提供,默认使用defaultItem。
public SetVirtual ( ) : void
return void

SetVirtual() public method

public SetVirtual ( bool loop ) : void
loop bool
return void

SetVirtualAndLoop() public method

Set the list to be virtual list, and has loop behavior.
public SetVirtualAndLoop ( ) : void
return void

SetVirtualListChangedFlag() public method

public SetVirtualListChangedFlag ( bool layoutChanged ) : void
layoutChanged bool
return void

Setup_BeforeAdd() public method

public Setup_BeforeAdd ( XML xml ) : void
xml FairyGUI.Utils.XML
return void

UpdateBounds() protected method

protected UpdateBounds ( ) : void
return void

__clickItem() public method

public __clickItem ( EventContext context ) : void
context EventContext
return void

__itemTouchBegin() public method

public __itemTouchBegin ( EventContext context ) : void
context EventContext
return void

__scrolled() public method

public __scrolled ( EventContext context ) : void
context EventContext
return void

Property Details

autoResizeItem public_oe property

If the item will resize itself to fit the list width/height.
public bool autoResizeItem
return bool

defaultItem public_oe property

Resource url of the default item.
public string defaultItem
return string

foldInvisibleItems public_oe property

如果true,当item不可见时自动折叠,否则依然占位
public bool foldInvisibleItems
return bool

itemProvider public_oe property

Callback funtion to return item resource url.
public ListItemProvider itemProvider
return ListItemProvider

itemRenderer public_oe property

Callback function when an item is needed to update its look.
public ListItemRenderer itemRenderer
return ListItemRenderer

scrollItemToViewOnClick public_oe property

public bool scrollItemToViewOnClick
return bool

selectionMode public_oe property

List selection mode
public ListSelectionMode selectionMode
return ListSelectionMode