00001 /* === S Y N F I G ========================================================= */ 00021 /* ========================================================================= */ 00022 00023 /* === S T A R T =========================================================== */ 00024 00025 #ifndef __SYNFIGAPP_MAIN_H 00026 #define __SYNFIGAPP_MAIN_H 00027 00028 /* === H E A D E R S ======================================================= */ 00029 00030 #include <ETL/ref_count> 00031 #include <synfig/string.h> 00032 #include <synfig/general.h> 00033 #include <synfig/main.h> 00034 #include <synfig/distance.h> 00035 #include <synfig/real.h> 00036 #include <synfig/waypoint.h> 00037 #include <sigc++/signal.h> 00038 #include <sigc++/object.h> 00039 #include "inputdevice.h" 00040 #include "settings.h" 00041 00042 /* === M A C R O S ========================================================= */ 00043 00044 /* === T Y P E D E F S ===================================================== */ 00045 00046 /* === C L A S S E S & S T R U C T S ======================================= */ 00047 00048 namespace synfig { 00049 class Color; 00050 class Gradient; 00051 }; 00052 00053 namespace synfigapp { 00054 00060 class Main : public synfig::Main 00061 { 00062 etl::reference_counter ref_count_; 00063 public: 00064 Main(const synfig::String &basepath,synfig::ProgressCallback *cb=0); 00065 ~Main(); 00066 00067 const etl::reference_counter& ref_count()const { return ref_count_; } 00068 00069 static const synfig::Color& get_outline_color(); 00070 static const synfig::Color& get_fill_color(); 00071 static const synfig::Gradient& get_gradient(); 00072 static const synfig::Distance& get_bline_width(); 00073 static synfig::Waypoint::Interpolation get_interpolation(); 00074 00075 00076 static void set_interpolation(synfig::Waypoint::Interpolation x); 00077 static void set_bline_width(synfig::Distance x); 00078 static void set_outline_color(synfig::Color color); 00079 static void set_fill_color(synfig::Color color); 00080 static void set_gradient(synfig::Gradient gradient); 00081 static void set_gradient_default_colors(); 00082 static void color_swap(); 00083 00084 static synfig::Color::BlendMethod get_blend_method(); 00085 static const synfig::Real& get_opacity(); 00086 static void set_blend_method(synfig::Color::BlendMethod); 00087 static void set_opacity(synfig::Real); 00088 static sigc::signal<void>& signal_blend_method_changed(); 00089 static sigc::signal<void>& signal_opacity_changed(); 00090 static sigc::signal<void>& signal_interpolation_changed(); 00091 00092 // Input Device stuff 00093 static InputDevice::Handle add_input_device(const synfig::String id_, InputDevice::Type type_=InputDevice::TYPE_MOUSE); 00094 static InputDevice::Handle find_input_device(const synfig::String id_); 00095 static InputDevice::Handle select_input_device(const synfig::String id_); 00096 static bool select_input_device(InputDevice::Handle input_device); 00097 static InputDevice::Handle get_selected_input_device(); 00098 static void set_state(synfig::String state); 00099 00100 static Settings& settings(); 00101 00102 // Signal interfaces 00103 static sigc::signal<void>& signal_outline_color_changed(); 00104 static sigc::signal<void>& signal_fill_color_changed(); 00105 static sigc::signal<void>& signal_gradient_changed(); 00106 static sigc::signal<void>& signal_bline_width_changed(); 00107 00108 }; // END of class Main 00109 00110 }; // END if namespace synfigapp 00111 /* === E N D =============================================================== */ 00112 00113 #endif