inSelection method
Implementation
bool inSelection(Selection selection) {
if (selection.start.path <= selection.end.path) {
return selection.start.path <= path && path <= selection.end.path;
} else {
return selection.end.path <= path && path <= selection.start.path;
}
}