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