X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftags%2F0.61.09%2Fsrc%2Fsynfigapp%2Factions%2Feditmodeset.cpp;fp=synfig-studio%2Ftags%2F0.61.09%2Fsrc%2Fsynfigapp%2Factions%2Feditmodeset.cpp;h=0000000000000000000000000000000000000000;hb=3a6643238c67c043fc3592837a05d6d2861967f1;hp=f473acede84d941762554892347c246eeb060fd4;hpb=47fce282611fbba1044921d22ca887f9b53ad91a;p=synfig.git diff --git a/synfig-studio/tags/0.61.09/src/synfigapp/actions/editmodeset.cpp b/synfig-studio/tags/0.61.09/src/synfigapp/actions/editmodeset.cpp deleted file mode 100644 index f473ace..0000000 --- a/synfig-studio/tags/0.61.09/src/synfigapp/actions/editmodeset.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file editmodeset.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** 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. -** -** 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 -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "editmodeset.h" -#include - -#include - -#endif - -using namespace std; -using namespace etl; -using namespace synfig; -using namespace synfigapp; -using namespace Action; - -/* === M A C R O S ========================================================= */ - -ACTION_INIT(Action::EditModeSet); -ACTION_SET_NAME(Action::EditModeSet,"edit_mode_set"); -ACTION_SET_LOCAL_NAME(Action::EditModeSet,N_("Set Edit Mode")); -ACTION_SET_TASK(Action::EditModeSet,"set"); -ACTION_SET_CATEGORY(Action::EditModeSet,Action::CATEGORY_OTHER); -ACTION_SET_PRIORITY(Action::EditModeSet,0); -ACTION_SET_VERSION(Action::EditModeSet,"0.0"); -ACTION_SET_CVS_ID(Action::EditModeSet,"$Id$"); - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Action::EditModeSet::EditModeSet() -{ -} - -Action::ParamVocab -Action::EditModeSet::get_param_vocab() -{ - ParamVocab ret(Action::CanvasSpecific::get_param_vocab()); - - ret.push_back(ParamDesc("edit_mode",Param::TYPE_EDITMODE) - .set_local_name(_("New Edit Mode")) - ); - - return ret; -} - -bool -Action::EditModeSet::is_candidate(const ParamList &x) -{ - return candidate_check(get_param_vocab(),x); -} - -bool -Action::EditModeSet::set_param(const synfig::String& name, const Action::Param ¶m) -{ -/* - if(name=="edit_mode" && param.get_type()==Param::TYPE_EDITMODE) - { - set_edit_mode(param.get_edit_mode()); - - return true; - } -*/ - - return Action::CanvasSpecific::set_param(name,param); -} - -bool -Action::EditModeSet::is_ready()const -{ - return Action::CanvasSpecific::is_ready() && get_canvas_interface(); -} - -void -Action::EditModeSet::perform() -{ - set_dirty(false); - - old_edit_mode=get_canvas_interface()->get_mode(); - - if(old_edit_mode==get_edit_mode()) - return; - - get_canvas_interface()->mode_=get_edit_mode(); - - get_canvas_interface()->signal_mode_changed_(get_edit_mode()); -} - -void -Action::EditModeSet::undo() -{ - set_dirty(false); - - if(old_edit_mode==get_edit_mode()) - return; - - get_canvas_interface()->mode_=old_edit_mode; - - get_canvas_interface()->signal_mode_changed_(old_edit_mode); -}