X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fcontrols.h;h=ca9c2008759c0ad9b7a8609d41982e0f74e32b37;hb=8d998d5e325e06fdb0075483048cd56dca03273f;hp=01446445657c40aa5e8597ad47bcf56ac329b30c;hpb=694a9f48880efd428c8137e975de3581ad0a75a9;p=dcpomatic.git diff --git a/src/wx/controls.h b/src/wx/controls.h index 014464456..ca9c20087 100644 --- a/src/wx/controls.h +++ b/src/wx/controls.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2018 Carl Hetherington + Copyright (C) 2018-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,17 +18,21 @@ */ + #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 -#include +DCPOMATIC_ENABLE_WARNINGS #include + class FilmViewer; class Film; class ClosedCaptionsDialog; @@ -38,26 +42,33 @@ class wxToggleButton; class wxListCtrl; class ContentView; + namespace dcp { class CPL; } + class Controls : public wxPanel { public: Controls ( wxWindow* parent, - boost::shared_ptr, + std::shared_ptr, bool editor_controls = true ); - virtual void log (wxString) {} - virtual void set_film (boost::shared_ptr film); - boost::shared_ptr film () const; + virtual void set_film (std::shared_ptr film); + + virtual void play () {}; + virtual void stop () {}; + void seek (int slider); + + std::shared_ptr film () const; void back_frame (); void forward_frame (); protected: + virtual void started (); virtual void stopped (); virtual void setup_sensitivity (); @@ -65,9 +76,9 @@ protected: wxSizer* _v_sizer; wxBoxSizer* _button_sizer; - boost::shared_ptr _film; + std::shared_ptr _film; wxSlider* _slider; - boost::shared_ptr _viewer; + std::weak_ptr _viewer; boost::optional _active_job; private: @@ -84,13 +95,13 @@ private: void timecode_clicked (); void active_jobs_changed (boost::optional); dcpomatic::DCPTime nudge_amount (wxKeyboardState& ev); - void image_changed (boost::weak_ptr); + void image_changed (std::weak_ptr); void outline_content_changed (); void eye_changed (); void update_position (); void film_change (ChangeType, Film::Property); - typedef std::pair, boost::filesystem::path> CPL; + typedef std::pair, boost::filesystem::path> CPL; bool _slider_being_moved; @@ -111,4 +122,5 @@ private: boost::signals2::scoped_connection _config_changed_connection; }; + #endif