DisplayListMember that has the ability to hold other display objects (display list members)
NOTE: This is implemented here, not in Container only, because simple Components should have the ability to have children, without layout

C# | Visual Basic | Visual C++ |
public class DisplayObjectContainer : DisplayListMember, IChildList, ITrueChildList
Public Class DisplayObjectContainer _ Inherits DisplayListMember _ Implements IChildList, ITrueChildList
public ref class DisplayObjectContainer : public DisplayListMember, IChildList, ITrueChildList

All Members | Constructors | Methods | Properties | Fields | |
Icon | Member | Description |
---|---|---|
![]() | DisplayObjectContainer()()()() | Initializes a new instance of the DisplayObjectContainer class |
![]() | _depth | (Inherited from DisplayListMember.) |
![]() | AddChild(DisplayListMember) | |
![]() | AddChildAt(DisplayListMember, Int32) | |
![]() | AddEventListener(String, EventHandler) |
AddEventListener Overload
Assumes that useCapturePhase is false
(Inherited from DisplayListMember.) |
![]() | AddEventListener(String, EventHandler, EventPhase, Int32) |
Adds the event listener
(Inherited from EventDispatcher.) |
![]() | AddEventListener(String, EventHandler, EventPhase) |
Adds the event listener
(Inherited from EventDispatcher.) |
![]() | AddEventListener(String, EventHandler, Int32) |
Adds the event listener
(Inherited from EventDispatcher.) |
![]() | Alpha |
Alpha
(Inherited from DisplayObject.) |
![]() | AutoDisposeData | (Inherited from DisplayObject.) |
![]() | AutoUpdateDrawingList |
If true, the drawing list will update after each child addition or removal
The process of updating is being optimized by the Container
However, with DisplayObjectContainer it is not beacuse there are no invalidation methods
We might choose to optimize the process, set this to false and call the InvalidateDrawingList() manually
|
![]() | Bounds |
Bounds relative to Owner (bakes rect)
(Inherited from DisplayObject.) |
![]() | BringToFront()()()() |
Bring to front
(Inherited from DisplayListMember.) |
![]() | Children |
The child components of the container
|
![]() | ColorEnd()()()() | (Inherited from DisplayObject.) |
![]() | ColorStart()()()() | (Inherited from DisplayObject.) |
![]() | Contains(DisplayListMember) |
Returns true if child is the descendant of the component or the component itself
Non-exclusive variant
|
![]() | Contains(DisplayListMember, Boolean) | |
![]() | ContainsPoint(Point, Boolean) |
The place where the developer could implement the custom logic after the child removal
(Overrides DisplayObject.ContainsPoint(Point, Boolean).) |
![]() | Content |
GUIContent
This is the content used by Unity when rendering pieces of GUI
GUIContent consists of icon and label
(Inherited from DisplayObject.) |
![]() | Data |
The arbitrary data attached to this piece of GUI
(Inherited from DisplayObject.) |
![]() | DecreaseSkipFrameCount()()()() | (Inherited from DisplayObject.) |
![]() | Defer(DisplayObject..::..DeferedCall, Int32, array<Object>[]()[][]) |
Defers the function call for a given number of frames
(Inherited from DisplayObject.) |
![]() | Depth |
Crutial for fixing ScrollView and TextField click-throughs
(Inherited from DisplayListMember.) |
![]() | DispatchEvent(Event, Boolean) |
Dispatches an event with the option of late processing (immediate = TRUE/FALSE)
(Inherited from EventDispatcher.) |
![]() | DispatchEvent(Event) |
Dispatches an event immediatelly
(Inherited from EventDispatcher.) |
![]() | Dispose()()()() | (Inherited from DisplayObject.) |
![]() | Draw()()()() | (Inherited from DisplayObject.) |
![]() | EnqueueEvent(Event) |
Adds an event to the queue
The queue will be processed when ProcessQueue() manually executed
(Inherited from EventDispatcher.) |
![]() | Equals(Object) | (Inherited from Object.) |
![]() | ExecuteListeners(Event) |
Executes event handlers listening for a particular event type
(Inherited from EventDispatcher.) |
![]() | Finalize()()()() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | FirstShow |
The event that fires when the component is shown for the first time
(Inherited from DisplayObject.) |
![]() | FocusRender()()()() |
Post-draw logic
Renders focus rectangle
(Inherited from DisplayObject.) |
![]() | FocusRenderSignal |
The signal that emits just before the focus render
(Inherited from DisplayObject.) |
![]() | GetChildAt(Int32) | |
![]() | GetChildIndex(DisplayListMember) | |
![]() | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType()()()() | Gets the type of the current instance. (Inherited from Object.) |
![]() | GlobalToLocal(Point) | (Inherited from DisplayListMember.) |
![]() | GlobalToLocal(Rectangle) | (Inherited from DisplayListMember.) |
![]() | HasBubblingEventListener(String) |
IMPORTANT
Here we plug in the event traverser for GUI components
(Inherited from DisplayListMember.) |
![]() | HasChild(DisplayListMember) | |
![]() | HasEventListener(String) |
Returns true if EventDispatcher has any registered listeners for a specific type and phase
(Inherited from EventDispatcher.) |
![]() | Height |
The Height of the component
(Inherited from DisplayObject.) |
![]() | HideHandler |
The event that fires when the component is hidden
(Inherited from DisplayObject.) |
![]() | Id |
Component identifier
(Inherited from DisplayListMember.) |
![]() | IncludeInLayout |
True for including in layout
(Inherited from DisplayListMember.) |
![]() | Initialize()()()() |
Initializes the component (Inherited from DisplayObject.)Called by the parent upon first addition Sets child's Owner and reference to Stage Sets Skin |
![]() | InitializeContent()()()() |
Initializes GUI content
(Inherited from DisplayObject.) |
![]() | InitializeStyle()()()() |
Initializes Style
(Inherited from DisplayObject.) |
![]() | InitTransform()()()() | (Inherited from DisplayObject.) |
![]() | InvalidateTransform()()()() |
A lifecycle method
Invalidates position
(Inherited from DisplayObject.) |
![]() | IsDefaultPrevented(String, Boolean) |
Exposes the cancelable event to the outside if there are listeners for that event type
If default prevented, returns false
If not, returns true
(Inherited from EventDispatcher.) |
![]() | IsDefaultPrevented(String) |
No-bubbling version
(Inherited from EventDispatcher.) |
![]() | LocalRenderingRect |
The rendering Rect
This is the optimization technique: since we are using Rectangle class for internal calculations, and Unity uses Rects to render components,
To avoid constant conversions from Rectangle to Rect, we are converting only when needed (when coordinates or size change)
We update this variable on change
(Inherited from DisplayObject.) |
![]() | LocalToGlobal(Point) |
Overriding Y
If parent is container, then the position internals will be updated via InvalidationManager
But if parent is not a container (it's only a component, like ComboBox) we have to update position internals here
(Inherited from DisplayListMember.) |
![]() | LocalToGlobal(Rectangle) | (Inherited from DisplayListMember.) |
![]() | MappedToAnyPhase(String, EventHandler, EventPhase) |
Returns true if handler is mapped to any of the specified phases
(Inherited from EventDispatcher.) |
![]() | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MouseChildren |
Should the children of this container be tested for mouse events
|
![]() | NumberOfChildren |
Number of children
|
![]() | OverlayRender()()()() |
Post-draw logic
Renders component overlay layer
(Inherited from DisplayObject.) |
![]() | OverlayRenderSignal |
The signal that emits just before the overlay render
(Inherited from DisplayObject.) |
![]() | Owner |
The owner of this component
(Inherited from DisplayListMember.) |
![]() | Parent |
A parent container (Inherited from DisplayListMember.)Set by framework Has to be set for every component on stage except Stage |
![]() | Position |
Position
(Inherited from DisplayObject.) |
![]() | PostRender()()()() |
Post-draw logic
Switching off Alpha, scrollbars and clipping
(Inherited from DisplayObject.) |
![]() | PostRenderSignal |
The signal that emits after render
(Inherited from DisplayObject.) |
![]() | PreRender()()()() |
Pre-draw logic
Switching on Alpha, scrollbars and clipping
(Inherited from DisplayObject.) |
![]() | PreRenderSignal |
The signal that emits before before render
(Inherited from DisplayObject.) |
![]() | ProcessEvent(Event) |
Override of processing events
(Inherited from DisplayListMember.) |
![]() | ProcessQueue()()()() |
If events are added to queue, they are waiting to be fired (Inherited from EventDispatcher.)in the same order they are added |
![]() | QAddChild(DisplayListMember) | |
![]() | QAddChildAt(DisplayListMember, Int32) |
The main add child method
|
![]() | QChildren | |
![]() | QContains(DisplayListMember) | |
![]() | QContains(DisplayListMember, Boolean) |
Returns true if child is the descendant of the component or the component itself
|
![]() | QDrawingList |
The list of components ordered by child Depth Used for rendering The rendering order might have different than layout order |
![]() | QGetChildAt(Int32) | |
![]() | QGetChildIndex(DisplayListMember) | |
![]() | QHasChild(DisplayListMember) |
Checks if this is a Owner of a component
|
![]() | QNumberOfChildren | |
![]() | QRemoveAllChildren()()()() | |
![]() | QRemoveChild(DisplayListMember) | |
![]() | QRemoveChildAt(Int32) | |
![]() | QSetChildIndex(DisplayListMember, Int32) |
Sets child index
|
![]() | QSwapChildren(DisplayListMember, DisplayListMember) | |
![]() | QVisible |
Note: never make this property virtual and override it
This property reflects the true nature of component visibility
This is important because the components are being hidden during the instantiation, and shown on creation complete
This is the way to find out the desired visibility state (some of them might want to be hidden)
(Inherited from DisplayObject.) |
![]() | RemoveAllChildren()()()() | |
![]() | RemoveAllListeners(String) |
Removes all listeners for the spacified event type (both capture and bubbling phase)
(Inherited from EventDispatcher.) |
![]() | RemoveAllListeners(String, EventPhase) |
Removes all listeners for the spacified event type and phases
(Inherited from EventDispatcher.) |
![]() | RemoveChild(DisplayListMember) | |
![]() | RemoveChildAt(Int32) | |
![]() | RemoveEventListener(String, EventHandler) | (Inherited from DisplayListMember.) |
![]() | RemoveEventListener(String, EventHandler, EventPhase) |
Removes the event listener
(Inherited from EventDispatcher.) |
![]() | Render()()()() | (Overrides DisplayObject.Render()()()().) |
![]() | RenderChildren()()()() |
Renders container's children
|
![]() | RenderDoneSignal |
The signal that emits after the render is complete
(Inherited from DisplayObject.) |
![]() | RenderingRect |
The rendering Rect
This is the optimization technique: since we are using Rectangle class for internal calculations, and Unity uses Rects to render components,
To avoid constant conversions from Rectangle to Rect, we are converting only when needed (when coordinates or size change)
We update this variable on change
(Inherited from DisplayObject.) |
![]() | RenderSignal |
The signal that emits before render
(Inherited from DisplayObject.) |
![]() | Rotation |
Rotation
The pivot point is the center of the component
(Inherited from DisplayObject.) |
![]() | RotationEnd()()()() | (Inherited from DisplayObject.) |
![]() | RotationPivot |
Rotation pivot
(Inherited from DisplayObject.) |
![]() | RotationStart()()()() | (Inherited from DisplayObject.) |
![]() | Scale |
Scale
The pivot point is the center of the component
(Inherited from DisplayObject.) |
![]() | ScaleEnd()()()() | (Inherited from DisplayObject.) |
![]() | ScaleStart()()()() | (Inherited from DisplayObject.) |
![]() | SendToBack()()()() |
Send to back
(Inherited from DisplayListMember.) |
![]() | SetChildIndex(DisplayListMember, Int32) |
Sets child index
|
![]() | ShowHandler |
The event that fires when the component is shown
(Inherited from DisplayObject.) |
![]() | SkipRender(Int32) |
This is the approach of skipping the rendering process for N frames
Needed by effects which start tweening one frame too late
TODO: Investigate!
(Inherited from DisplayObject.) |
![]() | Stage | (Overrides DisplayListMember.Stage.) |
![]() | SwapChildren(DisplayListMember, DisplayListMember) | |
![]() | Tooltip |
Tooltip
(Inherited from DisplayObject.) |
![]() | ToString()()()() | (Inherited from DisplayListMember.) |
![]() | Transform | (Inherited from DisplayObject.) |
![]() | TriggerEffect(String) |
Note: this has to go here because the container should be able to run children effects
And we don't want to use too much castinh in the code
(Inherited from DisplayListMember.) |
![]() | TriggerEffect(String, Object) |
Note: this has to go here because the container should be able to run children effects
And we don't want to use too much castinh in the code
(Inherited from DisplayListMember.) |
![]() | Visible |
Is component Visible
If not, isn't processed by draw routine
(Inherited from DisplayObject.) |
![]() | Width |
The Width of the component
(Inherited from DisplayObject.) |
![]() | X |
X coordinate
(Inherited from DisplayObject.) |
![]() | Y |
Y coordinate
(Inherited from DisplayObject.) |

Object | |||||
![]() | EventDispatcher | ||||
![]() | DisplayObject | ||||
![]() | DisplayListMember | ||||
![]() | DisplayObjectContainer | ||||
![]() | InvalidationManagerClient |