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