xref: /haiku/src/apps/resedit/ResWindow.cpp (revision fc1cf1a3d24bc28201c314c56be8d2816550f3f6)
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, B_WILL_DRAW, ref);
18 	AddChild(child);
19 
20 	SetTitle(child->Filename());
21 }
22 
23 
24 ResWindow::~ResWindow(void)
25 {
26 }
27 
28 
29 bool
30 ResWindow::QuitRequested(void)
31 {
32 	be_app->PostMessage(M_UNREGISTER_WINDOW);
33 	return true;
34 }
35 
36 
37