1/*
2 * DialogWindow.h
3 * Copyright 2004 Michael Pfeiffer. All Rights Reserved.
4 */
5
6#ifndef __DIALOG_WINDOW_H
7#define __DIALOG_WINDOW_H
8
9#include <OS.h>
10#include <Window.h>
11
12class DialogWindow : public BWindow {
13public:
14	DialogWindow(BRect frame,
15			const char *title,
16			window_type type,
17			uint32 flags,
18			uint32 workspace = B_CURRENT_WORKSPACE);
19
20	DialogWindow(BRect frame,
21			const char *title,
22			window_look look,
23			window_feel feel,
24			uint32 flags,
25			uint32 workspace = B_CURRENT_WORKSPACE);
26
27	status_t Go();
28
29	void SetResult(status_t result);
30
31	void MessageReceived(BMessage* msg);
32
33	enum {
34		kGetThreadId = 'dwti' // request thread id from window
35	};
36
37private:
38	status_t           fPreviousResult; // holds the result as long as fResult == NULL
39	volatile status_t *fResult;
40};
41
42#endif
43