Update CenterIn() and CenterOnScreen() methods in BWindow

* These methods now return the new point after centering.
* But more importantly CenterIn() does some new adjustments to keep the window
  position inside the screen edge. If you pass the screen frame into CenterIn()
  it skips these adjustments.
This commit is contained in:
John Scipione
2013-04-28 20:30:21 -04:00
parent 65e6ce6d53
commit 54153cc8b2
2 changed files with 46 additions and 7 deletions
+2 -2
View File
@@ -166,8 +166,8 @@ public:
void ResizeBy(float dx, float dy);
void ResizeTo(float width, float height);
void CenterIn(const BRect& rect);
void CenterOnScreen();
BPoint CenterIn(const BRect& rect);
BPoint CenterOnScreen();
virtual void Show();
virtual void Hide();