Home

layeradded

Layeradded is a term used in software engineering to describe the event or notification that a new layer has been added to a layered system. In graphics, user interfaces, and game engines, a layer often represents a visual or logical grouping within a scene graph or rendering stack. The label layeradded is usually a convention rather than a universal standard, appearing as an event name or callback such as layerAdded, onLayerAdded, or similar, depending on the framework.

When a layer is added, implementations typically perform several steps. They may update the hierarchical structure

Variations exist across platforms. In some toolkits, the equivalent may be called a different name, such as

See also: layerremoved, scene graph, rendering pipeline, event-driven architecture.

to
include
the
new
layer
as
a
child
of
a
parent
layer,
allocate
or
initialize
resources,
set
up
coordinate
transforms,
and
integrate
the
layer
into
rendering,
hit
testing,
and
layout
pipelines.
The
timing
of
the
event
relative
to
rendering
and
layout
varies
by
framework;
some
fire
the
notification
immediately
after
attachment,
others
during
the
next
layout
pass.
In
event-driven
designs,
handlers
often
use
the
signal
or
listener
pattern
to
react,
perform
initialization,
or
adjust
ordering
within
the
layer
stack.
a
childAdded,
itemInserted,
or
layerCreated.
The
concept
generally
exists
wherever
a
scene
or
UI
is
composed
of
layered
elements.