Include subscribers / supporters in git.
[dcpomatic.git] / src / wx / controls.h
index 1b6a379cce5a8fc6db9e8b1fadb0b3c373660a76..377960425ba2807e5982ede7f25ffd4ec8e376a5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_CONTROLS_H
 #define DCPOMATIC_CONTROLS_H
 
+
 #include "lib/dcpomatic_time.h"
 #include "lib/types.h"
 #include "lib/film.h"
-#include "lib/spl.h"
+#include "lib/warnings.h"
+DCPOMATIC_DISABLE_WARNINGS
 #include <wx/wx.h>
-#include <boost/shared_ptr.hpp>
+DCPOMATIC_ENABLE_WARNINGS
 #include <boost/signals2.hpp>
 
+
 class FilmViewer;
 class Film;
 class ClosedCaptionsDialog;
@@ -38,31 +42,34 @@ class wxToggleButton;
 class wxListCtrl;
 class ContentView;
 
+
 namespace dcp {
        class CPL;
 }
 
+
 class Controls : public wxPanel
 {
 public:
        Controls (
                wxWindow* parent,
-               boost::shared_ptr<FilmViewer>,
+               std::shared_ptr<FilmViewer>,
                bool editor_controls = true
                );
 
        virtual void log (wxString) {}
-       virtual void set_film (boost::shared_ptr<Film> film);
-#ifdef DCPOMATIC_PLAYER_STRESS_TEST
+       virtual void set_film (std::shared_ptr<Film> film);
+
        virtual void play () {};
        virtual void stop () {};
        void seek (int slider);
-#endif
-       boost::shared_ptr<Film> film () const;
+
+       std::shared_ptr<Film> film () const;
        void back_frame ();
        void forward_frame ();
 
 protected:
+
        virtual void started ();
        virtual void stopped ();
        virtual void setup_sensitivity ();
@@ -70,9 +77,9 @@ protected:
 
        wxSizer* _v_sizer;
        wxBoxSizer* _button_sizer;
-       boost::shared_ptr<Film> _film;
+       std::shared_ptr<Film> _film;
        wxSlider* _slider;
-       boost::shared_ptr<FilmViewer> _viewer;
+       std::weak_ptr<FilmViewer> _viewer;
        boost::optional<std::string> _active_job;
 
 private:
@@ -89,13 +96,13 @@ private:
        void timecode_clicked ();
        void active_jobs_changed (boost::optional<std::string>);
        dcpomatic::DCPTime nudge_amount (wxKeyboardState& ev);
-       void image_changed (boost::weak_ptr<PlayerVideo>);
+       void image_changed (std::weak_ptr<PlayerVideo>);
        void outline_content_changed ();
        void eye_changed ();
        void update_position ();
        void film_change (ChangeType, Film::Property);
 
-       typedef std::pair<boost::shared_ptr<dcp::CPL>, boost::filesystem::path> CPL;
+       typedef std::pair<std::shared_ptr<dcp::CPL>, boost::filesystem::path> CPL;
 
        bool _slider_being_moved;
 
@@ -116,4 +123,5 @@ private:
        boost::signals2::scoped_connection _config_changed_connection;
 };
 
+
 #endif