1 /* 2 * Copyright 2009, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Alexandre Deckner <alex@zappotek.com> 7 */ 8 9 #include <Alert.h> 10 11 #include "App.h" 12 #include "MainWindow.h" 13 14 15 App::App() 16 : 17 BApplication("application/x-vnd.Haiku-Haiku3d"), 18 fMainWindow(NULL) 19 { 20 } 21 22 23 App::~App() 24 { 25 } 26 27 28 void 29 App::ReadyToRun() 30 { 31 BRect frame(50, 50, 640 + 50, 480 + 50); 32 const char* title = "Haiku3d"; 33 fMainWindow = new MainWindow(frame, title); 34 fMainWindow->Show(); 35 } 36 37 38 void 39 App::AboutRequested() 40 { 41 BAlert* alert; 42 alert = new BAlert("About", "A little 3D demo", "OK"); 43 alert->Go(NULL); 44 } 45 46 47 bool 48 App::QuitRequested() 49 { 50 return true; 51 } 52 53 54 int 55 main(int argc, char** argv) 56 { 57 App app; 58 app.Run(); 59 return 0; 60 } 61