| 263 | } |
| 264 | |
| 265 | void TextEdit::OnMouseMove(const Point& pos) |
| 266 | { |
| 267 | if (mouse_selecting && !ignore_mouse_events) |
| 268 | { |
| 269 | if (pos.x < 0.0 || pos.x > GetWidth()) |
| 270 | { |
| 271 | if (pos.x < 0.0) |
| 272 | mouse_moves_left = true; |
| 273 | else |
| 274 | mouse_moves_left = false; |
| 275 | |
| 276 | if (!readonly) |
| 277 | scroll_timer->Start(50, true); |
| 278 | } |
| 279 | else |
| 280 | { |
| 281 | scroll_timer->Stop(); |
| 282 | cursor_pos = GetCharacterIndex(pos); |
| 283 | selection_length = ToOffset(cursor_pos) - ToOffset(selection_start); |
| 284 | Update(); |
| 285 | } |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | bool TextEdit::OnMouseDown(const Point& pos, int key) |
| 290 | { |
no test coverage detected