# layer.h File Reference

Layer Class Header. More...

`#include "string_decl.h"`
`#include <map>`
`#include <ETL/handle>`
`#include "real.h"`
`#include "string.h"`
`#include <sigc++/signal.h>`
`#include <sigc++/connection.h>`
`#include "node.h"`
`#include "time.h"`
`#include "guid.h"`

Go to the source code of this file.

## Namespaces

namespace | synfig

## Classes

class | synfig::Layer
struct | synfig::Layer::BookEntry

## Defines

#define | SYNFIG_LAYER_MODULE_EXT
#define | SYNFIG_LAYER_SET_NAME(class, x) const char class::name__[]=x
| Sets the name of the layer.
#define | SYNFIG_LAYER_SET_LOCAL_NAME(class, x) const char class::local_name__[]=x;
| Sets the local name of the layer.
#define | SYNFIG_LAYER_SET_CATEGORY(class, x) const char class::category__[]=x
| Sets the category of the layer.
#define | SYNFIG_LAYER_SET_VERSION(class, x) const char class::version__[]=x
| Sets the version string for the layer.
#define | SYNFIG_LAYER_SET_CVS_ID(class, x) const char class::cvs_id__[]=x
| Sets the CVS ID string for the layer.
#define | SYNFIG_LAYER_INIT(class)
#define | IMPORT_PLUS(x, y)
#define | IMPORT_AS(x, y)
#define | IMPORT(x) IMPORT_AS(x,#x)
#define | EXPORT_AS(x, y)
#define | EXPORT(x) EXPORT_AS(x,#x)
#define | EXPORT_NAME()
#define | EXPORT_VERSION()
#define | CATEGORY_DO_NOT_USE "Do Not Use"

## Detailed Description

Layer Class Header.

$Id$

## Define Documentation

#define SYNFIG_LAYER_MODULE_EXT

Value:

    public:                                                                             \
        static const char name__[], version__[], cvs_id__[], local_name__[], category__[];  \
        static Layer *create();

Todo:
  This needs to be documented further.

#define SYNFIG_LAYER_SET_NAME | ( | class,
|  | x |  | ) | const char class::name__[]=x

Sets the name of the layer.

#define SYNFIG_LAYER_SET_LOCAL_NAME | ( | class,
|  | x |  | ) | const char class::local_name__[]=x;

Sets the local name of the layer.

#define SYNFIG_LAYER_SET_CATEGORY | ( | class,
|  | x |  | ) | const char class::category__[]=x

Sets the category of the layer.

#define SYNFIG_LAYER_SET_VERSION | ( | class,
|  | x |  | ) | const char class::version__[]=x

Sets the version string for the layer.

#define SYNFIG_LAYER_SET_CVS_ID | ( | class,
|  | x |  | ) | const char class::cvs_id__[]=x

Sets the CVS ID string for the layer.

#define SYNFIG_LAYER_INIT | ( | class |  | ) |

Value:

    synfig::Layer* class::create()                                                      \
        {                                                                                   \
            return new class();                                                             \
        }

Todo:
  This needs to be documented further.

#define IMPORT_PLUS | ( | x,
|  | y |  | ) |

Value:

    if (param==#x && value.same_type_as(x))                                             \
        {                                                                                   \
            value.put(&x);                                                                  \
            {                                                                               \
                y;                                                                          \
            }                                                                               \
            return true;                                                                    \
        }

Todo:
  This needs to be documented further.

Referenced by Warp::set_param(), synfig::Layer_SphereDistort::set_param(), Layer_Shade::set_param(), Rectangle::set_param(), Plant::set_param(), Outline::set_param(), Layer_Freetype::set_param(), synfig::Layer_SolidColor::set_param(), synfig::Layer_Shape::set_param(), Halftone3::set_param(), FilledRect::set_param(), CheckerBoard::set_param(), Blur_Layer::set_param(), and Layer_Bevel::set_param().

#define IMPORT_AS | ( | x,
|  | y |  | ) |

