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