Files
haiku-beta6/src/servers/app/Workspace.h
T
Axel Dörfler 91d6453948 * Added a new Workspace::GetPreviousWindow() method to allow traversing the window
list in the other direction.
* Since WorkspacesLayer now cuts out the current window from the clipping region,
  the window order was upside down; it now uses the new Workspace::GetPreviousWindow().
  This fixes bug #1105.
* WorkspacesLayer::MouseDown() now also uses GetPreviousWindow() which prevents it
  from needing to scan the whole window list for the top window at every click.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-13 16:53:19 +00:00

44 lines
838 B
C++

/*
* Copyright 2005-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Axel Dörfler, [email protected]
*/
#ifndef WORKSPACE_H
#define WORKSPACE_H
#include <SupportDefs.h>
class Desktop;
class RGBColor;
class WindowLayer;
class Workspace {
public:
Workspace(Desktop& desktop, int32 index);
~Workspace();
const RGBColor& Color() const;
void SetColor(const RGBColor& color, bool makeDefault);
bool IsCurrent() const
{ return fCurrentWorkspace; }
status_t GetNextWindow(WindowLayer*& _window, BPoint& _leftTop);
status_t GetPreviousWindow(WindowLayer*& _window, BPoint& _leftTop);
void RewindWindows();
class Private;
private:
Workspace::Private& fWorkspace;
Desktop& fDesktop;
WindowLayer* fCurrent;
bool fCurrentWorkspace;
};
#endif /* WORKSPACE_H */