MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / IsSelected

Method IsSelected

WinArk/HexControl.cpp:825–836  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

823}
824
825bool Selection::IsSelected(int64_t offset) const {
826 switch (_type) {
827 case SelectionType::Simple:
828
829 case SelectionType::Box:
830 if (offset < _offset)
831 return false;
832 return (offset - _offset) % _bytesPerLine < _width && (offset - _offset) / _bytesPerLine < _height;
833 }
834 ATLASSERT(false);
835 return false;
836}
837
838bool Selection::IsEmpty() const {
839 return _offset < 0 || _length == 0;

Callers 1

DoPaintMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected