]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/control.h
Zero-initialize JsDevice name buffer to avoid valgrind warning
[libs/gui.git] / source / input / control.h
index 5b435dcf0a1f478ee0994657998bd87e09eaec9e..e5679639cf49eabefc9429c1fc83ab32618c60d8 100644 (file)
@@ -1,12 +1,5 @@
-/* $Id$
-
-This file is part of libmspgbase
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
-#ifndef MSP_GBASE_CONTROL_H_
-#define MSP_GBASE_CONTROL_H_
+#ifndef MSP_INPUT_CONTROL_H_
+#define MSP_INPUT_CONTROL_H_
 
 #include <string>
 #include <sigc++/signal.h>
@@ -61,10 +54,8 @@ protected:
        Control();
        Control(const ControlSource &);
        Control(Device &, ControlSrcType, unsigned);
-       Control(const Control &);
 public:
-       Control &operator=(const Control &);
-       virtual ~Control() { }
+       virtual ~Control();
 
        void capture(Device &);
        void cancel_capture();
@@ -72,15 +63,18 @@ public:
        void set_source(const ControlSource &);
        const ControlSource &get_source() const { return src; }
 protected:
-       virtual void on_press() =0;
-       virtual void on_release() =0;
-       virtual void on_motion(float, float) =0;
+       virtual void on_press() = 0;
+       virtual void on_release() = 0;
+       virtual void on_motion(float, float) = 0;
 
 private:
        void connect_signals();
        void button_press(unsigned);
        void button_release(unsigned);
        void axis_motion(unsigned, float, float);
+
+       Control(const Control &);
+       Control &operator=(const Control &);
 };
 
 } // namespace Input