| 28 | /// Position of a character in the text currently being edited. |
| 29 | /// </summary> |
| 30 | struct text_pos |
| 31 | { |
| 32 | size_t line, column; |
| 33 | |
| 34 | text_pos() : line(0), column(0) {} |
| 35 | text_pos(size_t line, size_t column = 0) : line(line), column(column) {} |
| 36 | |
| 37 | bool operator==(const text_pos &o) const { return line == o.line && column == o.column; } |
| 38 | bool operator!=(const text_pos &o) const { return line != o.line || column != o.column; } |
| 39 | bool operator< (const text_pos &o) const { return line != o.line ? line < o.line : column < o.column; } |
| 40 | bool operator<=(const text_pos &o) const { return line != o.line ? line < o.line : column <= o.column; } |
| 41 | bool operator> (const text_pos &o) const { return line != o.line ? line > o.line : column > o.column; } |
| 42 | bool operator>=(const text_pos &o) const { return line != o.line ? line > o.line : column >= o.column; } |
| 43 | }; |
| 44 | |
| 45 | enum color |
| 46 | { |
no outgoing calls
no test coverage detected