summaryrefslogtreecommitdiff
path: root/frontends/beos/WindowStack.h
blob: 947b14360ed08eb03691e8bff98127845c0927f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * Copyright 2010, Haiku, Inc. All rights reserved.
 * Distributed under the terms of the MIT License.
 */
#ifndef WINDOW_STACK_H
#define WINDOW_STACK_H


#include <Window.h>


class BWindowStack {
public:
								BWindowStack(BWindow* window);
								~BWindowStack();

			status_t			AddWindow(const BWindow* window);
			status_t			AddWindow(const BMessenger& window);
			status_t			AddWindowAt(const BWindow* window,
									int32 position);
			status_t			AddWindowAt(const BMessenger& window,
									int32 position);

			status_t			RemoveWindow(const BWindow* window);
			status_t			RemoveWindow(const BMessenger& window);
			status_t			RemoveWindowAt(int32 position,
									BMessenger* window = NULL);

			int32				CountWindows();

			status_t			WindowAt(int32 position,
								BMessenger& messenger);
			bool				HasWindow(const BWindow* window);
			bool				HasWindow(const BMessenger& window);

private:
			status_t			_AttachMessenger(const BMessenger& window);
			status_t			_ReadMessenger(BMessenger& window);
			status_t			_StartMessage(int32 what);

			BPrivate::PortLink*	fLink;
};


#endif