Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-core / tags / synfig_0_61_06 / src / synfig / valuenode_bline.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file valuenode_bline.h
3 **      \brief Template Header
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **
10 **      This package is free software; you can redistribute it and/or
11 **      modify it under the terms of the GNU General Public License as
12 **      published by the Free Software Foundation; either version 2 of
13 **      the License, or (at your option) any later version.
14 **
15 **      This package is distributed in the hope that it will be useful,
16 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
17 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 **      General Public License for more details.
19 **      \endlegal
20 */
21 /* ========================================================================= */
22
23 /* === S T A R T =========================================================== */
24
25 #ifndef __SYNFIG_VALUENODE_BLINE_H
26 #define __SYNFIG_VALUENODE_BLINE_H
27
28 /* === H E A D E R S ======================================================= */
29
30 #include <vector>
31 #include <list>
32
33 #include "valuenode.h"
34 #include "time.h"
35 #include "uniqueid.h"
36 #include "blinepoint.h"
37 #include "valuenode_dynamiclist.h"
38
39 /* === M A C R O S ========================================================= */
40
41 /* === C L A S S E S & S T R U C T S ======================================= */
42
43 namespace synfig {
44
45
46 //! Converts a list of bline points into a list of segments
47 ValueBase convert_bline_to_segment_list(const ValueBase &bline);
48
49 //! Converts a list of bline points into a list of widths
50 ValueBase convert_bline_to_width_list(const ValueBase &bline);
51
52 /*! \class ValueNode_BLine
53 **      \brief \writeme
54 */
55 class ValueNode_BLine : public ValueNode_DynamicList
56 {
57 public:
58
59         typedef etl::handle<ValueNode_BLine> Handle;
60         typedef etl::handle<const ValueNode_BLine> ConstHandle;
61
62
63         ValueNode_BLine();
64
65 public:
66
67
68
69         virtual ValueBase operator()(Time t)const;
70
71         virtual ~ValueNode_BLine();
72
73         virtual String link_local_name(int i)const;
74
75         virtual String get_name()const;
76         virtual String get_local_name()const;
77
78         virtual ValueNode* clone(const GUID& deriv_guid=GUID())const;
79
80         virtual ListEntry create_list_entry(int index, Time time=0, Real origin=0.5);
81
82 protected:
83
84         LinkableValueNode* create_new()const;
85
86 public:
87         //using synfig::LinkableValueNode::set_link_vfunc;
88         static bool check_type(ValueBase::Type type);
89         static ValueNode_BLine* create(const ValueBase &x=ValueBase::TYPE_LIST);
90 }; // END of class ValueNode_BLine
91
92 typedef ValueNode_BLine::ListEntry::ActivepointList ActivepointList;
93
94 }; // END of namespace synfig
95
96 /* === E N D =============================================================== */
97
98 #endif