X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fcontrols.h;h=377960425ba2807e5982ede7f25ffd4ec8e376a5;hb=d1213510dc70e579346e0c4c48a8bce9b5cd95b9;hp=a2c80b8090bdd9c9d30e700bea47eeef89a4e8aa;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26;p=dcpomatic.git diff --git a/src/wx/controls.h b/src/wx/controls.h index a2c80b809..377960425 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,9 +18,11 @@ */ + #ifndef DCPOMATIC_CONTROLS_H #define DCPOMATIC_CONTROLS_H + #include "lib/dcpomatic_time.h" #include "lib/types.h" #include "lib/film.h" @@ -30,6 +32,7 @@ DCPOMATIC_DISABLE_WARNINGS DCPOMATIC_ENABLE_WARNINGS #include + class FilmViewer; class Film; class ClosedCaptionsDialog; @@ -39,10 +42,12 @@ class wxToggleButton; class wxListCtrl; class ContentView; + namespace dcp { class CPL; } + class Controls : public wxPanel { public: @@ -64,6 +69,7 @@ public: void forward_frame (); protected: + virtual void started (); virtual void stopped (); virtual void setup_sensitivity (); @@ -73,7 +79,7 @@ protected: wxBoxSizer* _button_sizer; std::shared_ptr _film; wxSlider* _slider; - std::shared_ptr _viewer; + std::weak_ptr _viewer; boost::optional _active_job; private: @@ -117,4 +123,5 @@ private: boost::signals2::scoped_connection _config_changed_connection; }; + #endif