1 /* === S Y N F I G ========================================================= */
2 /*! \file valuenode_greyed.cpp
3 ** \brief Implementation of the "Greyed" valuenode conversion.
8 ** Copyright (c) 2008 Chris Moore
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.
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.
21 /* ========================================================================= */
23 /* === H E A D E R S ======================================================= */
32 #include "valuenode_greyed.h"
33 #include "valuenode_const.h"
37 /* === U S I N G =========================================================== */
39 using namespace synfig;
41 /* === M A C R O S ========================================================= */
43 /* === G L O B A L S ======================================================= */
45 /* === P R O C E D U R E S ================================================= */
47 /* === M E T H O D S ======================================================= */
49 ValueNode_Greyed::ValueNode_Greyed(const ValueBase::Type &x):
50 ValueNode_Reference(x)
54 ValueNode_Greyed::ValueNode_Greyed(const ValueNode::Handle &x):
55 ValueNode_Reference(x->get_type())
57 Vocab ret(get_children_vocab());
58 set_children_vocab(ret);
63 ValueNode_Greyed::create(const ValueBase &x)
65 return new ValueNode_Greyed(ValueNode_Const::create(x));
69 ValueNode_Greyed::create_new()const
71 return new ValueNode_Greyed(get_type());
75 ValueNode_Greyed::get_name()const
81 ValueNode_Greyed::get_local_name()const
86 LinkableValueNode::Vocab
87 ValueNode_Greyed::get_children_vocab_vfunc()const
89 if(children_vocab.size())
90 return children_vocab;
92 LinkableValueNode::Vocab ret;
94 ret.push_back(ParamDesc(ValueBase(),"link")
95 .set_local_name(_("Link"))
96 .set_description(_("The greyed value"))