/*! \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
#include "canvasinterface.h"
+#include "general.h"
+
#endif
using namespace std;
#define ADD_ACTION(x) { BookEntry &be(book()[x::name__]); \
be.name=x::name__; \
- be.local_name=x::local_name__; \
+ be.local_name=gettext(x::local_name__); \
be.version=x::version__; \
be.task=x::task__; \
be.priority=x::priority__; \
be.get_param_vocab=x::get_param_vocab; \
be.is_candidate=x::is_candidate; \
}
-
+
Action::Main::Main()
{
book_=new synfigapp::Action::Book();
-
+
ADD_ACTION(Action::LayerRemove);
ADD_ACTION(Action::LayerMove);
ADD_ACTION(Action::LayerRaise);
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::ValueNodeDynamicListRotateOrder);
ADD_ACTION(Action::ValueNodeRename);
ADD_ACTION(Action::ValueNodeRemove);
-
+
ADD_ACTION(Action::ValueDescSet);
ADD_ACTION(Action::ValueDescExport);
ADD_ACTION(Action::ValueDescConvert);
ADD_ACTION(Action::GradientSet);
ADD_ACTION(Action::ColorSet);
-
+
ADD_ACTION(Action::TimepointsMove);
ADD_ACTION(Action::TimepointsCopy);
ADD_ACTION(Action::TimepointsDelete);
Action::Main::~Main()
{
delete book_;
-
+
}
{
if(!book().count(name))
return 0; //! \todo perhaps we should throw something instead?
- return book()[name].factory();
+ return book()[name].factory();
}
Action::compile_candidate_list(const ParamList& param_list, Category category)
{
Action::CandidateList ret;
-
+
Book::const_iterator iter;
//synfig::info("param_list.size()=%d",param_list.size());
}
}
}
-
+
return ret;
}
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);
}
Super::perform()
{
set_dirty(false);
-
+
prepare();
ActionList::const_iterator iter;
Action::CanvasSpecific::get_param_vocab()
{
ParamVocab ret;
-
+
ret.push_back(ParamDesc("canvas",Param::TYPE_CANVAS)
.set_local_name(_("Canvas"))
.set_desc(_("Selected Canvas"))
.set_desc(_("Canvas Interface"))
.set_optional(true)
);
-
+
return ret;
}
if(!param.get_canvas())
return false;
set_canvas(param.get_canvas());
-
+
return true;
}
if(name=="canvas_interface" && param.get_type()==Param::TYPE_CANVASINTERFACE)
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(mode_!=MODE_UNDEFINED)
return mode_;
-
+
if(get_canvas_interface())
return get_canvas_interface()->get_mode();
-
+
return MODE_NORMAL;
}