| 301 | } |
| 302 | |
| 303 | PointDocument Editor::DocumentPointFromView(Point ptView) const { |
| 304 | PointDocument ptDocument(ptView); |
| 305 | if (wMargin.GetID()) { |
| 306 | const Point ptOrigin = GetVisibleOriginInMain(); |
| 307 | ptDocument.x += ptOrigin.x; |
| 308 | ptDocument.y += ptOrigin.y; |
| 309 | } else { |
| 310 | ptDocument.x += xOffset; |
| 311 | ptDocument.y += topLine * vs.lineHeight; |
| 312 | } |
| 313 | return ptDocument; |
| 314 | } |
| 315 | |
| 316 | Sci::Line Editor::TopLineOfMain() const { |
| 317 | if (wMargin.GetID()) |