C# Класс FairyGUI.GComponent

Component
Наследование: GObject
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_boundsChanged bool
_margin Margin
_trackBounds bool

Открытые методы

Метод Описание
AddChild ( GObject child ) : GObject

Add a child to the component. It will be at the frontmost position.

AddChildAt ( GObject child, int index ) : GObject

Adds a child to the component at a certain index.

AddController ( FairyGUI.Controller controller ) : void

Adds a controller to the container.

ConstructFromResource ( ) : void
ConstructFromXML ( XML xml ) : void

Method for extensions to override

Dispose ( ) : void
EnsureBoundsCorrect ( ) : void

Make sure the bounds of the component is correct. Bounds of the component is not updated on every changed. For example, you add a new child to the list, children in the list will be rearranged in next frame. If you want to access the correct child position immediatelly, call this function first.

GComponent ( ) : System
GetChild ( string name ) : GObject

Returns a child object with a certain name.

GetChildAt ( int index ) : GObject

Returns a child object at a certain index. If index out of bounds, exception raised.

GetChildInGroup ( FairyGUI.GGroup group, string name ) : GObject

Returns a child object belong to a group with a certain name.

GetChildIndex ( GObject child ) : int

Returns the index of a child within the container, or "-1" if it is not found.

GetChildren ( ) : FairyGUI.GObject[]

Returns a copy of all children with an array.

GetController ( string name ) : FairyGUI.Controller

Returns a controller object with a certain name.

GetControllerAt ( int index ) : FairyGUI.Controller

Returns a controller object at a certain index.

GetFirstChildInView ( ) : int
GetTransition ( string name ) : Transition

Returns a transition object at a certain name.

GetTransitionAt ( int index ) : Transition

Returns a transition object at a certain index.

GetVisibleChild ( string name ) : GObject

Returns a visible child object with a certain name.

InvalidateBatchingState ( bool childChanged ) : void
IsAncestorOf ( GObject obj ) : bool

IsChildInView ( GObject child ) : bool

Test if a child is in view.

RemoveChild ( GObject child ) : GObject

Removes a child from the component. If the object is not a child, nothing happens.

RemoveChild ( GObject child, bool dispose ) : GObject

Removes a child from the component. If the object is not a child, nothing happens.

RemoveChildAt ( int index ) : GObject

Removes a child at a certain index. Children above the child will move down.

RemoveChildAt ( int index, bool dispose ) : GObject

Removes a child at a certain index. Children above the child will move down.

RemoveChildren ( ) : void

Remove all children.

RemoveChildren ( int beginIndex, int endIndex, bool dispose ) : void

Removes a range of children from the container (endIndex included).

RemoveController ( FairyGUI.Controller c ) : void

Removes a controller from the container.

SetBoundsChangedFlag ( ) : void

Notify the component the bounds should recaculate.

SetChildIndex ( GObject child, int index ) : void

Moves a child to a certain index. Children at and after the replaced position move up.

SetChildIndexBefore ( GObject child, int index ) : int

Moves a child to a certain position which is in front of the child previously at given index. 与SetChildIndex不同的是,如果child原来在index的前面,那么child插入的位置是index-1,即保证排在原来占据index的对象的前面。

SwapChildren ( GObject child1, GObject child2 ) : void

Swaps the indexes of two children.

SwapChildrenAt ( int index1, int index2 ) : void

Swaps the indexes of two children.

Защищенные методы

Метод Описание
CreateDisplayObject ( ) : void
GetSnappingPosition ( float &xValue, float &yValue ) : void
HandleGrayedChanged ( ) : void
HandleSizeChanged ( ) : void
OnUpdate ( ) : void
SetBounds ( float ax, float ay, float aw, float ah ) : void
SetupOverflow ( OverflowType overflow ) : void
SetupScroll ( Margin scrollBarMargin, ScrollType scroll, ScrollBarDisplayType scrollBarDisplay, int flags, String vtScrollBarRes, String hzScrollBarRes ) : void
UpdateBounds ( ) : void

Приватные методы

