/*! \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
*/
/* ========================================================================= */
namespace synfigapp {
class CanvasInterface;
-
-namespace Action {
+
+namespace Action {
//! Action Parameter
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_;
synfig::Real real;
bool b;
EditMode edit_mode;
-
+
} data;
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<synfigapp::CanvasInterface>& 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(); }
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_; }
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