1 /*
2 * Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 * Axel Dörfler, axeld@pinc-software.de
7 */
8
9
10 #include "PowerStatusWindow.h"
11 #include "PowerStatusView.h"
12
13 #include <Application.h>
14 #include <Catalog.h>
15
16
PowerStatusWindow()17 PowerStatusWindow::PowerStatusWindow()
18 :
19 BWindow(BRect(100, 150, 281, 299), B_TRANSLATE_SYSTEM_NAME("PowerStatus"),
20 B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS)
21 {
22 BView* topView = new BView(Bounds(), NULL, B_FOLLOW_ALL, B_WILL_DRAW);
23 topView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
24 AddChild(topView);
25
26 topView->AddChild(new PowerStatusReplicant(Bounds(), B_FOLLOW_ALL));
27 }
28
29
~PowerStatusWindow()30 PowerStatusWindow::~PowerStatusWindow()
31 {
32 }
33
34
35 bool
QuitRequested()36 PowerStatusWindow::QuitRequested()
37 {
38 be_app->PostMessage(B_QUIT_REQUESTED);
39 return true;
40 }
41