libchamplain Reference Manual: ChamplainLayer

## ChamplainLayer ChamplainLayer — Base class of libchamplain layers |

## Functions

void | champlain_layer_set_view ()
ChamplainBoundingBox * | champlain_layer_get_bounding_box ()

## Types and Values

struct | ChamplainLayer

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── ClutterActor
                ╰── ChamplainLayer
                    ├── ChamplainMarkerLayer
                    ╰── ChamplainPathLayer

## Implemented Interfaces

ChamplainLayer implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

## Description

Every layer (overlay that moves together with the map) has to inherit this class and implement its virtual methods.

## Functions

### champlain_layer_set_view ()

    void
    champlain_layer_set_view (ChamplainLayer *layer,
                              ChamplainView *view);

ChamplainView calls this method to pass a reference to itself to the layer when the layer is added to the view. When the layer is removed from the view, it passes NULL to the layer. Custom layers can implement this method and perform the necessary initialization. This method should not be called by user code.

#### Parameters

layer | a ChamplainLayer |
view | a ChamplainView |

Since 0.10

### champlain_layer_get_bounding_box ()

    ChamplainBoundingBox *
    champlain_layer_get_bounding_box (ChamplainLayer *layer);

Gets the bounding box occupied by the elements inside the layer.

#### Parameters

layer | a ChamplainLayer |

#### Returns

The bounding box.

Since 0.10

## Types and Values

### struct ChamplainLayer

    struct ChamplainLayer;

The ChamplainLayer structure contains only private data and should be accessed using the provided API

Since 0.10