Fix floating line at the top of the groups column.
[dcpomatic.git] / src / wx / smpte_metadata_dialog.h
index 36039c5018a9fea6a0fc9466b278caaa7b25b4ba..63d90249c212fc69ea2147b48a600980c2e16643 100644 (file)
 */
 
 #include "editable_list.h"
-#include "language_tag_dialog.h"
+#include "full_language_tag_dialog.h"
 #include "lib/film.h"
+#include "lib/weak_film.h"
 #include <dcp/language_tag.h>
 #include <dcp/types.h>
 #include <wx/wx.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
 #include <vector>
 
 
@@ -33,14 +32,17 @@ class Film;
 class RatingDialog;
 class ContentVersionDialog;
 class LanguageTagWidget;
+class LanguageTagDialog;
 
 
-class SMPTEMetadataDialog : public wxDialog
+class SMPTEMetadataDialog : public wxDialog, public WeakFilm
 {
 public:
-       SMPTEMetadataDialog (wxWindow* parent, boost::weak_ptr<Film> film);
+       SMPTEMetadataDialog (wxWindow* parent, std::weak_ptr<Film> film);
 
 private:
+       wxPanel* main_panel (wxWindow* parent);
+       wxPanel* advanced_panel (wxWindow* parent);
        std::vector<dcp::Rating> ratings () const;
        void set_ratings (std::vector<dcp::Rating> r);
        std::vector<std::string> content_versions () const;
@@ -60,19 +62,31 @@ private:
        void luminance_changed ();
        void film_changed (ChangeType type, Film::Property property);
        void setup_sensitivity ();
-       boost::shared_ptr<Film> film () const;
+       void enable_release_territory_changed ();
+       void enable_chain_changed ();
+       void enable_distributor_changed ();
+       void enable_facility_changed ();
 
-       boost::weak_ptr<Film> _film;
        LanguageTagWidget* _name_language;
        LanguageTagWidget* _audio_language;
        wxCheckBox* _enable_main_subtitle_language;
        LanguageTagWidget* _main_subtitle_language;
        EditableList<dcp::LanguageTag, LanguageTagDialog>* _additional_subtitle_languages;
-       wxStaticText* _release_territory;
+       wxCheckBox* _enable_release_territory;
+       /** The current release territory displayed in the UI; since we can't easily convert
+        *  the string in _release_territory_text to a RegionSubtag we just store the RegionSubtag
+        *  alongside.
+        */
+       boost::optional<dcp::LanguageTag::RegionSubtag> _release_territory;
+       wxStaticText* _release_territory_text;
+       Button* _edit_release_territory;
        wxSpinCtrl* _version_number;
        wxChoice* _status;
+       wxCheckBox* _enable_chain;
        wxTextCtrl* _chain;
+       wxCheckBox* _enable_distributor;
        wxTextCtrl* _distributor;
+       wxCheckBox* _enable_facility;
        wxTextCtrl* _facility;
        wxSpinCtrlDouble* _luminance_value;
        wxChoice* _luminance_unit;