33 TRect(T
const& _left, T
const& _top, T
const& _right, T
const& _bottom) :
98 return ((left == _obj.
left) && (top == _obj.
top) && (right == _obj.
right) && (bottom == _obj.
bottom));
103 return !((left == _obj.
left) && (top == _obj.
top) && (right == _obj.
right) && (bottom == _obj.
bottom));
118 left = top = right = bottom = 0;
121 void set(T
const& _left, T
const& _top, T
const& _right, T
const& _bottom)
138 return ((left == 0) && (top == 0) && (right == 0) && (bottom == 0));
143 return ((_value.
left >= left) && (_value.
right <= right) && (_value.
top >= top) && (_value.
bottom <= bottom));
148 return ((_value.
left <= right) && (_value.
right >= left) && (_value.
top <= bottom) && (_value.
bottom >= top));
153 return ((_value.
left >= left) && (_value.
left <= right) && (_value.
top >= top) && (_value.
top <= bottom));
158 std::ostringstream stream;
166 std::istringstream stream(_value);
174 int item = stream.get();
177 if (item !=
' ' && item !=
'\t')
185 friend std::ostream& operator << (std::ostream& _stream, const TRect<T>& _value)
187 _stream << _value.
left <<
" " << _value.top <<
" " << _value.right <<
" " << _value.bottom;
204 #endif // MYGUI_TRECT_H_
TRect & operator-=(TRect const &_obj)
bool inside(const TRect< T > &_value) const
std::string print() const
bool operator==(TRect const &_obj) const
TRect & operator=(TRect const &_obj)
static TRect< T > parse(const std::string &_value)
TRect(T const &_left, T const &_top, T const &_right, T const &_bottom)
friend std::istream & operator>>(std::istream &_stream, TRect< T > &_value)
TRect operator-(TRect const &_obj) const
TRect operator+(TRect const &_obj) const
TRect & operator+=(TRect const &_obj)
bool operator!=(TRect const &_obj) const
bool inside(const TPoint< T > &_value) const
bool intersect(const TRect< T > &_value) const