2005-12-08 15:41:19 +03:00
|
|
|
/*
|
2008-03-04 15:47:34 +03:00
|
|
|
* Copyright (c) 2005-2008, Haiku, Inc.
|
2005-12-08 15:41:19 +03:00
|
|
|
* 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>
|
|
|
|
|
|
|
|
|
2008-03-08 15:45:54 +03:00
|
|
|
class Window;
|
2005-12-08 15:41:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
class WindowList {
|
2008-03-08 15:45:54 +03:00
|
|
|
public:
|
|
|
|
WindowList(int32 index = 0);
|
|
|
|
~WindowList();
|
|
|
|
|
|
|
|
void SetIndex(int32 index);
|
|
|
|
int32 Index() const { return fIndex; }
|
|
|
|
|
|
|
|
Window* FirstWindow() { return fFirstWindow; }
|
|
|
|
Window* LastWindow() { return fLastWindow; }
|
|
|
|
|
|
|
|
void AddWindow(Window* window, Window* before = NULL);
|
|
|
|
void RemoveWindow(Window* window);
|
|
|
|
|
|
|
|
bool HasWindow(Window* window) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
int32 fIndex;
|
|
|
|
Window* fFirstWindow;
|
|
|
|
Window* fLastWindow;
|
2005-12-08 15:41:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
enum window_lists {
|
|
|
|
kAllWindowList = 32,
|
2005-12-09 16:17:43 +03:00
|
|
|
kSubsetList,
|
2008-03-04 15:47:34 +03:00
|
|
|
kFocusList,
|
2005-12-08 15:41:19 +03:00
|
|
|
kWorkingList,
|
2005-12-09 17:06:30 +03:00
|
|
|
|
|
|
|
kListCount
|
2005-12-08 15:41:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct window_anchor {
|
|
|
|
window_anchor();
|
|
|
|
|
2008-03-08 15:45:54 +03:00
|
|
|
Window* next;
|
|
|
|
Window* previous;
|
|
|
|
BPoint position;
|
2005-12-08 15:41:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
extern const BPoint kInvalidWindowPosition;
|
|
|
|
|
|
|
|
#endif // WINDOW_LIST_H
|