2005-12-08 15:41:19 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2005, Haiku, Inc.
|
|
|
|
* Distributed under the terms of the MIT license.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Axel Dörfler, axeld@pinc-software.de
|
|
|
|
*/
|
|
|
|
#ifndef WINDOW_LIST_H
|
|
|
|
#define WINDOW_LIST_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
#include <Point.h>
|
|
|
|
|
|
|
|
|
|
|
|
class WindowLayer;
|
|
|
|
|
|
|
|
|
|
|
|
class WindowList {
|
|
|
|
public:
|
|
|
|
WindowList(int32 index = 0);
|
|
|
|
~WindowList();
|
|
|
|
|
|
|
|
void SetIndex(int32 index);
|
|
|
|
int32 Index() const { return fIndex; }
|
|
|
|
|
|
|
|
WindowLayer* FirstWindow() { return fFirstWindow; }
|
|
|
|
WindowLayer* LastWindow() { return fLastWindow; }
|
|
|
|
|
|
|
|
void AddWindow(WindowLayer* window, WindowLayer* before = NULL);
|
|
|
|
void RemoveWindow(WindowLayer* window);
|
|
|
|
|
2005-12-09 16:17:43 +03:00
|
|
|
bool HasWindow(WindowLayer* window) const;
|
|
|
|
|
2005-12-08 15:41:19 +03:00
|
|
|
private:
|
|
|
|
int32 fIndex;
|
|
|
|
WindowLayer* fFirstWindow;
|
|
|
|
WindowLayer* fLastWindow;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum window_lists {
|
|
|
|
kAllWindowList = 32,
|
2005-12-09 16:17:43 +03:00
|
|
|
kSubsetList,
|
2005-12-08 15:41:19 +03:00
|
|
|
kWorkingList,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct window_anchor {
|
|
|
|
window_anchor();
|
|
|
|
|
|
|
|
WindowLayer* next;
|
|
|
|
WindowLayer* previous;
|
|
|
|
BPoint position;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const BPoint kInvalidWindowPosition;
|
|
|
|
|
|
|
|
#endif // WINDOW_LIST_H
|