class EE::UI::Doc::TextRange¶
#include <textrange.hpp> class TextRange { public: // construction TextRange(); TextRange(const TextPosition& start, const TextPosition& end); // methods bool isValid() const; void clear(); TextPosition& start(); TextPosition& end(); const TextPosition& start() const; const TextPosition& end() const; TextRange normalized() const; TextRange& normalize(); void reverse(); TextRange reversed() const; void setStart(const TextPosition& position); void setEnd(const TextPosition& position); void set(const TextPosition& start, const TextPosition& end); bool operator==(const TextRange& other) const; bool operator!=(const TextRange& other) const; bool operator<(const TextRange& other) const; bool operator>(const TextRange& other) const; bool operator<=(const TextRange& other) const; bool operator>=(const TextRange& other) const; TextRange operator+(const TextRange& other) const; TextRange operator+=(const TextRange& other) const; TextRange operator-(const TextRange& other) const; TextRange operator-=(const TextRange& other) const; bool contains(const TextPosition& position) const; bool intersectsLineRange(const TextRange& range) const; template <typename T> bool intersectsLineRange(T fromLine, T toLine) const; template <typename T> bool intersectsLineRange(const std::pair<T, T>& range) const; bool containsLine(const Int64& line) const; bool contains(const TextRange& range) const; bool hasSelection() const; bool inSameLine() const; Int64 height() const; Int64 length() const; std::string toString() const; bool isNormalized() const; static TextRange fromString(const std::string& range); };