| 2309 | } |
| 2310 | |
| 2311 | AreaLine* TextareaData::ExtendSelectionFromPoint(unsigned int xPos, unsigned int yPos) |
| 2312 | { |
| 2313 | // Find cursor position |
| 2314 | AreaLine *curr = ClientToCursor(xPos, yPos, dragStartX, dragStartY, true); |
| 2315 | |
| 2316 | if(curr->length == 0) |
| 2317 | return curr; |
| 2318 | // Clamp horizontal position to line length |
| 2319 | if(dragStartX >= (int)curr->length && curr->length != 0) |
| 2320 | dragStartX = curr->length - 1; |
| 2321 | dragEndX = dragStartX; |
| 2322 | dragEndY = dragStartY; |
| 2323 | |
| 2324 | dragStartX = AdvanceCursor(curr, dragStartX, true); |
| 2325 | dragEndX = AdvanceCursor(curr, dragEndX, false) + 1; |
| 2326 | |
| 2327 | // Selection is active is the length of selected string is not 0 |
| 2328 | selectionOn = curr->length != 0; |
| 2329 | |
| 2330 | return curr; |
| 2331 | } |
| 2332 | |
| 2333 | void TextareaData::OnRightMouseDown(unsigned int x, unsigned int y) |
| 2334 | { |
nothing calls this directly
no test coverage detected