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 containsLine(const Int64& line) const;
    bool contains(const TextRange& range) const;
    bool hasSelection() const;
    bool inSameLine() const;
    std::string toString() const;
    static TextRange fromString(const std::string& range);
};