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