1 /* 2 * Copyright (c) 2007, Haiku, Inc. 3 * Distributed under the terms of the MIT license. 4 * 5 * Author: 6 * Łukasz 'Sil2100' Zemczak <sil2100@vexillium.org> 7 */ 8 9 10 #include "PackageWindow.h" 11 12 #include <Application.h> 13 14 #include <GroupLayout.h> 15 16 // Macro reserved for later localization 17 #define T(x) x 18 19 20 PackageWindow::PackageWindow(const entry_ref *ref) 21 : BWindow(BRect(100, 100, 600, 300), T("Package Installer"), B_TITLED_WINDOW, 22 B_NOT_ZOOMABLE | B_NOT_RESIZABLE) 23 { 24 //SetLayout(new BGroupLayout(B_HORIZONTAL)); 25 26 fBackground = new PackageView(Bounds(), ref); 27 AddChild(fBackground); 28 29 ResizeTo(Bounds().Width(), fBackground->Bounds().Height()); 30 } 31 32 33 PackageWindow::~PackageWindow() 34 { 35 RemoveChild(fBackground); 36 37 delete fBackground; 38 } 39 40 41 void 42 PackageWindow::Quit() 43 { 44 be_app->PostMessage(P_WINDOW_QUIT); 45 BWindow::Quit(); 46 } 47 48