Simplify and fix up selection code for the content list (#2428).
[dcpomatic.git] / src / wx / metadata_dialog.h
index 29d8b39cce6f1250af7a84f6d5330c74380b8eae..b77b14a996216746d37d719834f3e78eba425df2 100644 (file)
@@ -35,9 +35,11 @@ LIBDCP_ENABLE_WARNINGS
 
 
 class Button;
+class CheckBox;
 class Choice;
 class LanguageTagWidget;
 class RatingDialog;
+class RegionSubtagWidget;
 class wxSpinCtrlDouble;
 
 
@@ -59,7 +61,7 @@ protected:
 
 private:
        void sign_language_video_language_changed ();
-       void edit_release_territory ();
+       void release_territory_changed(boost::optional<dcp::LanguageTag::RegionSubtag> tag);
        void enable_release_territory_changed ();
        void facility_changed ();
        void enable_facility_changed ();
@@ -76,26 +78,25 @@ private:
        std::vector<dcp::Rating> ratings () const;
        void set_ratings (std::vector<dcp::Rating> r);
 
-       wxCheckBox* _enable_release_territory;
+       CheckBox* _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;
+       boost::optional<dcp::LanguageTag::RegionSubtag> _release_territory_copy;
+       RegionSubtagWidget* _release_territory;
        LanguageTagWidget* _sign_language_video_language = nullptr;
-       wxCheckBox* _enable_facility;
+       CheckBox* _enable_facility;
        wxTextCtrl* _facility;
-       wxCheckBox* _enable_chain;
+       CheckBox* _enable_chain;
        wxTextCtrl* _chain;
-       wxCheckBox* _enable_studio;
+       CheckBox* _enable_studio;
        wxTextCtrl* _studio;
-       wxCheckBox* _temp_version;
-       wxCheckBox* _pre_release;
-       wxCheckBox* _red_band;
-       wxCheckBox* _two_d_version_of_three_d;
-       wxCheckBox* _enable_luminance;
+       CheckBox* _temp_version;
+       CheckBox* _pre_release;
+       CheckBox* _red_band;
+       CheckBox* _two_d_version_of_three_d;
+       CheckBox* _enable_luminance;
        wxSpinCtrlDouble* _luminance_value;
        Choice* _luminance_unit;