C# Class XNAInterfaceComponents.AbstractComponents.ParentComponent

Inheritance: XNAInterfaceComponents.Components.Component
Mostrar archivo Open project: Wotuu/RTS_XNA_v2 Class Usage Examples

Public Methods

Method Description
AddChild ( Component component ) : void

Adds a child to this component.

ChildAt ( int index ) : Component

Gets a component at an index.

ChildCount ( ) : int

Gets the amount of children in this component.

GetComponentAt ( Point p ) : Component

Gets the component at a location (may be this component if no childs contain the location)

ParentComponent ( ParentComponent parent, Rectangle bounds ) : System
RemoveChild ( Component component ) : System.Boolean

Removes a child from this component.

RequestFocusAt ( Point p ) : System.Boolean

The most top displayed component will grab focus at this location.

RequestScreenLocation ( Point childLocation ) : Point

Requests the screen location of this component. Childs can use this function to get their exact location on the screen, instead of relative to their parent.

Method Details

AddChild() public method

Adds a child to this component.
public AddChild ( Component component ) : void
component XNAInterfaceComponents.Components.Component The component to add to this parent component
return void

ChildAt() public method

Gets a component at an index.
public ChildAt ( int index ) : Component
index int The index to get a component at.
return XNAInterfaceComponents.Components.Component

ChildCount() public method

Gets the amount of children in this component.
public ChildCount ( ) : int
return int

GetComponentAt() public method

Gets the component at a location (may be this component if no childs contain the location)
public GetComponentAt ( Point p ) : Component
p Point
return XNAInterfaceComponents.Components.Component

ParentComponent() public method

public ParentComponent ( ParentComponent parent, Rectangle bounds ) : System
parent ParentComponent
bounds Microsoft.Xna.Framework.Rectangle
return System

RemoveChild() public method

Removes a child from this component.
public RemoveChild ( Component component ) : System.Boolean
component XNAInterfaceComponents.Components.Component The component to remove.
return System.Boolean

RequestFocusAt() public method

The most top displayed component will grab focus at this location.
public RequestFocusAt ( Point p ) : System.Boolean
p Point The point to check for focus
return System.Boolean

RequestScreenLocation() public method

Requests the screen location of this component. Childs can use this function to get their exact location on the screen, instead of relative to their parent.
public RequestScreenLocation ( Point childLocation ) : Point
childLocation Point The location of the last child.
return Point