X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ffilm_editor.h;h=6aff127d8a6cfe4156a478e8a971220aad133fae;hb=f984990795e548e2c4160d17d0fa54a40c8b1311;hp=cbc8f92bee0b0b64245e706c0ed5d33ce1d28af2;hpb=4408e6eea87ce9630e71e4a7d40e2dade091b0ee;p=dcpomatic.git diff --git a/src/wx/film_editor.h b/src/wx/film_editor.h index cbc8f92be..6aff127d8 100644 --- a/src/wx/film_editor.h +++ b/src/wx/film_editor.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,29 +18,37 @@ */ + /** @file src/wx/film_editor.h * @brief FilmEditor class. */ + #include "lib/film.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include + class wxNotebook; class Film; class ContentPanel; class DCPPanel; class FilmViewer; + /** @class FilmEditor * @brief A wx widget to edit a film's metadata, and perform various functions. */ class FilmEditor : public wxPanel { public: - FilmEditor (wxWindow *, FilmViewer* viewer); + FilmEditor (wxWindow *, std::weak_ptr viewer); - void set_film (boost::shared_ptr); + void set_film (std::shared_ptr); + void first_shown (); boost::signals2::signal FileChanged; boost::signals2::signal SelectionChanged; @@ -51,10 +59,12 @@ public: return _content_panel; } - boost::shared_ptr film () const { + std::shared_ptr film () const { return _film; } +private: + /* Handle changes to the model */ void film_change (ChangeType, Film::Property); void film_content_change (ChangeType type, int); @@ -67,5 +77,5 @@ public: DCPPanel* _dcp_panel; /** The film we are editing */ - boost::shared_ptr _film; + std::shared_ptr _film; };