X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fcontrol.h;h=a2f002c08557d57807bbaaaafb4171e9400c7923;hb=dce7552c5e2f64fcf5f58b0c934bb4a01f6cbcf7;hp=f7146b47f4502345d8d00a01988fb4b36cc78f3c;hpb=999ca92aa9ee10585c0b2094d84364159253982f;p=libs%2Fgui.git diff --git a/source/input/control.h b/source/input/control.h index f7146b4..a2f002c 100644 --- a/source/input/control.h +++ b/source/input/control.h @@ -1,13 +1,7 @@ -/* $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_ +#include #include #include @@ -60,24 +54,27 @@ protected: Control(); Control(const ControlSource &); Control(Device &, ControlSrcType, unsigned); - Control(const Control &); public: - Control &operator=(const Control &); virtual ~Control() { } void capture(Device &); void cancel_capture(); + void set_source(Device &, ControlSrcType, unsigned); + 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