14
14
// See the file "License.txt" for information on usage and redistribution of
15
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
17
// $Id: Control.hxx 2412 2012-03-14 01:19:23Z stephena $
17
// $Id: Control.hxx 2444 2012-04-19 13:00:02Z stephena $
18
18
//============================================================================
20
20
#ifndef CONTROLLER_HXX
59
58
of the controller from the perspective of the controller's jack.
61
60
@author Bradford W. Mott
62
@version $Id: Control.hxx 2412 2012-03-14 01:19:23Z stephena $
61
@version $Id: Control.hxx 2444 2012-04-19 13:00:02Z stephena $
64
63
class Controller : public Serializable
161
160
Called after *all* digital pins have been written on Port A.
162
161
Most controllers don't do anything in this case.
163
@param value The entire contents of the SWCHA register
164
virtual void controlWrite() { };
165
virtual void controlWrite(uInt8 value) { };
167
168
Update the entire digital and analog pin state according to the
180
181
Determines how this controller will treat values received from the
181
182
X/Y axis and left/right buttons of the mouse. Since not all controllers
182
use the mouse, it's up to the specific class to decide how to use this data.
184
If either of the axis is set to 'Automatic', then we automatically
185
use the ctrlID for the control type.
183
use the mouse the same way (or at all), it's up to the specific class to
184
decide how to use this data.
187
186
In the current implementation, the left button is tied to the X axis,
188
187
and the right one tied to the Y axis.
190
@param xaxis How the controller should use x-axis data
191
@param yaxis How the controller should use y-axis data
192
@param ctrlID The controller ID to use axis 'auto' mode
189
@param xtype The controller to use for x-axis data
190
@param xid The controller ID to use for x-axis data (-1 for no id)
191
@param ytype The controller to use for y-axis data
192
@param yid The controller ID to use for y-axis data (-1 for no id)
194
@return Whether the controller supports using the mouse
194
virtual void setMouseControl(
195
MouseControl::Axis xaxis, MouseControl::Axis yaxis, int ctrlID = -1) { };
196
virtual bool setMouseControl(
197
Controller::Type xtype, int xid, Controller::Type ytype, int yid)
198
201
Returns the name of this controller.