diff --git a/src/apps/3dmov/CubeView.cpp b/src/apps/3dmov/CubeView.cpp deleted file mode 100644 index 5adb75676b..0000000000 --- a/src/apps/3dmov/CubeView.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2004-2007, Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * François Revol - */ - -#include -#include -#include "CubeView.h" - -CubeView::CubeView(BRect frame) - : GLMovView(frame) -{ -} - -CubeView::~CubeView() -{ -} - -void -CubeView::AttachedToWindow() -{ - -} diff --git a/src/apps/3dmov/CubeView.h b/src/apps/3dmov/CubeView.h deleted file mode 100644 index 6fc4e95198..0000000000 --- a/src/apps/3dmov/CubeView.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2004-2007, Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * François Revol - */ -#ifndef _CUBEVIEW_H -#define _CUBEVIEW_H - -#include "GLMovView.h" - -class CubeView: public GLMovView -{ - public: - CubeView(BRect frame); - ~CubeView(); - virtual void AttachedToWindow(); - -}; - -#endif /* _CUBEVIEW_H */ diff --git a/src/apps/3dmov/GLMovApp.cpp b/src/apps/3dmov/GLMovApp.cpp deleted file mode 100644 index e9a8ee21a1..0000000000 --- a/src/apps/3dmov/GLMovApp.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2004-2007, Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * François Revol - */ - -#include -#include "GLMovApp.h" -#include "GLMovStrings.h" -#include "GLMovWindow.h" - -GLMovApp::GLMovApp() - : BApplication("application/x-vnd.Haiku-3DMov") -{ -} - -GLMovApp::~GLMovApp() -{ -} - -void -GLMovApp::ReadyToRun() -{ - GLMovWindow *win = GLMovWindow::MakeWindow(OBJ_CUBE); -} - -void GLMovApp::AboutRequested() -{ - BAlert *alert; - alert = new BAlert("about", STR_ABOUT_TEXT, STR_OK); - alert->Go(NULL); -} - -void GLMovApp::MessageReceived(BMessage *message) -{ -} - -int -main(int argc, char **argv) -{ - GLMovApp app; - app.Run(); - return 0; -} diff --git a/src/apps/3dmov/GLMovApp.h b/src/apps/3dmov/GLMovApp.h deleted file mode 100644 index 3e302a3592..0000000000 --- a/src/apps/3dmov/GLMovApp.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2004-2007, Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * François Revol - */ - -#ifndef _GLMOVAPP_H -#define _GLMOVAPP_H - -#include - -class GLMovApp: public BApplication -{ - public: - GLMovApp(); - ~GLMovApp(); - virtual void ReadyToRun(); - virtual void AboutRequested(); - virtual void MessageReceived(BMessage *message); - -}; - -#endif /* _GLMOVAPP_H */ diff --git a/src/apps/3dmov/GLMovMessages.h b/src/apps/3dmov/GLMovMessages.h deleted file mode 100644 index 2ee6307b8c..0000000000 --- a/src/apps/3dmov/GLMovMessages.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2004-2007, Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * François Revol - */ - -#ifndef _GLMOVMESSAGES_H -#define _GLMOVMESSAGES_H - -#define MSG_OBJ1 'Obj1' -#define MSG_OBJ2 'Obj2' -#define MSG_OBJ3 'Obj3' -#define MSG_OBJ4 'Obj4' -#define MSG_PAUSE 'Paus' - -#endif /* _GLMOVMESSAGES_H */ diff --git a/src/apps/3dmov/GLMovStrings.h b/src/apps/3dmov/GLMovStrings.h deleted file mode 100644 index 6f58dd0fe7..0000000000 --- a/src/apps/3dmov/GLMovStrings.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2004-2009, Haiku, Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * François Revol - */ - -#ifndef _GLMOVSTRINGS_H -#define _GLMOVSTRINGS_H - -#define STR_ABOUT_TEXT "3DMov reloaded.\n\n Demonstrates OpenGL and the Media Kit." -#define STR_OK "OK" - -#define STR_MENU "File" //not really related.... "Object" ? - -#define STR_CUBE "Cube" -#define STR_SPHERE "Sphere" -#define STR_PULSE "Pulse" -#define STR_BOOK "Book" - -#define STR_PAUSE "Pause" -#define STR_CLOSE "Close" -#define STR_ABOUT "About 3dMov" -#define STR_QUIT "Quit" - -#endif /* _GLMOVSTRINGS_H */ diff --git a/src/apps/3dmov/GLMovView.cpp b/src/apps/3dmov/GLMovView.cpp deleted file mode 100644 index fb90f633c7..0000000000 --- a/src/apps/3dmov/GLMovView.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2004-2007, Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * François Revol - */ - -#include -#include -#include "GLMovView.h" - -GLMovView::GLMovView(BRect frame) - : BGLView(frame, "glview", B_FOLLOW_ALL, B_WILL_DRAW, BGL_RGB|BGL_DOUBLE) -{ -} - -GLMovView::~GLMovView() -{ -} - -void -GLMovView::AttachedToWindow() -{ - -} - - -void -GLMovView::MouseDown(BPoint where) -{ - -} - - -void -GLMovView::MouseUp(BPoint where) -{ - -} - - -void -GLMovView::MouseMoved(BPoint where, uint32 code, const BMessage *a_message) -{ - -} - - -void -GLMovView::FileDropped(BPoint where, BMediaFile *file) -{ - -} diff --git a/src/apps/3dmov/GLMovView.h b/src/apps/3dmov/GLMovView.h deleted file mode 100644 index 75f308b6b4..0000000000 --- a/src/apps/3dmov/GLMovView.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2004-2007, Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * François Revol - */ - -#ifndef _GLMOVVIEW_H -#define _GLMOVVIEW_H - -#include -#include - -class GLMovView: public BGLView -{ - public: - GLMovView(BRect frame); - ~GLMovView(); - virtual void AttachedToWindow(); - - // for mouse control - virtual void MouseDown(BPoint where); - virtual void MouseUp(BPoint where); - virtual void MouseMoved(BPoint where, uint32 code, const BMessage *a_message); - - // - virtual void FileDropped(BPoint where, BMediaFile *file); -}; - -#endif /* _GLMOVVIEW_H */ diff --git a/src/apps/3dmov/GLMovWindow.cpp b/src/apps/3dmov/GLMovWindow.cpp deleted file mode 100644 index 58c5945fa5..0000000000 --- a/src/apps/3dmov/GLMovWindow.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2004-2007, Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * François Revol - */ - -#include -#include -#include -#include "GLMovStrings.h" -#include "GLMovMessages.h" -#include "GLMovWindow.h" -#include "GLMovView.h" -#include "CubeView.h" - -#include - -GLMovWindow::GLMovWindow(GLMovView *view, BRect frame, const char *title) - : BDirectWindow(frame, title, B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, 0) -{ - fGLView = view; -} - -GLMovWindow::~GLMovWindow() -{ -} - -bool -GLMovWindow::QuitRequested() -{ - be_app->Lock(); - if (be_app->CountWindows() < 2) - be_app_messenger.SendMessage(B_QUIT_REQUESTED); - be_app->Unlock(); - return true; -} - -void -GLMovWindow::MessageReceived(BMessage *message) -{ - switch (message->what) { - case MSG_OBJ1: - case MSG_OBJ2: - case MSG_OBJ3: - case MSG_OBJ4: - MakeWindow((object_type)(OBJ_CUBE + message->what - MSG_OBJ1)); - break; - case 'Paus': - break; - default: - BDirectWindow::MessageReceived(message); - } -} - -void -GLMovWindow::DirectConnected(direct_buffer_info *info) -{ - fGLView->DirectConnected(info); -} - - -GLMovWindow * -GLMovWindow::MakeWindow(object_type obj) -{ - GLMovWindow *win; - GLMovView *view; - BMenuBar *bar; - BMenu *menu; - BMenuItem *menuItem; - BRect frame(0, 0, 400-1, 400-1); - const char *title = "3dMov"; - - bar = new BMenuBar(frame, "menu", B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, B_ITEMS_IN_ROW, true); - menu = new BMenu(STR_MENU); - menu->AddItem(new BMenuItem(STR_CUBE, new BMessage(MSG_OBJ1), '1')); - menu->AddItem(new BMenuItem(STR_SPHERE, new BMessage(MSG_OBJ2), '2')); - menu->AddItem(new BMenuItem(STR_PULSE, new BMessage(MSG_OBJ3), '3')); - menu->AddItem(new BMenuItem(STR_BOOK, new BMessage(MSG_OBJ4), '4')); - menu->AddItem(new BSeparatorItem); - menu->AddItem((menuItem = new BMenuItem(STR_PAUSE, new BMessage(MSG_PAUSE), 'P'))); - menuItem->SetTarget(be_app_messenger); - menu->AddItem(new BMenuItem(STR_CLOSE, new BMessage(B_QUIT_REQUESTED), 'W')); - menu->AddItem(new BSeparatorItem); - menu->AddItem((menuItem = new BMenuItem(STR_ABOUT, new BMessage(B_ABOUT_REQUESTED)))); - menuItem->SetTarget(be_app_messenger); - menu->AddItem((menuItem = new BMenuItem(STR_QUIT, new BMessage(B_QUIT_REQUESTED), 'Q'))); - menuItem->SetTarget(be_app_messenger); - bar->AddItem(new BMenuItem(menu)); - bar->ResizeToPreferred(); - switch (obj) { - case OBJ_CUBE: - default: - view = new CubeView(frame.OffsetByCopy(0, bar->Bounds().Height()+1)); - title = STR_CUBE; - break; - case OBJ_SPHERE: - view = new GLMovView(frame.OffsetByCopy(0, bar->Bounds().Height()+1)); - title = STR_SPHERE; - break; - case OBJ_PULSE: - view = new GLMovView(frame.OffsetByCopy(0, bar->Bounds().Height()+1)); - title = STR_PULSE; - break; - case OBJ_BOOK: - frame = BRect(0, 0, 600-1, 400-1); - view = new GLMovView(frame.OffsetByCopy(0, bar->Bounds().Height()+1)); - title = STR_BOOK; - break; - } - view->SetViewColor(0,0,0); - frame.bottom += bar->Bounds().Height()+1; - frame.OffsetBySelf(50,50); - win = new GLMovWindow(view, frame, title); - win->AddChild(bar); - win->AddChild(view); - win->Show(); - return win; -} diff --git a/src/apps/3dmov/GLMovWindow.h b/src/apps/3dmov/GLMovWindow.h deleted file mode 100644 index 939ca7b258..0000000000 --- a/src/apps/3dmov/GLMovWindow.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2004-2007, Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * François Revol - */ -#ifndef _GLMOVWINDOW_H -#define _GLMOVWINDOW_H - -#include - -class GLMovView; - -enum object_type { - OBJ_CUBE, - OBJ_SPHERE, - OBJ_PULSE, - OBJ_BOOK, -}; - -class GLMovWindow: public BDirectWindow -{ - public: - GLMovWindow(GLMovView *view, BRect frame, const char *title); - ~GLMovWindow(); - virtual bool QuitRequested(); - virtual void MessageReceived(BMessage *message); - virtual void DirectConnected(direct_buffer_info *info); - static GLMovWindow *MakeWindow(object_type obj); - - private: - GLMovView *fGLView; -}; - -#endif /* _GLMOVWINDOW_H */