projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use 0 degrees as the default angle for the 'cos' convert.
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
synfigapp
/
action.cpp
diff --git
a/synfig-studio/trunk/src/synfigapp/action.cpp
b/synfig-studio/trunk/src/synfigapp/action.cpp
index
f22de86
..
c3e2aac
100644
(file)
--- a/
synfig-studio/trunk/src/synfigapp/action.cpp
+++ b/
synfig-studio/trunk/src/synfigapp/action.cpp
@@
-2,7
+2,7
@@
/*! \file action.cpp
** \brief Template File
**
/*! \file action.cpp
** \brief Template File
**
-** $Id
: action.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp
$
+** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
@@
-135,14
+135,14
@@
synfigapp::Action::Book *book_;
be.category=x::category__; \
be.factory=x::create; \
be.get_param_vocab=x::get_param_vocab; \
be.category=x::category__; \
be.factory=x::create; \
be.get_param_vocab=x::get_param_vocab; \
- be.is_can
idate=x::is_can
idate; \
+ be.is_can
didate=x::is_cand
idate; \
}
}
-
+
Action::Main::Main()
{
book_=new synfigapp::Action::Book();
Action::Main::Main()
{
book_=new synfigapp::Action::Book();
-
+
ADD_ACTION(Action::LayerRemove);
ADD_ACTION(Action::LayerMove);
ADD_ACTION(Action::LayerRaise);
ADD_ACTION(Action::LayerRemove);
ADD_ACTION(Action::LayerMove);
ADD_ACTION(Action::LayerRaise);
@@
-155,10
+155,10
@@
Action::Main::Main()
ADD_ACTION(Action::LayerEncapsulate);
ADD_ACTION(Action::LayerDuplicate);
ADD_ACTION(Action::LayerSetDesc);
ADD_ACTION(Action::LayerEncapsulate);
ADD_ACTION(Action::LayerDuplicate);
ADD_ACTION(Action::LayerSetDesc);
-
- ADD_ACTION(Action::ValueNodeConstSet);
- ADD_ACTION(Action::ValueNodeAdd);
- ADD_ACTION(Action::ValueNodeReplace);
+
+ ADD_ACTION(Action::ValueNodeConstSet);
+ ADD_ACTION(Action::ValueNodeAdd);
+ ADD_ACTION(Action::ValueNodeReplace);
ADD_ACTION(Action::ValueNodeLinkConnect);
ADD_ACTION(Action::ValueNodeLinkDisconnect);
ADD_ACTION(Action::ValueNodeDynamicListInsert);
ADD_ACTION(Action::ValueNodeLinkConnect);
ADD_ACTION(Action::ValueNodeLinkDisconnect);
ADD_ACTION(Action::ValueNodeDynamicListInsert);
@@
-170,7
+170,7
@@
Action::Main::Main()
ADD_ACTION(Action::ValueNodeDynamicListRotateOrder);
ADD_ACTION(Action::ValueNodeRename);
ADD_ACTION(Action::ValueNodeRemove);
ADD_ACTION(Action::ValueNodeDynamicListRotateOrder);
ADD_ACTION(Action::ValueNodeRename);
ADD_ACTION(Action::ValueNodeRemove);
-
+
ADD_ACTION(Action::ValueDescSet);
ADD_ACTION(Action::ValueDescExport);
ADD_ACTION(Action::ValueDescConvert);
ADD_ACTION(Action::ValueDescSet);
ADD_ACTION(Action::ValueDescExport);
ADD_ACTION(Action::ValueDescConvert);
@@
-208,7
+208,7
@@
Action::Main::Main()
ADD_ACTION(Action::GradientSet);
ADD_ACTION(Action::ColorSet);
ADD_ACTION(Action::GradientSet);
ADD_ACTION(Action::ColorSet);
-
+
ADD_ACTION(Action::TimepointsMove);
ADD_ACTION(Action::TimepointsCopy);
ADD_ACTION(Action::TimepointsDelete);
ADD_ACTION(Action::TimepointsMove);
ADD_ACTION(Action::TimepointsCopy);
ADD_ACTION(Action::TimepointsDelete);
@@
-222,7
+222,7
@@
Action::Main::Main()
Action::Main::~Main()
{
delete book_;
Action::Main::~Main()
{
delete book_;
-
+
}
}
@@
-234,15
+234,15
@@
Action::create(const String &name)
{
if(!book().count(name))
return 0; //! \todo perhaps we should throw something instead?
{
if(!book().count(name))
return 0; //! \todo perhaps we should throw something instead?
- return book()[name].factory();
+ return book()[name].factory();
}
}
-Action::CanidateList
-Action::compile_canidate_list(const ParamList& param_list, Category category)
+Action::Can
d
idateList
+Action::compile_can
d
idate_list(const ParamList& param_list, Category category)
{
{
- Action::CanidateList ret;
-
+ Action::Can
d
idateList ret;
+
Book::const_iterator iter;
//synfig::info("param_list.size()=%d",param_list.size());
Book::const_iterator iter;
//synfig::info("param_list.size()=%d",param_list.size());
@@
-251,20
+251,20
@@
Action::compile_canidate_list(const ParamList& param_list, Category category)
{
if((iter->second.category&category))
{
{
if((iter->second.category&category))
{
- if(iter->second.is_canidate(param_list))
+ if(iter->second.is_can
d
idate(param_list))
ret.push_back(iter->second);
else
{
ret.push_back(iter->second);
else
{
- //synfig::info("Action \"%s\" is not a canidate",iter->second.name.c_str());
+ //synfig::info("Action \"%s\" is not a can
d
idate",iter->second.name.c_str());
}
}
}
}
}
}
-
+
return ret;
}
return ret;
}
-Action::CanidateList::iterator
-Action::CanidateList::find(const String& x)
+Action::Can
d
idateList::iterator
+Action::Can
d
idateList::find(const String& x)
{
iterator iter;
for(iter=begin();iter!=end();++iter)
{
iterator iter;
for(iter=begin();iter!=end();++iter)
@@
-277,7
+277,7
@@
void
Action::Base::set_param_list(const ParamList ¶m_list)
{
ParamList::const_iterator iter;
Action::Base::set_param_list(const ParamList ¶m_list)
{
ParamList::const_iterator iter;
-
+
for(iter=param_list.begin();iter!=param_list.end();++iter)
set_param(iter->first,iter->second);
}
for(iter=param_list.begin();iter!=param_list.end();++iter)
set_param(iter->first,iter->second);
}
@@
-286,7
+286,7
@@
void
Super::perform()
{
set_dirty(false);
Super::perform()
{
set_dirty(false);
-
+
prepare();
ActionList::const_iterator iter;
prepare();
ActionList::const_iterator iter;
@@
-382,7
+382,7
@@
Action::ParamVocab
Action::CanvasSpecific::get_param_vocab()
{
ParamVocab ret;
Action::CanvasSpecific::get_param_vocab()
{
ParamVocab ret;
-
+
ret.push_back(ParamDesc("canvas",Param::TYPE_CANVAS)
.set_local_name(_("Canvas"))
.set_desc(_("Selected Canvas"))
ret.push_back(ParamDesc("canvas",Param::TYPE_CANVAS)
.set_local_name(_("Canvas"))
.set_desc(_("Selected Canvas"))
@@
-393,7
+393,7
@@
Action::CanvasSpecific::get_param_vocab()
.set_desc(_("Canvas Interface"))
.set_optional(true)
);
.set_desc(_("Canvas Interface"))
.set_optional(true)
);
-
+
return ret;
}
return ret;
}
@@
-406,7
+406,7
@@
CanvasSpecific::set_param(const synfig::String& name, const Param ¶m)
if(!param.get_canvas())
return false;
set_canvas(param.get_canvas());
if(!param.get_canvas())
return false;
set_canvas(param.get_canvas());
-
+
return true;
}
if(name=="canvas_interface" && param.get_type()==Param::TYPE_CANVASINTERFACE)
return true;
}
if(name=="canvas_interface" && param.get_type()==Param::TYPE_CANVASINTERFACE)
@@
-416,13
+416,13
@@
CanvasSpecific::set_param(const synfig::String& name, const Param ¶m)
set_canvas_interface(param.get_canvas_interface());
if(!get_canvas())
set_canvas(get_canvas_interface()->get_canvas());
set_canvas_interface(param.get_canvas_interface());
if(!get_canvas())
set_canvas(get_canvas_interface()->get_canvas());
-
+
return true;
}
if(name=="edit_mode" && param.get_type()==Param::TYPE_EDITMODE)
{
set_edit_mode(param.get_edit_mode());
return true;
}
if(name=="edit_mode" && param.get_type()==Param::TYPE_EDITMODE)
{
set_edit_mode(param.get_edit_mode());
-
+
return true;
}
return true;
}
@@
-442,9
+442,9
@@
CanvasSpecific::get_edit_mode()const
{
if(mode_!=MODE_UNDEFINED)
return mode_;
{
if(mode_!=MODE_UNDEFINED)
return mode_;
-
+
if(get_canvas_interface())
return get_canvas_interface()->get_mode();
if(get_canvas_interface())
return get_canvas_interface()->get_mode();
-
+
return MODE_NORMAL;
}
return MODE_NORMAL;
}