X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Faction_param.h;h=61e723e73a61181209d5baa6dbca7297bbabc9d8;hb=d15c4522466bedfbe61620c401becae0931854f5;hp=98dc0ee2fc9bbd4dab35a7e27f0c7b08b7934c98;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/action_param.h b/synfig-studio/trunk/src/synfigapp/action_param.h index 98dc0ee..61e723e 100644 --- a/synfig-studio/trunk/src/synfigapp/action_param.h +++ b/synfig-studio/trunk/src/synfigapp/action_param.h @@ -2,19 +2,21 @@ /*! \file action_param.h ** \brief Template File ** -** $Id: action_param.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** -** 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 */ /* ========================================================================= */ @@ -63,8 +65,8 @@ class RendDesc; namespace synfigapp { class CanvasInterface; - -namespace Action { + +namespace Action { //! Action Parameter class Param @@ -72,26 +74,26 @@ class Param public: enum Type { - TYPE_NIL, + TYPE_NIL, // 0 TYPE_INTEGER, TYPE_REAL, TYPE_BOOL, - TYPE_ACTIVEPOINT, + TYPE_ACTIVEPOINT, // 4 TYPE_WAYPOINT, TYPE_WAYPOINTMODEL, TYPE_KEYFRAME, - TYPE_CANVAS, + TYPE_CANVAS, // 8 TYPE_LAYER, TYPE_VALUENODE, TYPE_VALUEDESC, - TYPE_VALUE, + TYPE_VALUE, // 12 TYPE_STRING, TYPE_TIME, TYPE_CANVASINTERFACE, - TYPE_EDITMODE, + TYPE_EDITMODE, // 16 TYPE_RENDDESC, - - TYPE_END + + TYPE_END // 18 }; private: Type type_; @@ -115,7 +117,7 @@ private: synfig::Real real; bool b; EditMode edit_mode; - + } data; public: @@ -146,11 +148,11 @@ public: Param(const synfig::ValueBase& x); ~Param(); - + Param& operator=(const Param& rhs); - + void clear(); - + const synfig::Canvas::LooseHandle& get_canvas()const { assert(type_==TYPE_CANVAS); return data.canvas.get(); } const etl::loose_handle& get_canvas_interface()const { assert(type_==TYPE_CANVASINTERFACE); return data.canvas_interface.get(); } const synfig::Layer::LooseHandle& get_layer()const { assert(type_==TYPE_LAYER); return data.layer.get(); } @@ -203,7 +205,7 @@ public: requires_multiple_(false), optional_(false) { } - + const synfig::String& get_name()const { return name_; } const synfig::String& get_desc()const { return desc_; } const synfig::String& get_mutual_exclusion()const { return mutual_exclusion_; } @@ -225,7 +227,7 @@ public: class ParamVocab : public std::list< ParamDesc > { }; -bool canidate_check(const ParamVocab& param_vocab, const ParamList& param_list); +bool candidate_check(const ParamVocab& param_vocab, const ParamList& param_list); }; // END of namespace Action