Separate out SPL/SPLEntry; start trying to make player read SPLs sensibly.
[dcpomatic.git] / src / wx / controls.h
index 652e71f1651aad8623197726d43344bda1d6eec9..7cdd4a0d2f0a7984b11f06b7c8898d3a74065bea 100644 (file)
@@ -21,6 +21,7 @@
 #include "lib/dcpomatic_time.h"
 #include "lib/types.h"
 #include "lib/film.h"
+#include "lib/spl.h"
 #include <wx/wx.h>
 #include <boost/shared_ptr.hpp>
 #include <boost/signals2.hpp>
@@ -32,6 +33,12 @@ class Content;
 class PlayerVideo;
 class wxToggleButton;
 class wxListCtrl;
+class ContentView;
+class SPL;
+
+namespace dcp {
+       class CPL;
+}
 
 class Controls : public wxPanel
 {
@@ -39,20 +46,15 @@ public:
        Controls (
                wxWindow* parent,
                boost::shared_ptr<FilmViewer>,
-               bool outline_content = true,
-               bool jump_to_selected = true,
-               bool eyes = true,
-               bool dcp_directory = false
+               bool editor_controls = true
                );
 
        boost::shared_ptr<Film> film () const;
        void back_frame ();
        void forward_frame ();
 
-       void show_dcp_directory (bool s);
-
-       boost::signals2::signal<void (boost::filesystem::path)> DCPDirectorySelected;
-       boost::signals2::signal<void ()> DCPEjected;
+       void show_extended_player_controls (bool s);
+       void log (wxString s);
 
 private:
        void update_position_label ();
@@ -73,21 +75,24 @@ private:
        void active_jobs_changed (boost::optional<std::string>);
        DCPTime nudge_amount (wxKeyboardState& ev);
        void image_changed (boost::weak_ptr<PlayerVideo>);
-       void film_change (ChangeType type, Film::Property p);
        void outline_content_changed ();
        void eye_changed ();
        void position_changed ();
        void started ();
        void stopped ();
        void film_changed ();
-       void update_dcp_directory ();
-       void dcp_directory_changed ();
-       void dcp_directory_selected ();
+       void update_content_directory ();
+       void update_playlist_directory ();
        void config_changed (int property);
+       void spl_selection_changed ();
+
+       typedef std::pair<boost::shared_ptr<dcp::CPL>, boost::filesystem::path> CPL;
+
 #ifdef DCPOMATIC_VARIANT_SWAROOP
        void pause_clicked ();
        void stop_clicked ();
 #endif
+       void add_playlist_to_list (SPL spl);
 
        boost::shared_ptr<Film> _film;
        boost::shared_ptr<FilmViewer> _viewer;
@@ -99,8 +104,11 @@ private:
        wxCheckBox* _outline_content;
        wxChoice* _eye;
        wxCheckBox* _jump_to_selected;
-       wxListCtrl* _dcp_directory;
-       std::vector<boost::filesystem::path> _dcp_directories;
+       ContentView* _content_view;
+       wxListCtrl* _spl_view;
+       wxListCtrl* _current_spl_view;
+       wxTextCtrl* _log;
+       std::vector<SPL> _playlists;
        wxSlider* _slider;
        wxButton* _rewind_button;
        wxButton* _back_button;
@@ -118,5 +126,9 @@ private:
 
        ClosedCaptionsDialog* _closed_captions_dialog;
 
+#ifdef DCPOMATIC_VARIANT_SWAROOP
+       boost::optional<dcp::ContentKind> _current_kind;
+#endif
+
        boost::signals2::scoped_connection _config_changed_connection;
 };