/* === S Y N F I G ========================================================= */
-/*! \file value_node.cpp
+/*! \file valuenode.cpp
** \brief Template File
**
-** $Id: valuenode.cpp,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
+** $Id$
**
** \legal
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
**
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
** \endlegal
*/
/* ========================================================================= */
ADD_VALUENODE2(ValueNode_DynamicList,"dynamic_list");
ADD_VALUENODE(ValueNode_GradientRotate,"gradient_rotate");
ADD_VALUENODE(ValueNode_Sine,"sine");
-
+
#undef ADD_VALUENODE
return true;
}
if(global_value_node_map.size()!=value_node_count)
synfig::error("value node count mismatch! map.size()!=value_node_count (%d!=%d)",global_value_node_map.size(),value_node_count);
-
- GlobalValueNodeMap::iterator iter;
+
+ GlobalValueNodeMap::iterator iter;
for(iter=global_value_node_map.begin();iter!=global_value_node_map.end();++iter)
{
if(!iter->second->is_exported())
LinkableValueNode::set_link(int i,ValueNode::Handle x)
{
ValueNode::Handle previous(get_link(i));
-
+
if(set_link_vfunc(i,x))
{
if(previous)
remove_child(previous.get());
add_child(x.get());
-
+
if(!x->is_exported() && get_parent_canvas())
{
x->set_parent_canvas(get_parent_canvas());
ValueNode::~ValueNode()
{
value_node_count--;
-
+
begin_delete();
//DEBUGPOINT();
get_parent_canvas()->signal_value_node_changed()(this);
else if(get_root_canvas() && get_parent_canvas())
get_root_canvas()->signal_value_node_changed()(this);
-
+
Node::on_changed();
}
{
if(x.get()==this)
return 0;
-
+
while(parent_set.size())
{
(*parent_set.begin())->add_child(x.get());
{
if(id.empty())
throw Exception::IDNotFound("Empty ID");
-
+
ValueNode::Handle value_node;
-
+
try
{
value_node=find(id);
return false;
}
catch(Exception::IDNotFound)
- {
+ {
push_back(value_node);
return true;
}
-
+
return false;
}
int i;
LinkableValueNode *ret=create_new();
ret->set_guid(get_guid()^deriv_guid);
-
+
for(i=0;i<link_count();i++)
{
ValueNode::Handle link=get_link_vfunc(i);
{
assert(is_exported());
assert(canvas_);
-
+
if(x.get()==canvas_.get())
return get_id();
-
+
return canvas_->_get_relative_id(x)+':'+get_id();
}
void LinkableValueNode::get_times_vfunc(Node::time_set &set) const
{
ValueNode::LooseHandle h;
-
+
int size = link_count();
-
+
//just add it to the set...
for(int i=0; i < size; ++i)
{