2004-06-26 06:15:48 +04:00
|
|
|
/*
|
2005-11-29 02:36:59 +03:00
|
|
|
* Copyright 2005, Haiku.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Axel Dörfler, axeld@pinc-software.de
|
|
|
|
*/
|
2005-07-07 00:19:22 +04:00
|
|
|
|
2004-06-26 06:15:48 +04:00
|
|
|
|
2005-11-29 02:36:59 +03:00
|
|
|
#include "RootLayer.h"
|
|
|
|
#include "Workspace.h"
|
|
|
|
#include "WindowLayer.h"
|
2004-07-10 14:54:20 +04:00
|
|
|
|
2005-11-29 02:36:59 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2004-06-26 06:15:48 +04:00
|
|
|
|
2004-07-10 14:54:20 +04:00
|
|
|
|
2005-11-29 02:36:59 +03:00
|
|
|
static RGBColor kDefaultColor = RGBColor(51, 102, 152);
|
2004-06-26 06:15:48 +04:00
|
|
|
|
2004-07-10 14:54:20 +04:00
|
|
|
|
2005-11-29 02:36:59 +03:00
|
|
|
Workspace::Workspace()
|
|
|
|
:
|
|
|
|
fWindows(20)
|
2004-06-26 06:15:48 +04:00
|
|
|
{
|
2005-11-29 02:36:59 +03:00
|
|
|
_SetDefaults();
|
2004-01-12 01:12:55 +03:00
|
|
|
}
|
2004-06-26 06:15:48 +04:00
|
|
|
|
2005-07-07 00:19:22 +04:00
|
|
|
|
2005-11-29 02:36:59 +03:00
|
|
|
Workspace::~Workspace()
|
2005-07-07 00:19:22 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2005-11-26 23:22:30 +03:00
|
|
|
|
2005-09-16 09:10:21 +04:00
|
|
|
void
|
2005-11-29 02:36:59 +03:00
|
|
|
Workspace::SetWindows(const BObjectList<WindowLayer>& windows)
|
2004-06-26 06:15:48 +04:00
|
|
|
{
|
2005-11-29 02:36:59 +03:00
|
|
|
fWindows.MakeEmpty();
|
|
|
|
fWindows.AddList((BObjectList<WindowLayer> *)&windows);
|
2004-01-12 01:12:55 +03:00
|
|
|
}
|
2004-06-26 06:15:48 +04:00
|
|
|
|
2005-07-07 00:19:22 +04:00
|
|
|
|
|
|
|
bool
|
2005-11-29 02:36:59 +03:00
|
|
|
Workspace::AddWindow(WindowLayer* window)
|
2004-06-26 06:15:48 +04:00
|
|
|
{
|
2005-11-29 02:36:59 +03:00
|
|
|
return fWindows.AddItem(window);
|
2004-01-12 01:12:55 +03:00
|
|
|
}
|
2004-06-26 06:15:48 +04:00
|
|
|
|
2004-07-10 14:54:20 +04:00
|
|
|
|
2005-07-07 00:19:22 +04:00
|
|
|
void
|
2005-11-29 02:36:59 +03:00
|
|
|
Workspace::RemoveWindow(WindowLayer* window)
|
2004-06-26 06:15:48 +04:00
|
|
|
{
|
2005-11-29 02:36:59 +03:00
|
|
|
fWindows.RemoveItem(window);
|
2004-01-12 01:12:55 +03:00
|
|
|
}
|
2004-06-26 06:15:48 +04:00
|
|
|
|
2004-07-10 14:54:20 +04:00
|
|
|
|
2005-07-07 00:19:22 +04:00
|
|
|
void
|
2005-11-29 02:36:59 +03:00
|
|
|
Workspace::SetDisplaysFromDesktop(Desktop* desktop)
|
2004-06-26 06:15:48 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2005-07-07 00:19:22 +04:00
|
|
|
|
|
|
|
void
|
2005-11-29 02:36:59 +03:00
|
|
|
Workspace::SetColor(const RGBColor& color)
|
2004-06-26 06:15:48 +04:00
|
|
|
{
|
2005-11-29 02:36:59 +03:00
|
|
|
fColor = color;
|
2004-01-12 01:12:55 +03:00
|
|
|
}
|
2004-06-26 06:15:48 +04:00
|
|
|
|
2005-07-07 00:19:22 +04:00
|
|
|
|
|
|
|
void
|
2005-11-29 02:36:59 +03:00
|
|
|
Workspace::SetSettings(BMessage& settings)
|
2005-02-28 23:23:51 +03:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-06-23 21:40:35 +04:00
|
|
|
void
|
2005-11-29 02:36:59 +03:00
|
|
|
Workspace::GetSettings(BMessage& settings)
|
2005-02-28 23:23:51 +03:00
|
|
|
{
|
2004-07-10 14:54:20 +04:00
|
|
|
}
|
|
|
|
|
2005-02-28 23:23:51 +03:00
|
|
|
|
2005-11-24 20:45:26 +03:00
|
|
|
void
|
2005-11-29 02:36:59 +03:00
|
|
|
Workspace::_SetDefaults()
|
2005-02-28 23:23:51 +03:00
|
|
|
{
|
2005-11-29 02:36:59 +03:00
|
|
|
fColor.SetColor(kDefaultColor);
|
2005-02-28 23:23:51 +03:00
|
|
|
}
|
|
|
|
|