moreupdates
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_gradientrotate.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file valuenode_twotone.h
3 **      \brief Template Header
4 **
5 **      $Id: valuenode_gradientrotate.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_GRADIENTROTATE_H
25 #define __SYNFIG_VALUENODE_GRADIENTROTATE_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_GradientRotate : public LinkableValueNode
38 {
39         typedef etl::handle<ValueNode_GradientRotate> Handle;
40         typedef etl::handle<const ValueNode_GradientRotate> ConstHandle;
41         
42 protected:
43
44         ValueNode_GradientRotate();
45
46 private:
47
48         ValueNode::RHandle ref_gradient;
49         ValueNode::RHandle ref_offset;
50
51 public:
52
53         virtual ~ValueNode_GradientRotate();
54
55 //      static Handle create(ValueBase::Type id=ValueBase::TYPE_GRADIENT);
56
57         //! Sets the left-hand-side value_node
58         bool set_gradient(ValueNode::Handle a);
59
60         //! Gets the left-hand-side value_node
61         ValueNode::Handle get_gradient()const { return ref_gradient; }
62
63         //! Sets the right-hand-side value_node
64         bool set_offset(ValueNode::Handle b);
65
66         //! Gets the right-hand-side value_node
67         ValueNode::Handle get_offset()const { return ref_gradient; }
68
69
70
71         virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
72
73         virtual int link_count()const;
74
75         virtual String link_local_name(int i)const;
76         virtual String link_name(int i)const;
77         virtual int get_link_index_from_name(const String &name)const;
78
79         virtual ValueBase operator()(Time t)const;
80
81         virtual String get_name()const;
82         virtual String get_local_name()const;
83
84 //      static bool check_type(const ValueBase::Type &type);
85 protected:
86         virtual bool set_link_vfunc(int i,ValueNode::Handle x);
87
88         LinkableValueNode* create_new()const;
89
90 public:
91         using synfig::LinkableValueNode::get_link_vfunc;
92
93         using synfig::LinkableValueNode::set_link_vfunc;
94         static bool check_type(ValueBase::Type type);
95         static ValueNode_GradientRotate* create(const ValueBase &x=ValueBase::TYPE_GRADIENT);
96 }; // END of class ValueNode_GradientRotate
97
98 }; // END of namespace synfig
99
100 /* === E N D =============================================================== */
101
102 #endif