Merge master.
[dcpomatic.git] / src / wx / film_viewer.h
index d2e597637fcfac6fd9a2ad6f2ed9b92be93b4626..950758f61c9f401cd63e28a4473f013e8ab18785 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 #include <wx/wx.h>
 #include "lib/film.h"
 
-class ThumbPanel;
+class wxToggleButton;
+class FFmpegPlayer;
+class Image;
+class RGBPlusAlphaImage;
+class PlayerVideoFrame;
 
 /** @class FilmViewer
- *  @brief A wx widget to view `thumbnails' of a Film.
+ *  @brief A wx widget to view a preview of a Film.
  */
 class FilmViewer : public wxPanel
 {
 public:
-       FilmViewer (Film *, wxWindow *);
+       FilmViewer (boost::shared_ptr<Film>, wxWindow *);
 
-       void set_film (Film *);
-       void setup_visibility ();
+       void set_film (boost::shared_ptr<Film>);
 
 private:
-       void slider_changed (wxCommandEvent &);
-       void update_thumbs ();
-       void set_thumbnail (int);
-       void film_changed (FilmState::Property);
-
-       Film* _film;
-       wxBoxSizer* _sizer;
-       ThumbPanel* _thumb_panel;
+       void paint_panel ();
+       void panel_sized (wxSizeEvent &);
+       void slider_moved ();
+       void play_clicked ();
+       void timer ();
+       void calculate_sizes ();
+       void check_play_state ();
+       void active_jobs_changed (bool);
+       void back_clicked ();
+       void forward_clicked ();
+       void player_changed (bool);
+       void set_position_text ();
+       void get (DCPTime, bool);
+
+       boost::shared_ptr<Film> _film;
+       boost::shared_ptr<Player> _player;
+
+       wxSizer* _v_sizer;
+       wxPanel* _panel;
        wxSlider* _slider;
+       wxButton* _back_button;
+       wxButton* _forward_button;
+       wxStaticText* _frame_number;
+       wxStaticText* _timecode;
+       wxToggleButton* _play_button;
+       wxTimer _timer;
+
+       boost::shared_ptr<const Image> _frame;
+       DCPTime _position;
+
+       /** Size of our output (including padding if we have any) */
+       dcp::Size _out_size;
+       /** Size of the panel that we have available */
+       dcp::Size _panel_size;
 };