Class: Gsk::ContainerNode

Inherits:
RenderNode show all
Defined in:
(unknown)

Overview

A render node that can contain other render nodes.

Instance Method Summary collapse

Methods inherited from RenderNode

deserialize, #draw, #get_bounds, #node_type, #ref, #serialize, #unref, #write_to_file

Constructor Details

#initialize(children, n_children) ⇒ Gsk::ContainerNode

Creates a new GskRenderNode instance for holding the given children.

The new node will acquire a reference to each of the children.

Parameters:

  • children (Array<Gsk::RenderNode>)

    The children of the node

  • n_children (Integer)

    Number of children in the children array

Instance Method Details

#get_child(idx) ⇒ Gsk::RenderNode

Gets one of the children of container.

Parameters:

  • idx (Integer)

    the position of the child to get

Returns:

#n_childrenInteger

Retrieves the number of direct children of node.

Returns:

  • (Integer)

    the number of children of the GskRenderNode