LuciadCPillar C# 2023.1.04
|
Represents an ordered list of layers. More...
Public Member Functions | |
LayerList () | |
Constructs an empty layer list. More... | |
void | Add (Luciad.Layers.Layer layer) |
void | Add (Luciad.Layers.Layer layer, uint targetIndex) |
void | AddObserver (Luciad.Layers.ILayerListObserver observer, bool seedObserver=false) |
Adds an observer to be notified of changes to this layer list. More... | |
void | Dispose () |
Luciad.Layers.Layer | FindLayerById (ulong layerId) |
Searches for the layer with a provided id in the layer list. More... | |
void | Move (ulong layerId, uint targetIndex) |
Moves the layer with the given id to the target index. More... | |
void | Remove (ulong layerId) |
Removes the layer with the given id. More... | |
void | RemoveObserver (Luciad.Layers.ILayerListObserver observer) |
Removes the given observer. More... | |
Properties | |
System.Collections.Generic.IList< Luciad.Layers.Layer > | Layers [get] |
Represents an ordered list of layers.
The order within this list determines the order in which layers are painted. Note that this class tracks on which thread it is constructed. This is done so that, in subsequent calls, it can verify that the same threads are used consistently. When an inconsistency is detected, an assertion is triggered. This means that all functions on LayerList must be called on the thread on which the Map was constructed (the "UI" thread). The only exception is adding and removing observers. Related article: Threading rules for the Map
|
inline |
Constructs an empty layer list.
|
inline |
|
inline |
|
inline |
Adds an observer to be notified of changes to this layer list.
Adding the same observer twice is forbidden, and will cause an exception to be thrown.
observer
an observer, must not be nullptr
seedObserver
whether to inform the observer about the layers that are currently present
luciad::InvalidArgumentException
when the observer was already added.
luciad::NullArgumentException
when the observer is nullptr.
|
inline |
|
inline |
Searches for the layer with a provided id in the layer list.
layerId
a layer id
the layer that corresponds with the given id, or nullptr.
|
inline |
Moves the layer with the given id to the target index.
layerId
the id of the layer to move
targetIndex
a target index
luciad::InvalidArgumentException
when this LayerList does not contain a layer with the given id or when the target index is not in range
|
inline |
Removes the layer with the given id.
layerId
the id of the layer to remove
luciad::InvalidArgumentException
when this LayerList does not contain a layer with the given id
|
inline |
Removes the given observer.
If the given observer was never added, an exception is thrown.
observer
an observer, must not be nullptr
luciad::InvalidArgumentException
when the observer is not known.
luciad::NullArgumentException
when the observer is nullptr.
|
get |