Rename get_param_vocab to get_children_vocab and use a wrapper for the pure virtual...
[synfig.git] / synfig-core / src / synfig / valuenode_greyed.cpp
1 /* === S Y N F I G ========================================================= */
2 /*!     \file valuenode_greyed.cpp
3 **      \brief Implementation of the "Greyed" valuenode conversion.
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2008 Chris Moore
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 "valuenode_greyed.h"
33 #include "valuenode_const.h"
34
35 #endif
36
37 /* === U S I N G =========================================================== */
38
39 using namespace synfig;
40
41 /* === M A C R O S ========================================================= */
42
43 /* === G L O B A L S ======================================================= */
44
45 /* === P R O C E D U R E S ================================================= */
46
47 /* === M E T H O D S ======================================================= */
48
49 ValueNode_Greyed::ValueNode_Greyed(const ValueBase::Type &x):
50         ValueNode_Reference(x)
51 {
52 }
53
54 ValueNode_Greyed::ValueNode_Greyed(const ValueNode::Handle &x):
55         ValueNode_Reference(x->get_type())
56 {
57         set_link("link",x);
58 }
59
60 ValueNode_Greyed*
61 ValueNode_Greyed::create(const ValueBase &x)
62 {
63         return new ValueNode_Greyed(ValueNode_Const::create(x));
64 }
65
66 LinkableValueNode*
67 ValueNode_Greyed::create_new()const
68 {
69         return new ValueNode_Greyed(get_type());
70 }
71
72 String
73 ValueNode_Greyed::get_name()const
74 {
75         return "greyed";
76 }
77
78 String
79 ValueNode_Greyed::get_local_name()const
80 {
81         return _("Greyed");
82 }
83
84 LinkableValueNode::Vocab
85 ValueNode_Greyed::get_children_vocab_vfunc()const
86 {
87         LinkableValueNode::Vocab ret;
88
89         ret.push_back(ParamDesc(ValueBase(),"link")
90                 .set_local_name(_("Link"))
91                 .set_description(_("The greyed value"))
92         );
93
94         return ret;
95 }