Метод Описание
AdjustRadioGroupDepth ( GObject obj, FairyGUI.Controller c ) : void
ApplyAllControllers ( ) : void
ApplyController ( FairyGUI.Controller c ) : void
BuildNativeDisplayList ( ) : void
ChildSortingOrderChanged ( GObject child, int oldValue, int newValue ) : void
ChildStateChanged ( GObject child ) : void
ConstructFromResource ( List objectPool, int poolIndex ) : void
GetChildById ( string id ) : GObject
GetInsertPosForSortingChild ( GObject target ) : int
UpdateClipRect ( ) : void
_SetChildIndex ( GObject child, int oldIndex, int index ) : int
__addedToStage ( ) : void
__removedFromStage ( ) : void

Описание методов

AddChild() публичный Метод

Add a child to the component. It will be at the frontmost position.
public AddChild ( GObject child ) : GObject
child GObject A child object
Результат GObject

AddChildAt() публичный Метод

Adds a child to the component at a certain index.
public AddChildAt ( GObject child, int index ) : GObject
child GObject A child object
index int Index
Результат GObject

AddController() публичный Метод

Adds a controller to the container.
public AddController ( FairyGUI.Controller controller ) : void
controller FairyGUI.Controller Controller object
Результат void

ConstructFromResource() публичный Метод

public ConstructFromResource ( ) : void
Результат void

ConstructFromXML() публичный Метод

Method for extensions to override
public ConstructFromXML ( XML xml ) : void
xml FairyGUI.Utils.XML
Результат void

CreateDisplayObject() защищенный Метод

protected CreateDisplayObject ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

EnsureBoundsCorrect() публичный Метод

Make sure the bounds of the component is correct. Bounds of the component is not updated on every changed. For example, you add a new child to the list, children in the list will be rearranged in next frame. If you want to access the correct child position immediatelly, call this function first.
public EnsureBoundsCorrect ( ) : void
Результат void

GComponent() публичный Метод

public GComponent ( ) : System
Результат System

GetChild() публичный Метод

Returns a child object with a certain name.
public GetChild ( string name ) : GObject
name string Name
Результат GObject

GetChildAt() публичный Метод

Returns a child object at a certain index. If index out of bounds, exception raised.
public GetChildAt ( int index ) : GObject
index int Index
Результат GObject

GetChildInGroup() публичный Метод

Returns a child object belong to a group with a certain name.
public GetChildInGroup ( FairyGUI.GGroup group, string name ) : GObject
group FairyGUI.GGroup A group object
name string Name
Результат GObject

GetChildIndex() публичный Метод

Returns the index of a child within the container, or "-1" if it is not found.
public GetChildIndex ( GObject child ) : int
child GObject A child object
Результат int

GetChildren() публичный Метод

Returns a copy of all children with an array.
public GetChildren ( ) : FairyGUI.GObject[]
Результат FairyGUI.GObject[]

GetController() публичный Метод

Returns a controller object with a certain name.
public GetController ( string name ) : FairyGUI.Controller
name string Name
Результат FairyGUI.Controller

GetControllerAt() публичный Метод

Returns a controller object at a certain index.
public GetControllerAt ( int index ) : FairyGUI.Controller
index int Index
Результат FairyGUI.Controller

GetFirstChildInView() публичный Метод

public GetFirstChildInView ( ) : int
Результат int

GetSnappingPosition() защищенный Метод

protected GetSnappingPosition ( float &xValue, float &yValue ) : void
xValue float
yValue float
Результат void

GetTransition() публичный Метод

Returns a transition object at a certain name.
public GetTransition ( string name ) : Transition
name string Name
Результат Transition

GetTransitionAt() публичный Метод

Returns a transition object at a certain index.
public GetTransitionAt ( int index ) : Transition
index int Index
Результат Transition

GetVisibleChild() публичный Метод

Returns a visible child object with a certain name.
public GetVisibleChild ( string name ) : GObject
name string Name
Результат GObject

HandleGrayedChanged() защищенный Метод

protected HandleGrayedChanged ( ) : void
Результат void

HandleSizeChanged() защищенный Метод

protected HandleSizeChanged ( ) : void
Результат void

