X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_dynamiclist.h;h=1053cc7cece24a5fdb1d965da689edda396044c5;hb=54d76cf22cb55862d5ebf52dfa098fcfe8d246f8;hp=83c6a7b56e97a41c20da15a49274219863ca8b05;hpb=e3acc0b267b14fda5db3c7bbb2f218b993ef84b3;p=synfig.git
diff --git a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h
index 83c6a7b..1053cc7 100644
--- a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h
+++ b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h
@@ -1,28 +1,29 @@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_dynamiclist.h
** \brief Template Header
**
-** $Id: valuenode_dynamiclist.h,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
+** $Id$
**
** \legal
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
-** 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
*/
/* ========================================================================= */
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_DYNAMICLIST_H
-#define __SINFG_VALUENODE_DYNAMICLIST_H
+#ifndef __SYNFIG_VALUENODE_DYNAMICLIST_H
+#define __SYNFIG_VALUENODE_DYNAMICLIST_H
/* === H E A D E R S ======================================================= */
@@ -38,28 +39,28 @@
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode_BLine;
-
+
/*! \class ValueNode_DynamicList
** \brief Animated List ValueNode
**
-** This ValueNode was originaly set up to have a list
+** This ValueNode was originally set up to have a list
** of ValueNodes and their associated "on" and "off" points.
** ie: Any time that was directly after an "on" point,
-** the item would be "on", and any time that was directly
+** the item would be "on", and any time that was directly
** after an "off" point would be "off". This is pretty intuitive.
-** However, it does have it's problems.
+** However, it does have its problems.
**
-** The problems arrise when we introduce the concept of a
-** Keyframe. Keyframes can be manipulated via the Sinfg
+** The problems arise when we introduce the concept of a
+** Keyframe. Keyframes can be manipulated via the Synfig
** Application Library. They allow the user to quickly
** and "automagickly" rearange an animation by moving
-** the associated keyframes. With they old way that the
+** the associated keyframes. With the old way that the
** "on" and "off" points were handled, this task became
** overly complicated.
**
-** What is required is a "symetric" system of describing
+** What is required is a "symmetric" system of describing
** "on" and "off" points. Instead of the point representing
** the state of the item after that point in time, we have
** the point represent only that frame. The state
@@ -73,7 +74,7 @@ class ValueNode_BLine;
class ValueNode_DynamicList : public LinkableValueNode
{
public:
-
+
/*! \class ListEntry
** \brief Contains a potential list item, and associated timing information
**
@@ -88,44 +89,44 @@ public:
friend class ValueNode_DynamicList;
friend class ValueNode_BLine;
public:
- typedef sinfg::Activepoint Activepoint;
-
+ typedef synfig::Activepoint Activepoint;
+
typedef std::list ActivepointList;
-
+
typedef std::pair findresult;
typedef std::pair const_findresult;
-
+
private:
mutable Node::time_set times;
public:
ValueNode::RHandle value_node;
-
+
ActivepointList timing_info;
-
+
private:
int index;
etl::loose_handle parent_;
- void set_parent_value_node(const etl::loose_handle &x) { parent_=x; }
+ void set_parent_value_node(const etl::loose_handle &x) { parent_=x; }
public:
int get_index()const { return index; }
-
-
+
+
bool status_at_time(const Time &x)const;
float amount_at_time(const Time &x, bool *rising=0)const;
ActivepointList::iterator add(Time time, bool status, int priority=0);
ActivepointList::iterator add(const Activepoint &x);
-
+
findresult find_uid(const UniqueID& x);
const_findresult find_uid(const UniqueID& x)const;
-
+
findresult find_time(const Time& x);
const_findresult find_time(const Time& x)const;
-
+
ActivepointList::iterator find(const UniqueID& x);
ActivepointList::const_iterator find(const UniqueID& x)const;
ActivepointList::iterator find(const Time& x);
@@ -140,11 +141,11 @@ public:
ActivepointList::iterator add(Time time)
{ return add(time, status_at_time(time)); }
- void erase(const UniqueID& x);
-
+ void erase(const UniqueID& x);
+
int find(const Time& begin,const Time& end,std::vector& list);
-
- const sinfg::Node::time_set &get_times() const;
+
+ const synfig::Node::time_set &get_times() const;
const etl::loose_handle &get_parent_value_node()const { return parent_; }
@@ -152,7 +153,7 @@ public:
ListEntry(const ValueNode::Handle &value_node);
ListEntry(const ValueNode::Handle &value_node,Time begin, Time end);
}; // END of struct ValueNode_DynamicList::ListEntry
-
+
typedef etl::handle Handle;
typedef etl::handle ConstHandle;
@@ -168,7 +169,7 @@ public:
std::vector list;
public:
-
+
void add(const ValueNode::Handle &value_node, int index=-1);
void add(const ListEntry &value_node, int index=-1);
void erase(const ValueNode::Handle &value_node);
@@ -176,7 +177,7 @@ public:
int find_next_valid_entry(int x, Time t)const;
int find_prev_valid_entry(int x, Time t)const;
-
+
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
virtual int link_count()const;
@@ -216,7 +217,7 @@ public:
virtual ListEntry create_list_entry(int index, Time time=0, Real origin=0.5);
protected:
-
+
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
LinkableValueNode* create_new()const;
@@ -228,8 +229,8 @@ public:
** (which is ValueBase::TYPE_LIST)
*/
static Handle create(ValueBase::Type id=ValueBase::TYPE_NIL);
- using sinfg::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_DynamicList* create_from(const ValueBase &x=ValueBase::TYPE_GRADIENT);
}; // END of class ValueNode_DynamicList
@@ -237,7 +238,7 @@ public:
typedef ValueNode_DynamicList::ListEntry::Activepoint Activepoint;
typedef ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */