xref: /haiku/src/apps/resedit/ResWindow.cpp (revision a381c8a06378de22ff08adf4282b4e3f7e50d250)
1 /*
2  * Copyright (c) 2005-2006, Haiku, Inc.
3  * Distributed under the terms of the MIT license.
4  *
5  * Author:
6  *		DarkWyrm <darkwyrm@earthlink.net>
7  */
8 #include "ResWindow.h"
9 #include "ResView.h"
10 #include "App.h"
11 
12 ResWindow::ResWindow(const BRect &rect, const entry_ref *ref)
13  :	BWindow(rect,"", B_DOCUMENT_WINDOW, B_ASYNCHRONOUS_CONTROLS)
14 {
15 	be_app->PostMessage(M_REGISTER_WINDOW);
16 
17 	ResView *child = new ResView(Bounds(), "resview", B_FOLLOW_ALL,
18 		B_WILL_DRAW, ref);
19 	AddChild(child);
20 
21 	SetTitle(child->Filename());
22 
23 	Show();
24 }
25 
26 
27 ResWindow::~ResWindow(void)
28 {
29 }
30 
31 
32 bool
33 ResWindow::QuitRequested(void)
34 {
35 	be_app->PostMessage(M_UNREGISTER_WINDOW);
36 	return true;
37 }
38 
39 
40