1 /* === S Y N F I G ========================================================= */
2 /*! \file inputdevice.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_INPUTDEVICE_H
26 #define __SYNFIG_INPUTDEVICE_H
28 /* === H E A D E R S ======================================================= */
30 #include <synfig/color.h>
31 #include <synfig/vector.h>
32 #include <synfig/distance.h>
33 #include <synfig/string.h>
36 /* === M A C R O S ========================================================= */
38 /* === T Y P E D E F S ===================================================== */
40 /* === C L A S S E S & S T R U C T S ======================================= */
48 class InputDevice : public etl::shared_object
59 typedef etl::handle<InputDevice> Handle;
64 synfig::String state_;
65 synfig::Color foreground_color_;
66 synfig::Color background_color_;
67 synfig::Distance bline_width_;
68 synfig::Real opacity_;
69 synfig::Color::BlendMethod blend_method_;
71 DeviceSettings* device_settings;
74 InputDevice(const synfig::String id_, Type type_=TYPE_MOUSE);
77 const synfig::String& get_id()const { return id_; }
78 const synfig::String& get_state()const { return state_; }
79 const synfig::Color& get_foreground_color()const { return foreground_color_; }
80 const synfig::Color& get_background_color()const { return background_color_; }
81 const synfig::Distance& get_bline_width()const { return bline_width_; }
82 const synfig::Real& get_opacity()const { return opacity_; }
83 const synfig::Color::BlendMethod& get_blend_method()const { return blend_method_; }
84 Type get_type()const { return type_; }
86 void set_state(const synfig::String& x) { state_=x; }
87 void set_foreground_color(const synfig::Color& x) { foreground_color_=x; }
88 void set_background_color(const synfig::Color& x) { background_color_=x; }
89 void set_bline_width(const synfig::Distance& x) { bline_width_=x; }
90 void set_blend_method(const synfig::Color::BlendMethod& x) { blend_method_=x; }
91 void set_opacity(const synfig::Real& x) { opacity_=x; }
92 void set_type(Type x) { type_=x; }
95 const Settings& settings()const;
96 }; // END of class InputDevice
98 }; // END of namespace synfigapp
100 /* === E N D =============================================================== */