| 280 | } |
| 281 | |
| 282 | void LineEdit::OnMouseMove(const Point& pos) |
| 283 | { |
| 284 | if (mouse_selecting && !ignore_mouse_events) |
| 285 | { |
| 286 | if (pos.x < 0.0 || pos.x >= GetWidth()) |
| 287 | { |
| 288 | if (pos.x < 0.0) |
| 289 | mouse_moves_left = true; |
| 290 | else |
| 291 | mouse_moves_left = false; |
| 292 | |
| 293 | if (!readonly) |
| 294 | scroll_timer->Start(50, true); |
| 295 | } |
| 296 | else |
| 297 | { |
| 298 | scroll_timer->Stop(); |
| 299 | cursor_pos = GetCharacterIndex(pos.x); |
| 300 | SetSelectionLength(cursor_pos - selection_start); |
| 301 | Update(); |
| 302 | } |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | bool LineEdit::OnMouseDown(const Point& pos, int key) |
| 307 | { |