1/* 2 * Copyright 1999-2010, Be Incorporated. All Rights Reserved. 3 * This file may be used under the terms of the Be Sample Code License. 4 * 5 * OverlayImage is based on the code presented in this article: 6 * http://www.haiku-os.org/documents/dev/replishow_a_replicable_image_viewer 7 * 8 * Authors: 9 * Seth Flexman 10 * Hartmuth Reh 11 * Humdinger <humdingerb@gmail.com> 12 */ 13 14#include "OverlayWindow.h" 15#include "OverlayView.h" 16 17#include <Application.h> 18#include <Catalog.h> 19#include <Locale.h> 20#include <String.h> 21 22#undef B_TRANSLATION_CONTEXT 23#define B_TRANSLATION_CONTEXT "Main window" 24 25 26OverlayWindow::OverlayWindow() 27 : 28 BWindow(BRect(50, 50, 500, 200), B_TRANSLATE_SYSTEM_NAME("OverlayImage"), B_TITLED_WINDOW, 29 B_NOT_RESIZABLE | B_NOT_ZOOMABLE) 30{ 31 OverlayView* replView = new OverlayView(Bounds()); 32 AddChild(replView); 33 34 BView* bgView = new BView(Bounds(), "bgView", B_FOLLOW_ALL, B_WILL_DRAW); 35 bgView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR); 36 AddChild(bgView); 37} 38 39 40bool 41OverlayWindow::QuitRequested() 42{ 43 be_app->PostMessage(B_QUIT_REQUESTED); 44 return true; 45} 46