1 /* 2 * Copyright (c) 2005-2008, Haiku, Inc. 3 * Distributed under the terms of the MIT license. 4 * 5 * Authors: 6 * Axel Dörfler, axeld@pinc-software.de 7 */ 8 #ifndef WINDOW_LIST_H 9 #define WINDOW_LIST_H 10 11 12 #include <SupportDefs.h> 13 #include <Point.h> 14 15 16 class Window; 17 18 19 class WindowList { 20 public: 21 WindowList(int32 index = 0); 22 ~WindowList(); 23 24 void SetIndex(int32 index); 25 int32 Index() const { return fIndex; } 26 27 Window* FirstWindow() { return fFirstWindow; } 28 Window* LastWindow() { return fLastWindow; } 29 30 void AddWindow(Window* window, Window* before = NULL); 31 void RemoveWindow(Window* window); 32 33 bool HasWindow(Window* window) const; 34 35 private: 36 int32 fIndex; 37 Window* fFirstWindow; 38 Window* fLastWindow; 39 }; 40 41 enum window_lists { 42 kAllWindowList = 32, 43 kSubsetList, 44 kFocusList, 45 kWorkingList, 46 47 kListCount 48 }; 49 50 struct window_anchor { 51 window_anchor(); 52 53 Window* next; 54 Window* previous; 55 BPoint position; 56 }; 57 58 extern const BPoint kInvalidWindowPosition; 59 60 #endif // WINDOW_LIST_H 61