1 /* === S Y N F I G ========================================================= */
2 /*! \file activepoint.h
3 ** \brief Template Header
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
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.
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.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_ACTIVEPOINT_H
26 #define __SYNFIG_ACTIVEPOINT_H
28 /* === H E A D E R S ======================================================= */
34 /* === M A C R O S ========================================================= */
36 /* === T Y P E D E F S ===================================================== */
38 /* === C L A S S E S & S T R U C T S ======================================= */
44 struct Activepoint : public UniqueID
47 etl::loose_handle<ValueNode> parent_;
51 //! Time of the activepoint
57 //! Does this activepoint turn the entry on, or off?
60 bool operator<(const Activepoint& rhs) { return time<rhs.time; }
61 bool operator<(const Time& rhs) { return time<rhs; }
63 Activepoint(const Time &time, const bool &state, int p=0): time(time), priority(p),state(state) { }
66 const Time& get_time()const { return time; }
67 void set_time(const Time& x) { time=x; }
69 bool get_state()const { return state; }
70 void set_state(bool x) { state=x; }
72 int get_priority()const { return priority; }
73 void set_priority(int x) { priority=x; }
75 const etl::loose_handle<ValueNode> &get_parent_value_node()const { return parent_; }
76 void set_parent_value_node(const etl::loose_handle<ValueNode> &x) { parent_=x; }
78 int get_parent_index()const { return index; }
79 void set_parent_index(int x) { index=x; }
82 }; // END of struct ValueNode_BLine::Activepoint
84 }; // END of namespace synfig
86 /* === E N D =============================================================== */