Home | History | Annotate | Download | only in range

Lines Matching refs:range

29 // A Range contains two integer values that represent a numeric range, like the
30 // range of characters in a text selection. A range is made of a start and end
31 // position; when they are the same, the Range is akin to a caret. Note that
33 // range.
34 class GFX_EXPORT Range {
36 // Creates an empty range {0,0}.
37 Range();
39 // Initializes the range with a start and end.
40 Range(size_t start, size_t end);
42 // Initializes the range with the same start and end positions.
43 explicit Range(size_t position);
47 explicit Range(const NSRange& range);
50 // {0,-1} to indicate the whole range.
51 Range(const CHARRANGE& range, LONG total_length = -1);
54 // Returns a range that is invalid, which is {size_t_max,size_t_max}.
55 static const Range InvalidRange();
57 // Checks if the range is valid through comparision to InvalidRange().
80 bool operator==(const Range& other) const;
81 bool operator!=(const Range& other) const;
82 bool EqualsIgnoringDirection(const Range& other) const;
84 // Returns true if this range intersects the specified |range|.
85 bool Intersects(const Range& range) const;
87 // Returns true if this range contains the specified |range|.
88 bool Contains(const Range& range) const;
90 // Computes the intersection of this range with the given |range|.
92 // The returned range is always empty or forward (never reversed).
93 Range Intersect(const Range& range) const;
96 Range& operator=(const NSRange& range);
98 // NSRange does not store the directionality of a range, so if this
99 // is_reversed(), the range will get flipped when converted to an NSRange.
104 // GTK+ has no concept of a range.
113 GFX_EXPORT std::ostream& operator<<(std::ostream& os, const Range& range);