1 /* === S Y N F I G ========================================================= */
3 ** \brief Template Header
5 ** $Id: main.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
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 __SYNFIGAPP_MAIN_H
26 #define __SYNFIGAPP_MAIN_H
28 /* === H E A D E R S ======================================================= */
30 #include <ETL/ref_count>
31 #include <synfig/string.h>
32 #include <synfig/general.h>
33 #include <synfig/main.h>
34 #include <synfig/distance.h>
35 #include <synfig/real.h>
36 #include <synfig/waypoint.h>
37 #include <sigc++/signal.h>
38 #include <sigc++/object.h>
39 #include "inputdevice.h"
42 /* === M A C R O S ========================================================= */
44 /* === T Y P E D E F S ===================================================== */
46 /* === C L A S S E S & S T R U C T S ======================================= */
55 /*! \class synfigapp::Main
60 class Main : public synfig::Main
62 etl::reference_counter ref_count_;
64 Main(const synfig::String &basepath,synfig::ProgressCallback *cb=0);
67 const etl::reference_counter& ref_count()const { return ref_count_; }
69 static const synfig::Color& get_foreground_color();
70 static const synfig::Color& get_background_color();
71 static const synfig::Gradient& get_gradient();
72 static const synfig::Distance& get_bline_width();
73 static synfig::Waypoint::Interpolation get_interpolation();
76 static void set_interpolation(synfig::Waypoint::Interpolation x);
77 static void set_bline_width(synfig::Distance x);
78 static void set_foreground_color(synfig::Color color);
79 static void set_background_color(synfig::Color color);
80 static void set_gradient(synfig::Gradient gradient);
81 static void set_gradient_default_colors();
82 static void color_swap();
84 static synfig::Color::BlendMethod get_blend_method();
85 static const synfig::Real& get_opacity();
86 static void set_blend_method(synfig::Color::BlendMethod);
87 static void set_opacity(synfig::Real);
88 static sigc::signal<void>& signal_blend_method_changed();
89 static sigc::signal<void>& signal_opacity_changed();
90 static sigc::signal<void>& signal_interpolation_changed();
93 static InputDevice::Handle add_input_device(const synfig::String id_, InputDevice::Type type_=InputDevice::TYPE_MOUSE);
94 static InputDevice::Handle find_input_device(const synfig::String id_);
95 static InputDevice::Handle select_input_device(const synfig::String id_);
96 static bool select_input_device(InputDevice::Handle input_device);
97 static InputDevice::Handle get_selected_input_device();
98 static void set_state(synfig::String state);
100 static Settings& settings();
103 static sigc::signal<void>& signal_foreground_color_changed();
104 static sigc::signal<void>& signal_background_color_changed();
105 static sigc::signal<void>& signal_gradient_changed();
106 static sigc::signal<void>& signal_bline_width_changed();
108 }; // END of class Main
110 }; // END if namespace synfigapp
111 /* === E N D =============================================================== */