Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-core / tags / synfig_0_61_07_rc3 / src / synfig / paramdesc.cpp
1 /* === S Y N F I G ========================================================= */
2 /*!     \file paramdesc.cpp
3 **      \brief Template File
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **
10 **      This package is free software; you can redistribute it and/or
11 **      modify it under the terms of the GNU General Public License as
12 **      published by the Free Software Foundation; either version 2 of
13 **      the License, or (at your option) any later version.
14 **
15 **      This package is distributed in the hope that it will be useful,
16 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
17 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 **      General Public License for more details.
19 **      \endlegal
20 */
21 /* ========================================================================= */
22
23 /* === H E A D E R S ======================================================= */
24
25 #ifdef USING_PCH
26 #       include "pch.h"
27 #else
28 #ifdef HAVE_CONFIG_H
29 #       include <config.h>
30 #endif
31
32 #include "paramdesc.h"
33 #include "value.h"
34
35 #endif
36
37 /* === U S I N G =========================================================== */
38
39 using namespace std;
40 using namespace etl;
41 using namespace synfig;
42
43 /* === M A C R O S ========================================================= */
44
45 /* === G L O B A L S ======================================================= */
46
47 /* === P R O C E D U R E S ================================================= */
48
49 /* === M E T H O D S ======================================================= */
50
51 ParamDesc::ParamDesc(synfig::Color::BlendMethod, const String &a):
52         name_                   (a),
53         local_name_             (a),
54         scalar_                 (1.0),
55         critical_               (true),
56         hidden_                 (false),
57         invisible_duck_ (false),
58                 is_distance_    (false),
59                 animation_only_ (false)
60 {
61         set_local_name(_("Blend Method"))
62         .set_hint("enum")
63         .add_enum_value(Color::BLEND_COMPOSITE,"composite",_("Composite"))
64         .add_enum_value(Color::BLEND_STRAIGHT,"straight",_("Straight"))
65         .add_enum_value(Color::BLEND_ONTO,"onto",_("Onto"))
66         .add_enum_value(Color::BLEND_STRAIGHT_ONTO,"straightonto",_("StraightOnto"))
67         .add_enum_value(Color::BLEND_BEHIND,"behind",_("Behind"))
68         .add_enum_value(Color::BLEND_SCREEN,"screen",_("Screen"))
69         .add_enum_value(Color::BLEND_OVERLAY,"overlay",_("Overlay"))
70         .add_enum_value(Color::BLEND_HARD_LIGHT,"hard_light",_("Hard Light"))
71         .add_enum_value(Color::BLEND_MULTIPLY,"multiply",_("Multiply"))
72         .add_enum_value(Color::BLEND_DIVIDE,"divide",_("Divide"))
73         .add_enum_value(Color::BLEND_ADD,"add",_("Add"))
74         .add_enum_value(Color::BLEND_SUBTRACT,"subtract",_("Subtract"))
75         .add_enum_value(Color::BLEND_DIFFERENCE,"difference",_("Difference"))
76         .add_enum_value(Color::BLEND_BRIGHTEN,"brighten",_("Brighten"))
77         .add_enum_value(Color::BLEND_DARKEN,"darken",_("Darken"))
78         .add_enum_value(Color::BLEND_COLOR,"color",_("Color"))
79         .add_enum_value(Color::BLEND_HUE,"hue",_("Hue"))
80         .add_enum_value(Color::BLEND_SATURATION,"saturation",_("Saturation"))
81         .add_enum_value(Color::BLEND_LUMINANCE,"luminance",_("Luminance"))
82 // These are deprecated
83         .add_enum_value(Color::BLEND_ALPHA_OVER,"alphaover",_("Alpha Over"))
84 //      .add_enum_value(Color::BLEND_ALPHA_BRIGHTEN,"alphabrighten",_("Alpha Brighten"))
85 //      .add_enum_value(Color::BLEND_ALPHA_DARKEN,"alphadarken",_("Alpha Darken"))
86         ; // end of enums
87 }
88
89 ParamDesc::ParamDesc(const ValueBase&, const String &a):
90         name_                   (a),
91         local_name_             (a),
92         scalar_                 (1.0),
93         critical_               (true),
94         hidden_                 (false),
95         invisible_duck_ (false),
96                 is_distance_    (false),
97                 animation_only_ (false)
98 {
99 }