| 202 | } |
| 203 | |
| 204 | void CPointerAction::ProcessMotion (float dxSensor, float dySensor) |
| 205 | { |
| 206 | if (!m_enabled) return; |
| 207 | |
| 208 | // Do move. |
| 209 | int dxPix, dyPix; |
| 210 | m_pMouseControl->MovePointerRel (dxSensor, dySensor, &dxPix, &dyPix); |
| 211 | |
| 212 | // Get current pointer location |
| 213 | int xCurr, yCurr; |
| 214 | m_pMouseControl->GetPointerLocation (xCurr, yCurr); |
| 215 | |
| 216 | mousecmd::mousecmd cmd= mousecmd::CMD_NO_CLICK; |
| 217 | |
| 218 | switch (m_clickMode) { |
| 219 | case CPointerAction::DWELL: |
| 220 | // DWell click |
| 221 | cmd= m_pDwellClick->ProcessMotion |
| 222 | (dxPix, dyPix, xCurr, yCurr); |
| 223 | break; |
| 224 | case CPointerAction::GESTURE: |
| 225 | // Gesture click |
| 226 | cmd= m_pGestureClick->ProcessMotion |
| 227 | (dxPix, dyPix, xCurr, yCurr); |
| 228 | break; |
| 229 | case CPointerAction::NONE: |
| 230 | // Do nothing |
| 231 | break; |
| 232 | default: |
| 233 | assert (false); |
| 234 | } |
| 235 | |
| 236 | if (cmd!= mousecmd::CMD_NO_CLICK && m_beepOnClick) { |
| 237 | if (cmd== mousecmd::CMD_LEFT_DOWN) |
| 238 | m_pLeftUpClickSound->Play (wxSOUND_ASYNC); |
| 239 | else |
| 240 | m_pClickSound->Play (wxSOUND_ASYNC); |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | void CPointerAction::SetEnabled(bool value) |
| 245 | { |
nothing calls this directly
no test coverage detected