moreupdates
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_timedswap.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file valuenode_timedswap.h
3 **      \brief Template Header
4 **
5 **      $Id: valuenode_timedswap.h,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
6 **
7 **      \legal
8 **      Copyright (c) 2002 Robert B. Quattlebaum Jr.
9 **
10 **      This software and associated documentation
11 **      are CONFIDENTIAL and PROPRIETARY property of
12 **      the above-mentioned copyright holder.
13 **
14 **      You may not copy, print, publish, or in any
15 **      other way distribute this software without
16 **      a prior written agreement with
17 **      the copyright holder.
18 **      \endlegal
19 */
20 /* ========================================================================= */
21
22 /* === S T A R T =========================================================== */
23
24 #ifndef __SYNFIG_VALUENODE_TIMEDSWAP_H
25 #define __SYNFIG_VALUENODE_TIMEDSWAP_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include "valuenode.h"
30
31 /* === M A C R O S ========================================================= */
32
33 /* === C L A S S E S & S T R U C T S ======================================= */
34
35 namespace synfig {
36
37 struct ValueNode_TimedSwap : public LinkableValueNode
38 {
39         typedef etl::handle<ValueNode_TimedSwap> Handle;
40         typedef etl::handle<const ValueNode_TimedSwap> ConstHandle;
41         
42 private:
43
44         ValueNode::RHandle before;
45         ValueNode::RHandle after;
46         ValueNode::RHandle swap_time;
47         ValueNode::RHandle swap_length;
48
49         ValueNode_TimedSwap(ValueBase::Type id);
50
51 public:
52
53 //      static Handle create(ValueBase::Type id);
54
55         virtual ~ValueNode_TimedSwap();
56
57         bool set_before(const ValueNode::Handle &a);
58         ValueNode::Handle get_before()const;
59         bool set_after(const ValueNode::Handle &a);
60         ValueNode::Handle get_after()const;
61
62         void set_swap_time_real(Time x);
63         bool set_swap_time(const ValueNode::Handle &x);
64         ValueNode::Handle get_swap_time()const;
65
66         void set_swap_length_real(Time x);
67         bool set_swap_length(const ValueNode::Handle &x);
68         ValueNode::Handle get_swap_length()const;
69
70
71         virtual bool set_link_vfunc(int i,ValueNode::Handle x);
72         virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
73         virtual int link_count()const;
74         virtual String link_local_name(int i)const;
75         virtual String link_name(int i)const;
76         virtual int get_link_index_from_name(const String &name)const;
77
78         virtual ValueBase operator()(Time t)const;
79
80         virtual String get_name()const; 
81         virtual String get_local_name()const;
82 //      static bool check_type(const ValueBase::Type &type);
83
84 protected:
85         
86         virtual LinkableValueNode* create_new()const;
87
88 public:
89         using synfig::LinkableValueNode::get_link_vfunc;
90         using synfig::LinkableValueNode::set_link_vfunc;
91         static bool check_type(ValueBase::Type type);
92         static ValueNode_TimedSwap* create(const ValueBase &x);
93 }; // END of class ValueNode_TimedSwap
94
95 }; // END of namespace synfig
96
97 /* === E N D =============================================================== */
98
99 #endif