repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / haiku3d / MainWindow.cpp
bloba1a63159f28fe09974a061fb35e3f6e5090ac5f3
1 /*
2 * Copyright 2009, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Alexandre Deckner <alex@zappotek.com>
7 */
9 #include "MainWindow.h"
10 #include "RenderView.h"
12 #include <Application.h>
13 #include <MenuBar.h>
14 #include <MenuItem.h>
16 #include <stdio.h>
18 MainWindow::MainWindow(BRect frame, const char* title)
20 BDirectWindow(frame, title, B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, 0)
22 fRenderView = new RenderView(Bounds());
23 fRenderView->SetViewColor(0, 0, 0);
25 AddChild(fRenderView);
26 Show();
30 MainWindow::~MainWindow()
35 bool
36 MainWindow::QuitRequested()
38 be_app->PostMessage(B_QUIT_REQUESTED);
39 return true;
43 void
44 MainWindow::MessageReceived(BMessage* message)
46 switch (message->what) {
47 default:
48 BDirectWindow::MessageReceived(message);
53 void
54 MainWindow::DirectConnected(direct_buffer_info* info)
56 fRenderView->DirectConnected(info);