2010-05-07 04:47:10 -05:00
|
|
|
/*
|
2011-12-03 16:38:03 -06:00
|
|
|
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
|
2010-05-07 04:47:10 -05:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Andrea Anzani, andrea.anzani@gmail.com
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "WindowsManager.h"
|
|
|
|
|
|
|
|
WindowsManager* WindowsManager::fInstance = NULL;
|
|
|
|
|
2010-05-19 17:28:26 -05:00
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
WindowsManager::WindowsManager()
|
|
|
|
{
|
2012-03-19 15:43:18 -05:00
|
|
|
fCurrentPoint.Set(20.0f, 20.0f);
|
2010-05-07 04:47:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
WindowsManager*
|
|
|
|
WindowsManager::Get()
|
|
|
|
{
|
|
|
|
if (!fInstance)
|
|
|
|
fInstance = new WindowsManager();
|
|
|
|
|
|
|
|
return fInstance;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
WindowsManager::RelocateWindow(BWindow* window)
|
|
|
|
{
|
|
|
|
window->SetWorkspaces(B_CURRENT_WORKSPACE);
|
|
|
|
window->MoveTo(fCurrentPoint);
|
2012-03-19 15:43:18 -05:00
|
|
|
fCurrentPoint += BPoint(20.0f, 20.0f);
|
2010-05-07 04:47:10 -05:00
|
|
|
}
|