00001 #include <stdio.h> 00002 /* === S Y N F I G ========================================================= */ 00023 /* ========================================================================= */ 00024 00025 /* === S T A R T =========================================================== */ 00026 00027 #ifndef __SYNFIG_ACTIVEPOINT_H 00028 #define __SYNFIG_ACTIVEPOINT_H 00029 00030 /* === H E A D E R S ======================================================= */ 00031 00032 #include "time.h" 00033 #include "uniqueid.h" 00034 #include <ETL/handle> 00035 00036 /* === M A C R O S ========================================================= */ 00037 00038 /* === T Y P E D E F S ===================================================== */ 00039 00040 /* === C L A S S E S & S T R U C T S ======================================= */ 00041 00042 namespace synfig { 00043 class GUID; 00044 class ValueNode; 00045 00046 struct Activepoint : public UniqueID 00047 { 00048 private: 00049 etl::loose_handle<ValueNode> parent_; 00050 int index; 00051 00052 public: 00054 Time time; 00055 00057 int priority; 00058 00060 bool state; 00061 00062 bool operator<(const Activepoint& rhs) { return time<rhs.time; } 00063 bool operator<(const Time& rhs) { return time<rhs; } 00064 00065 Activepoint(const Time &time, const bool &state, int p=0): time(time), priority(p),state(state) { } 00067 Activepoint(): priority(0) { } 00068 00069 const Time& get_time()const { return time; } 00070 void set_time(const Time& x) { time=x; } 00071 00072 bool get_state()const { return state; } 00073 void set_state(bool x) { state=x; } 00074 00075 int get_priority()const { return priority; } 00076 void set_priority(int x) { priority=x; } 00077 00078 const etl::loose_handle<ValueNode> &get_parent_value_node()const { return parent_; } 00079 void set_parent_value_node(const etl::loose_handle<ValueNode> &x) { parent_=x; } 00080 00081 int get_parent_index()const { return index; } 00082 void set_parent_index(int x) { index=x; } 00083 00084 GUID get_guid()const; 00085 }; // END of struct ValueNode_BLine::Activepoint 00086 00087 }; // END of namespace synfig 00088 00089 /* === E N D =============================================================== */ 00090 00091 #endif