22 #ifndef __MYGUI_I_CROPPED_RECTANGLE_H__
23 #define __MYGUI_I_CROPPED_RECTANGLE_H__
44 return mCroppedParent;
50 mCoord.left = _value.
left;
51 mCoord.top = _value.
top;
56 mCoord.width = _value.
width;
57 mCoord.height = _value.
height;
68 return mCoord.point();
84 return mAbsolutePosition;
89 return IntRect(mAbsolutePosition.left, mAbsolutePosition.top, mAbsolutePosition.left + mCoord.width, mAbsolutePosition.top + mCoord.height);
94 return IntCoord(mAbsolutePosition.left, mAbsolutePosition.top, mCoord.width, mCoord.height);
100 return mAbsolutePosition.left;
105 return mAbsolutePosition.top;
116 return mCoord.right();
126 return mCoord.bottom();
136 return mCoord.height;
150 return mCoord.left + mMargin.left;
154 return mCoord.right() - mMargin.right;
158 return mCoord.top + mMargin.top;
162 return mCoord.bottom() - mMargin.bottom;
166 return mCoord.width - mMargin.left - mMargin.right;
170 return mCoord.height - mMargin.top - mMargin.bottom;
175 mCroppedParent = _parent;
188 return mMargin.right;
196 return mMargin.bottom;
204 if (getLeft() < mCroppedParent->mMargin.left)
206 mMargin.left = mCroppedParent->mMargin.left - getLeft();
215 if (getRight() > mCroppedParent->getWidth() - mCroppedParent->mMargin.right)
217 mMargin.right = getRight() - (mCroppedParent->getWidth() - mCroppedParent->mMargin.right);
226 if (getTop() < mCroppedParent->mMargin.top)
228 mMargin.top = mCroppedParent->mMargin.top - getTop();
237 if (getBottom() > mCroppedParent->getHeight() - mCroppedParent->mMargin.bottom)
239 mMargin.bottom = getBottom() - (mCroppedParent->getHeight() - mCroppedParent->mMargin.bottom);
252 return ( (getRight() < mCroppedParent->mMargin.left ) ||
253 (getLeft() > mCroppedParent->getWidth() - mCroppedParent->mMargin.right ) ||
254 (getBottom() < mCroppedParent->mMargin.top ) ||
255 (getTop() > mCroppedParent->getHeight() - mCroppedParent->mMargin.bottom ) );
269 #endif // __MYGUI_I_CROPPED_RECTANGLE_H__
int getAbsoluteLeft() const
virtual void setSize(const IntSize &_value)
types::TRect< int > IntRect
virtual ~ICroppedRectangle()
const IntCoord & getCoord() const
int _getViewHeight() const
int _getMarginRight() const
int _getMarginLeft() const
IntPoint mAbsolutePosition
ICroppedRectangle * mCroppedParent
int getAbsoluteTop() const
int _getMarginBottom() const
const IntRect & _getMargin() const
types::TCoord< int > IntCoord
IntRect getAbsoluteRect() const
ICroppedRectangle * getCroppedParent()
void _setCroppedParent(ICroppedRectangle *_parent)
virtual void setCoord(const IntCoord &_value)
int _getMarginTop() const
const IntPoint & getAbsolutePosition() const
int _getViewWidth() const
bool _checkOutside() const
int _getViewBottom() const
IntCoord getAbsoluteCoord() const
IntPoint getPosition() const
int _getViewRight() const
virtual void setPosition(const IntPoint &_value)