xref: /haiku/headers/libs/print/libprint/DialogWindow.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
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 
12 class DialogWindow : public BWindow {
13 public:
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 
37 private:
38 	status_t           fPreviousResult; // holds the result as long as fResult == NULL
39 	volatile status_t *fResult;
40 };
41 
42 #endif
43