2010-08-17 10:47:26 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2010, Haiku, Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef WINDOW_STACK_H
|
|
|
|
#define WINDOW_STACK_H
|
|
|
|
|
2010-08-18 01:35:16 +04:00
|
|
|
|
2010-08-17 10:47:26 +04:00
|
|
|
#include <Window.h>
|
|
|
|
|
|
|
|
|
2010-08-18 01:35:16 +04:00
|
|
|
class BWindowStack {
|
2010-08-17 10:47:26 +04:00
|
|
|
public:
|
2010-08-18 01:35:16 +04:00
|
|
|
BWindowStack(BWindow* window);
|
|
|
|
~BWindowStack();
|
2010-08-17 10:47:26 +04:00
|
|
|
|
2010-08-20 08:34:18 +04:00
|
|
|
status_t AddWindow(const BWindow* window);
|
|
|
|
status_t AddWindow(const BMessenger& window);
|
|
|
|
status_t AddWindowAt(const BWindow* window,
|
2010-08-18 02:54:00 +04:00
|
|
|
int32 position);
|
2010-08-20 08:34:18 +04:00
|
|
|
status_t AddWindowAt(const BMessenger& window,
|
2010-08-18 01:35:16 +04:00
|
|
|
int32 position);
|
2010-08-17 10:47:26 +04:00
|
|
|
|
2010-08-20 08:34:18 +04:00
|
|
|
status_t RemoveWindow(const BWindow* window);
|
|
|
|
status_t RemoveWindow(const BMessenger& window);
|
|
|
|
status_t RemoveWindowAt(int32 position,
|
2010-08-18 01:35:16 +04:00
|
|
|
BMessenger* window = NULL);
|
2010-08-17 10:47:26 +04:00
|
|
|
|
2010-08-20 08:34:18 +04:00
|
|
|
int32 CountWindows();
|
2010-08-17 10:47:26 +04:00
|
|
|
|
2010-08-20 08:34:18 +04:00
|
|
|
status_t WindowAt(int32 position,
|
|
|
|
BMessenger& messenger);
|
|
|
|
bool HasWindow(const BWindow* window);
|
|
|
|
bool HasWindow(const BMessenger& window);
|
2010-08-17 10:47:26 +04:00
|
|
|
|
|
|
|
private:
|
2010-08-20 08:34:18 +04:00
|
|
|
status_t _AttachMessenger(const BMessenger& window);
|
|
|
|
status_t _ReadMessenger(BMessenger& window);
|
|
|
|
status_t _StartMessage(int32 what);
|
2010-08-17 10:47:26 +04:00
|
|
|
|
2010-08-20 08:34:18 +04:00
|
|
|
BPrivate::PortLink* fLink;
|
2010-08-17 10:47:26 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|