2 * Copyright 1999-2010, Be Incorporated. All Rights Reserved.
3 * This file may be used under the terms of the Be Sample Code License.
5 * OverlayImage is based on the code presented in this article:
6 * http://www.haiku-os.org/documents/dev/replishow_a_replicable_image_viewer
11 * Humdinger <humdingerb@gmail.com>
14 #include "OverlayView.h"
15 #include "OverlayWindow.h"
17 #include <Application.h>
22 #undef B_TRANSLATION_CONTEXT
23 #define B_TRANSLATION_CONTEXT "Main window"
26 OverlayWindow::OverlayWindow()
28 BWindow(BRect(50, 50, 500, 200), B_TRANSLATE_SYSTEM_NAME("OverlayImage"),
29 B_TITLED_WINDOW
, B_NOT_RESIZABLE
| B_NOT_ZOOMABLE
)
31 OverlayView
*replView
= new OverlayView(Bounds());
34 BView
*bgView
= new BView(Bounds(), "bgView", B_FOLLOW_ALL
, B_WILL_DRAW
);
35 bgView
->SetViewUIColor(B_PANEL_BACKGROUND_COLOR
);
41 OverlayWindow::QuitRequested()
43 be_app
->PostMessage(B_QUIT_REQUESTED
);