2 /* === S Y N F I G ========================================================= */
3 /*! \file activepoint.h
4 ** \brief Template Header
9 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
11 ** This package is free software; you can redistribute it and/or
12 ** modify it under the terms of the GNU General Public License as
13 ** published by the Free Software Foundation; either version 2 of
14 ** the License, or (at your option) any later version.
16 ** This package is distributed in the hope that it will be useful,
17 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ** General Public License for more details.
22 /* ========================================================================= */
24 /* === S T A R T =========================================================== */
26 #ifndef __SYNFIG_ACTIVEPOINT_H
27 #define __SYNFIG_ACTIVEPOINT_H
29 /* === H E A D E R S ======================================================= */
35 /* === M A C R O S ========================================================= */
37 /* === T Y P E D E F S ===================================================== */
39 /* === C L A S S E S & S T R U C T S ======================================= */
45 struct Activepoint : public UniqueID
48 etl::loose_handle<ValueNode> parent_;
52 //! Time of the activepoint
58 //! Does this activepoint turn the entry on, or off?
61 bool operator<(const Activepoint& rhs) { return time<rhs.time; }
62 bool operator<(const Time& rhs) { return time<rhs; }
64 Activepoint(const Time &time, const bool &state, int p=0): time(time), priority(p),state(state) { }
65 //! \todo Should priority be initialised here, or elsewhere? This avoids a valgrind warning for now.
66 Activepoint(): priority(0) { }
68 const Time& get_time()const { return time; }
69 void set_time(const Time& x) { time=x; }
71 bool get_state()const { return state; }
72 void set_state(bool x) { state=x; }
74 int get_priority()const { return priority; }
75 void set_priority(int x) { priority=x; }
77 const etl::loose_handle<ValueNode> &get_parent_value_node()const { return parent_; }
78 void set_parent_value_node(const etl::loose_handle<ValueNode> &x) { parent_=x; }
80 int get_parent_index()const { return index; }
81 void set_parent_index(int x) { index=x; }
84 }; // END of struct ValueNode_BLine::Activepoint
86 }; // END of namespace synfig
88 /* === E N D =============================================================== */