Remove old code.
authorCarl Hetherington <cth@carlh.net>
Fri, 27 Jul 2012 20:54:15 +0000 (21:54 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 27 Jul 2012 20:54:15 +0000 (21:54 +0100)
src/wx2/dvdomatic.cc [deleted file]
src/wx2/film_editor.cc [deleted file]
src/wx2/film_editor.h [deleted file]
src/wx2/film_viewer.cc [deleted file]
src/wx2/film_viewer.h [deleted file]
src/wx2/wscript [deleted file]

diff --git a/src/wx2/dvdomatic.cc b/src/wx2/dvdomatic.cc
deleted file mode 100644 (file)
index 44e51de..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <wx/wx.h>
-#include "lib/util.h"
-#include "lib/film.h"
-#include "film_viewer.h"
-#include "film_editor.h"
-
-enum {
-       ID_Quit = 1,
-};
-
-class Frame : public wxFrame
-{
-public:
-       Frame (wxString const & title, wxPoint const & pos, wxSize const & size)
-               : wxFrame (NULL, -1, title, pos, size)
-       {
-               wxMenuBar* bar = new wxMenuBar;
-               
-               wxMenu *menu_file = new wxMenu;
-               menu_file->Append (ID_Quit, _("&Quit"));
-
-               bar->Append (menu_file, _("&File"));
-
-               SetMenuBar (bar);
-
-               CreateStatusBar ();
-               SetStatusText (_("Welcome to DVD-o-matic!"));
-       }
-       
-       void OnQuit (wxCommandEvent& event)
-       {
-               Close (true);
-       }
-};
-
-class App : public wxApp
-{
-       bool OnInit ()
-       {
-               if (!wxApp::OnInit ()) {
-                       return false;
-               }
-
-               wxInitAllImageHandlers ();
-               
-               dvdomatic_setup ();
-
-               Film* film = new Film ("/home/carl/DCP/BitHarvest");
-               
-               Frame* frame = new Frame (_("DVD-o-matic"), wxPoint (50, 50), wxSize(450, 350));
-               frame->Show (true);
-               
-               frame->Connect (
-                       ID_Quit, wxEVT_COMMAND_MENU_SELECTED,
-                       (wxObjectEventFunction) &Frame::OnQuit
-                       );
-
-               FilmEditor* editor = new FilmEditor (film, frame);
-               editor->Show (true);
-               FilmViewer* viewer = new FilmViewer (film, frame);
-               viewer->load_thumbnail (22);
-
-               wxBoxSizer* main_sizer = new wxBoxSizer (wxHORIZONTAL);
-               main_sizer->Add (editor, 0, wxALL, 6);
-               main_sizer->Add (viewer->get_widget (), 1, wxEXPAND | wxALL, 6);
-               frame->SetSizer (main_sizer);
-
-//             frame->Add (viewer->get_widget ());
-
-               SetTopWindow (frame);
-               return true;
-       }
-};
-
-IMPLEMENT_APP (App)
-
diff --git a/src/wx2/film_editor.cc b/src/wx2/film_editor.cc
deleted file mode 100644 (file)
index b993278..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "film_editor.h"
-
-FilmEditor::FilmEditor (Film* f, wxFrame* p)
-       : wxPanel (p)
-       , _film (f)
-{
-       new wxButton (this, 0, wxT("FUCK"));
-}
diff --git a/src/wx2/film_editor.h b/src/wx2/film_editor.h
deleted file mode 100644 (file)
index d1278b8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <wx/wx.h>
-
-class Film;
-
-class FilmEditor : public wxPanel
-{
-public:
-       FilmEditor (Film* f, wxFrame *);
-
-private:
-       Film* _film;
-};
diff --git a/src/wx2/film_viewer.cc b/src/wx2/film_viewer.cc
deleted file mode 100644 (file)
index c2481ef..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#include <iostream>
-#include "lib/film.h"
-#include "film_viewer.h"
-
-using namespace std;
-
-class ThumbPanel : public wxPanel
-{
-public:
-       ThumbPanel (wxFrame* parent)
-               : wxPanel (parent)
-               , _bitmap (0)
-       {
-       }
-
-       void paint_event (wxPaintEvent& ev)
-       {
-               if (!_bitmap) {
-                       return;
-               }
-
-               cout << "RENDER\n";
-               
-               wxPaintDC dc (this);
-               dc.DrawBitmap (*_bitmap, 0, 0, false);
-       }
-
-       void set_bitmap (wxBitmap* bitmap)
-       {
-               _bitmap = bitmap;
-       }
-
-       DECLARE_EVENT_TABLE ();
-
-private:
-       wxBitmap* _bitmap;
-};
-
-BEGIN_EVENT_TABLE (ThumbPanel, wxPanel)
-EVT_PAINT (ThumbPanel::paint_event)
-END_EVENT_TABLE ()
-
-FilmViewer::FilmViewer (Film* f, wxFrame* p)
-       : _film (f)
-       , _image (0)
-       , _scaled_image (0)
-       , _bitmap (0)
-{
-       _thumb_panel = new ThumbPanel (p);
-       _thumb_panel->Show (true);
-       int x, y;
-       _thumb_panel->GetSize (&x, &y);
-       cout << x << " " << y << "\n";
-}
-
-void
-FilmViewer::load_thumbnail (int n)
-{
-       if (_film == 0 && _film->num_thumbs() <= n) {
-               return;
-       }
-
-       _image = new wxImage (wxString (_film->thumb_file(n).c_str (), wxConvUTF8));
-       _scaled_image = new wxImage (_image->Scale (512, 512));
-       _bitmap = new wxBitmap (*_scaled_image);
-       _thumb_panel->set_bitmap (_bitmap);
-}
-
-wxPanel *
-FilmViewer::get_widget ()
-{
-       return _thumb_panel;
-}
diff --git a/src/wx2/film_viewer.h b/src/wx2/film_viewer.h
deleted file mode 100644 (file)
index b0a6aab..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <wx/wx.h>
-
-class Film;
-class ThumbPanel;
-
-class FilmViewer
-{
-public:
-       FilmViewer (Film *, wxFrame *);
-
-       void load_thumbnail (int);
-       wxPanel* get_widget ();
-
-private:
-       Film* _film;
-
-       wxImage* _image;
-       wxImage* _scaled_image;
-       wxBitmap* _bitmap;
-       ThumbPanel* _thumb_panel;
-};
diff --git a/src/wx2/wscript b/src/wx2/wscript
deleted file mode 100644 (file)
index f8aa928..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-def configure(conf):
-    conf.check_cfg(package = '', path = 'wx-config', args = '--cppflags --cxxflags --libs', uselib_store = 'WXWIDGETS', mandatory = True)
-
-def build(bld):
-    obj = bld(features = 'cxx cxxprogram')
-    obj.name   = 'dvdomatic-wx'
-    obj.includes = [ '..' ]
-    obj.export_includes = ['.']
-    obj.uselib = 'WXWIDGETS'
-    obj.use = 'dvdomatic'
-    obj.source = """
-                 dvdomatic.cc
-                 film_viewer.cc
-                 film_editor.cc
-                """
-    obj.target = 'dvdomatic-wx'