Many UI improvements and minor fixes

This commit is contained in:
Eduardo Bart
2013-01-08 18:01:47 -02:00
parent a8d3bb97ea
commit 5344a179a4
16 changed files with 152 additions and 65 deletions

View File

@@ -284,6 +284,27 @@ public:
moveTop(r.top());
}
void alignIn(const TRect<T> &r, Fw::AlignmentFlag align) {
if(align == Fw::AlignTopLeft)
moveTopLeft(r.topLeft());
else if(align == Fw::AlignTopRight)
moveTopRight(r.topRight());
else if(align == Fw::AlignTopCenter)
moveTopCenter(r.topCenter());
else if(align == Fw::AlignBottomLeft)
moveBottomLeft(r.bottomLeft());
else if(align == Fw::AlignBottomRight)
moveBottomRight(r.bottomRight());
else if(align == Fw::AlignBottomCenter)
moveBottomCenter(r.bottomCenter());
else if(align == Fw::AlignLeftCenter)
moveCenterLeft(r.centerLeft());
else if(align == Fw::AlignCenter)
moveCenter(r.center());
else if(align == Fw::AlignRightCenter)
moveCenterRight(r.centerRight());
}
TRect<T>& operator=(const TRect<T>& other) { x1 = other.x1; y1 = other.y1; x2 = other.x2; y2 = other.y2; return *this; }
bool operator==(const TRect<T>& other) const { return (x1 == other.x1 && y1 == other.y1 && x2 == other.x2 && y2 == other.y2); }
bool operator!=(const TRect<T>& other) const { return (x1 != other.x1 || y1 != other.y1 || x2 != other.x2 || y2 != other.y2); }