Value:

    if (param==y && value.same_type_as(x))                                              \
        {                                                                                   \
            value.put(&x);                                                                  \
            return true;                                                                    \
        }

Todo:
  This needs to be documented further.

Referenced by XORPattern::set_param(), synfig::Layer_SphereDistort::set_param(), Layer_Shade::set_param(), Plant::set_param(), Layer_Freetype::set_param(), synfig::Layer_Shape::set_param(), Halftone3::set_param(), Halftone2::set_param(), CurveWarp::set_param(), CurveGradient::set_param(), and CheckerBoard::set_param().

#define IMPORT | ( | x |  | ) | IMPORT_AS(x,#x)

Todo:
  This needs to be documented further.

Referenced by Zoom::set_param(), XORPattern::set_param(), Warp::set_param(), Twirl::set_param(), Translate::set_param(), Layer_TimeLoop::set_param(), SuperSample::set_param(), synfig::Layer_Stretch::set_param(), SpiralGradient::set_param(), synfig::Layer_SphereDistort::set_param(), SimpleCircle::set_param(), Layer_Shade::set_param(), Rotate::set_param(), Rectangle::set_param(), RadialGradient::set_param(), RadialBlur::set_param(), Plant::set_param(), Outline::set_param(), Noise::set_param(), Metaballs::set_param(), Mandelbrot::set_param(), Layer_Freetype::set_param(), LinearGradient::set_param(), synfig::Layer_Shape::set_param(), synfig::Layer_PasteCanvas::set_param(), synfig::Layer_MotionBlur::set_param(), synfig::Layer_Duplicate::set_param(), synfig::Layer_Bitmap::set_param(), Julia::set_param(), InsideOut::set_param(), Import::set_param(), Halftone3::set_param(), Halftone2::set_param(), FilledRect::set_param(), NoiseDistort::set_param(), CurveWarp::set_param(), CurveGradient::set_param(), ConicalGradient::set_param(), synfig::Layer_ColorCorrect::set_param(), synfig::Layer_Clamp::set_param(), CheckerBoard::set_param(), Blur_Layer::set_param(), and Layer_Bevel::set_param().

#define EXPORT_AS | ( | x,
|  | y |  | ) |

Value:

    if (param==y)                                                                       \
            return ValueBase(x);

Todo:
  This needs to be documented further.

Referenced by synfig::Layer_SphereDistort::get_param(), and Halftone2::get_param().

#define EXPORT | ( | x |  | ) | EXPORT_AS(x,#x)

Todo:
  This needs to be documented further.

Referenced by Zoom::get_param(), XORPattern::get_param(), Warp::get_param(), Twirl::get_param(), Translate::get_param(), Layer_TimeLoop::get_param(), SuperSample::get_param(), synfig::Layer_Stretch::get_param(), Star::get_param(), SpiralGradient::get_param(), synfig::Layer_SphereDistort::get_param(), SimpleCircle::get_param(), Layer_Shade::get_param(), Rotate::get_param(), Region::get_param(), Rectangle::get_param(), RadialGradient::get_param(), RadialBlur::get_param(), Plant::get_param(), Outline::get_param(), Noise::get_param(), Metaballs::get_param(), Mandelbrot::get_param(), Layer_Freetype::get_param(), LinearGradient::get_param(), synfig::Layer_SolidColor::get_param(), synfig::Layer_Shape::get_param(), synfig::Layer_Polygon::get_param(), synfig::Layer_PasteCanvas::get_param(), synfig::Layer_MotionBlur::get_param(), synfig::Layer_Duplicate::get_param(), synfig::Layer_Bitmap::get_param(), Julia::get_param(), InsideOut::get_param(), Import::get_param(), Halftone3::get_param(), Halftone2::get_param(), FilledRect::get_param(), NoiseDistort::get_param(), CurveWarp::get_param(), CurveGradient::get_param(), ConicalGradient::get_param(), synfig::Layer_ColorCorrect::get_param(), synfig::Layer_Clamp::get_param(), Circle::get_param(), CheckerBoard::get_param(), synfig::BooleanCurve::get_param(), Blur_Layer::get_param(), and Layer_Bevel::get_param().

