# IpeLayer Class Reference
[Ipe Document]

A layer of an IpePage. More...

List of all members.

## Public Types

- enum { EHidden = 0x01, EDim = 0x02, ELocked = 0x04, ENoSnapping = 0x08 }

## Public Member Functions

- IpeLayer (IpeString name)
- IpeLayer (const IpeXmlAttributes &attr)
- void SaveAsXml (IpeStream &stream) const
- IpeString Name () const
- void SetName (IpeString name)
- bool IsVisible () const
- bool IsDimmed () const
- bool IsLocked () const
- bool IsSnapping () const
- void SetVisible (bool flag)
- void SetDimmed (bool flag)
- void SetLocked (bool flag)
- void SetSnapping (bool flag)

## Public Attributes

- IpeString iName
- int iFlags

## Detailed Description

A layer of an IpePage.

The objects on one IpePage can belong to any number of layers. Layers are orthogonal to the back-to-front ordering of objects, so a "layer" is just another attribute of the object.

Layers have several attributes. They may be editable or locked. Objects can be selected and modified only if their layer is editable. A layer may be visible, invisible, or dimmed. A layer may have snapping on or off---objects will behave magnetically only if their layer has snapping on.

The PDF output generated for an IpePage depends on its presentation sequence. Each item in the presentation sequence may list a number of layers to be displayed at that stage. Multiple presentation items may show different subsets of layers.

## Constructor & Destructor Documentation

IpeLayer::IpeLayer | ( | IpeString | name | ) | `[explicit]`

| Construct with name. Default attributes.

IpeLayer::IpeLayer | ( | const IpeXmlAttributes & | attr | ) | `[explicit]`

| Construct from a single XML tag.

## Member Function Documentation

void IpeLayer::SaveAsXml | ( | IpeStream & | stream | ) | const

| Write a single XML tag describing this layer.

IpeString IpeLayer::Name | ( |  | ) | const`[inline]`

| Return name.

void IpeLayer::SetName | ( | IpeString | name | ) | `[inline]`

| Set name.

bool IpeLayer::IsVisible | ( |  | ) | const`[inline]`

| Is visible?

bool IpeLayer::IsDimmed | ( |  | ) | const`[inline]`

| Is dimmed?

bool IpeLayer::IsLocked | ( |  | ) | const`[inline]`

| Is locked?

bool IpeLayer::IsSnapping | ( |  | ) | const`[inline]`

| Is snapping enabled?

void IpeLayer::SetVisible | ( | bool | flag | ) |

| Set visibility.

void IpeLayer::SetDimmed | ( | bool | flag | ) |

| Set dimming.

void IpeLayer::SetLocked | ( | bool | flag | ) |

| Set locking.

void IpeLayer::SetSnapping | ( | bool | flag | ) |

| Set snapping.

The documentation for this class was generated from the following files:

- ipepage.h
- ipepage.cpp