moreupdates
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_bline.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file valuenode_bline.h
3 **      \brief Template Header
4 **
5 **      $Id: valuenode_bline.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_BLINE_H
25 #define __SYNFIG_VALUENODE_BLINE_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include <vector>
30 #include <list>
31
32 #include "valuenode.h"
33 #include "time.h"
34 #include "uniqueid.h"
35 #include "blinepoint.h"
36 #include "valuenode_dynamiclist.h"
37
38 /* === M A C R O S ========================================================= */
39
40 /* === C L A S S E S & S T R U C T S ======================================= */
41
42 namespace synfig {
43
44
45 //! Converts a list of bline points into a list of segments
46 ValueBase convert_bline_to_segment_list(const ValueBase &bline);
47
48 //! Converts a list of bline points into a list of widths
49 ValueBase convert_bline_to_width_list(const ValueBase &bline);
50         
51 /*! \class ValueNode_BLine
52 **      \brief \writeme
53 */
54 class ValueNode_BLine : public ValueNode_DynamicList
55 {
56 public:
57
58         typedef etl::handle<ValueNode_BLine> Handle;
59         typedef etl::handle<const ValueNode_BLine> ConstHandle;
60         
61
62         ValueNode_BLine();
63
64 public:
65         
66
67         
68         virtual ValueBase operator()(Time t)const;
69
70         virtual ~ValueNode_BLine();
71
72         virtual String link_local_name(int i)const;
73
74         virtual String get_name()const;
75         virtual String get_local_name()const;
76
77         virtual ValueNode* clone(const GUID& deriv_guid=GUID())const;
78         
79         virtual ListEntry create_list_entry(int index, Time time=0, Real origin=0.5);
80
81 protected:
82         
83         LinkableValueNode* create_new()const;
84
85 public:
86         //using synfig::LinkableValueNode::set_link_vfunc;
87         static bool check_type(ValueBase::Type type);
88         static ValueNode_BLine* create(const ValueBase &x=ValueBase::TYPE_LIST);
89 }; // END of class ValueNode_BLine
90
91 typedef ValueNode_BLine::ListEntry::ActivepointList ActivepointList;
92
93 }; // END of namespace synfig
94
95 /* === E N D =============================================================== */
96
97 #endif