#define EXPORT_NAME | ( |  | ) |

Value:

    if (param=="Name" || param=="name" || param=="name__")                              \
            return name__;                                                                  \
        else if (param=="local_name__")                                                     \
            return dgettext("synfig",local_name__);

Todo:
  This needs to be documented further.

Referenced by Zoom::get_param(), XORPattern::get_param(), Warp::get_param(), Twirl::get_param(), Translate::get_param(), Layer_TimeLoop::get_param(), SuperSample::get_param(), synfig::Layer_Stretch::get_param(), Star::get_param(), SpiralGradient::get_param(), synfig::Layer_SphereDistort::get_param(), SimpleCircle::get_param(), Layer_Shade::get_param(), Rotate::get_param(), Region::get_param(), Rectangle::get_param(), RadialGradient::get_param(), RadialBlur::get_param(), Plant::get_param(), Outline::get_param(), Noise::get_param(), Metaballs::get_param(), Mandelbrot::get_param(), Layer_Freetype::get_param(), LumaKey::get_param(), LinearGradient::get_param(), synfig::Layer_SolidColor::get_param(), synfig::Layer_Shape::get_param(), synfig::Layer_Polygon::get_param(), synfig::Layer_PasteCanvas::get_param(), synfig::Layer_MotionBlur::get_param(), synfig::Layer_Duplicate::get_param(), Julia::get_param(), InsideOut::get_param(), Import::get_param(), Halftone3::get_param(), Halftone2::get_param(), FilledRect::get_param(), NoiseDistort::get_param(), CurveWarp::get_param(), CurveGradient::get_param(), ConicalGradient::get_param(), synfig::Layer_ColorCorrect::get_param(), synfig::Layer_Clamp::get_param(), Circle::get_param(), CheckerBoard::get_param(), synfig::BooleanCurve::get_param(), Blur_Layer::get_param(), and Layer_Bevel::get_param().

#define EXPORT_VERSION | ( |  | ) |

Value:

    if (param=="Version" || param=="version" || param=="version__")                     \
            return version__;

Todo:
  This needs to be documented further.

Referenced by Zoom::get_param(), XORPattern::get_param(), Warp::get_param(), Twirl::get_param(), Translate::get_param(), Layer_TimeLoop::get_param(), SuperSample::get_param(), synfig::Layer_Stretch::get_param(), Star::get_param(), SpiralGradient::get_param(), synfig::Layer_SphereDistort::get_param(), SimpleCircle::get_param(), Layer_Shade::get_param(), Rotate::get_param(), Region::get_param(), Rectangle::get_param(), RadialGradient::get_param(), RadialBlur::get_param(), Outline::get_param(), Noise::get_param(), Metaballs::get_param(), Mandelbrot::get_param(), Layer_Freetype::get_param(), LumaKey::get_param(), LinearGradient::get_param(), synfig::Layer_SolidColor::get_param(), synfig::Layer_Shape::get_param(), synfig::Layer_Polygon::get_param(), synfig::Layer_PasteCanvas::get_param(), synfig::Layer_MotionBlur::get_param(), synfig::Layer_Duplicate::get_param(), Julia::get_param(), InsideOut::get_param(), Import::get_param(), Halftone3::get_param(), Halftone2::get_param(), FilledRect::get_param(), NoiseDistort::get_param(), CurveWarp::get_param(), CurveGradient::get_param(), ConicalGradient::get_param(), synfig::Layer_ColorCorrect::get_param(), synfig::Layer_Clamp::get_param(), Circle::get_param(), CheckerBoard::get_param(), synfig::BooleanCurve::get_param(), Blur_Layer::get_param(), and Layer_Bevel::get_param().

#define CATEGORY_DO_NOT_USE "Do Not Use"

This is used as the category for layer book entries which represent aliases of layers. It prevents these layers showing up in the menu.

Referenced by process_global_flags().