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-18 01:35:16 +04:00
|
|
|
status_t InitCheck();
|
2010-08-17 10:47:26 +04:00
|
|
|
|
2010-08-18 01:35:16 +04:00
|
|
|
status_t AddWindow(BWindow* window);
|
|
|
|
status_t AddWindow(BMessenger& window);
|
|
|
|
status_t AddWindowAt(BWindow* window, int32 position);
|
|
|
|
status_t AddWindowAt(BMessenger& window,
|
|
|
|
int32 position);
|
2010-08-17 10:47:26 +04:00
|
|
|
|
2010-08-18 01:35:16 +04:00
|
|
|
status_t RemoveWindow(BWindow* window);
|
|
|
|
status_t RemoveWindow(BMessenger& window);
|
|
|
|
status_t RemoveWindowAt(int32 position,
|
|
|
|
BMessenger* window = NULL);
|
2010-08-17 10:47:26 +04:00
|
|
|
|
2010-08-18 01:35:16 +04:00
|
|
|
int32 CountWindows();
|
2010-08-17 10:47:26 +04:00
|
|
|
|
2010-08-18 01:35:16 +04:00
|
|
|
status_t WindowAt(int32 position,
|
|
|
|
BMessenger& messenger);
|
|
|
|
bool HasWindow(BWindow* window);
|
|
|
|
bool HasWindow(BMessenger& window);
|
2010-08-17 10:47:26 +04:00
|
|
|
|
|
|
|
private:
|
2010-08-18 01:35:16 +04:00
|
|
|
status_t _AttachMessenger(BMessenger& window);
|
|
|
|
status_t _ReadMessenger(BMessenger& window);
|
|
|
|
status_t _StartMessage(int32 what);
|
2010-08-17 10:47:26 +04:00
|
|
|
|
2010-08-18 01:35:16 +04:00
|
|
|
BPrivate::PortLink* fLink;
|
2010-08-17 10:47:26 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|