InvalidateBatchingState() публичный Метод

public InvalidateBatchingState ( bool childChanged ) : void
childChanged bool
Результат void

IsAncestorOf() публичный Метод

public IsAncestorOf ( GObject obj ) : bool
obj GObject
Результат bool

IsChildInView() публичный Метод

Test if a child is in view.
public IsChildInView ( GObject child ) : bool
child GObject A child object
Результат bool

OnUpdate() защищенный Метод

protected OnUpdate ( ) : void
Результат void

RemoveChild() публичный Метод

Removes a child from the component. If the object is not a child, nothing happens.
public RemoveChild ( GObject child ) : GObject
child GObject A child object
Результат GObject

RemoveChild() публичный Метод

Removes a child from the component. If the object is not a child, nothing happens.
public RemoveChild ( GObject child, bool dispose ) : GObject
child GObject A child object
dispose bool If true, the child will be disposed right away.
Результат GObject

RemoveChildAt() публичный Метод

Removes a child at a certain index. Children above the child will move down.
public RemoveChildAt ( int index ) : GObject
index int Index
Результат GObject

RemoveChildAt() публичный Метод

Removes a child at a certain index. Children above the child will move down.
public RemoveChildAt ( int index, bool dispose ) : GObject
index int Index
dispose bool If true, the child will be disposed right away.
Результат GObject

RemoveChildren() публичный Метод

Remove all children.
public RemoveChildren ( ) : void
Результат void

RemoveChildren() публичный Метод

Removes a range of children from the container (endIndex included).
public RemoveChildren ( int beginIndex, int endIndex, bool dispose ) : void
beginIndex int Begin index.
endIndex int End index.(Included).
dispose bool If true, the child will be disposed right away.
Результат void

RemoveController() публичный Метод

Removes a controller from the container.
public RemoveController ( FairyGUI.Controller c ) : void
c FairyGUI.Controller Controller object.
Результат void

SetBounds() защищенный Метод

protected SetBounds ( float ax, float ay, float aw, float ah ) : void
ax float
ay float
aw float
ah float
Результат void

SetBoundsChangedFlag() публичный Метод

Notify the component the bounds should recaculate.
public SetBoundsChangedFlag ( ) : void
Результат void

SetChildIndex() публичный Метод

Moves a child to a certain index. Children at and after the replaced position move up.
public SetChildIndex ( GObject child, int index ) : void
child GObject A Child
index int Index
Результат void

SetChildIndexBefore() публичный Метод

Moves a child to a certain position which is in front of the child previously at given index. 与SetChildIndex不同的是,如果child原来在index的前面,那么child插入的位置是index-1,即保证排在原来占据index的对象的前面。
public SetChildIndexBefore ( GObject child, int index ) : int
child GObject
index int
Результат int

SetupOverflow() защищенный Метод

protected SetupOverflow ( OverflowType overflow ) : void
overflow OverflowType
Результат void

SetupScroll() защищенный Метод

protected SetupScroll ( Margin scrollBarMargin, ScrollType scroll, ScrollBarDisplayType scrollBarDisplay, int flags, String vtScrollBarRes, String hzScrollBarRes ) : void
scrollBarMargin Margin
scroll ScrollType
scrollBarDisplay ScrollBarDisplayType
flags int
vtScrollBarRes String
hzScrollBarRes String
Результат void

SwapChildren() публичный Метод

Swaps the indexes of two children.
public SwapChildren ( GObject child1, GObject child2 ) : void
child1 GObject A child object
child2 GObject A child object
Результат void

SwapChildrenAt() публичный Метод

Swaps the indexes of two children.
public SwapChildrenAt ( int index1, int index2 ) : void
index1 int index of first child
index2 int index of second child
Результат void

UpdateBounds() защищенный Метод

protected UpdateBounds ( ) : void
Результат void

Описание свойств

_boundsChanged защищенное свойство

protected bool _boundsChanged
Результат bool

_margin защищенное свойство

protected Margin,FairyGUI _margin
Результат Margin

_trackBounds защищенное свойство

protected bool _trackBounds
Результат bool