summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-27 21:54:15 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-27 21:54:15 +0100
commit423928e4a0c9294f7e7da30030f00e3fc09cdf14 (patch)
tree90c60c392fcefd35b72357e6048b7f1814e97f9b /src
parent5b9935f5d7ac8df186e5abd0c2ff1ec5759a8a92 (diff)
Remove old code.
Diffstat (limited to 'src')
-rw-r--r--src/wx2/dvdomatic.cc76
-rw-r--r--src/wx2/film_editor.cc8
-rw-r--r--src/wx2/film_editor.h12
-rw-r--r--src/wx2/film_viewer.cc73
-rw-r--r--src/wx2/film_viewer.h21
-rw-r--r--src/wx2/wscript16
6 files changed, 0 insertions, 206 deletions
diff --git a/src/wx2/dvdomatic.cc b/src/wx2/dvdomatic.cc
deleted file mode 100644
index 44e51de09..000000000
--- a/src/wx2/dvdomatic.cc
+++ /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
index b99327879..000000000
--- a/src/wx2/film_editor.cc
+++ /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
index d1278b80e..000000000
--- a/src/wx2/film_editor.h
+++ /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
index c2481efb9..000000000
--- a/src/wx2/film_viewer.cc
+++ /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
index b0a6aab04..000000000
--- a/src/wx2/film_viewer.h
+++ /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
index f8aa92896..000000000
--- a/src/wx2/wscript
+++ /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'