X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwx%2Flanguage_tag_widget.h;h=ff3eeb7270f5fb2b525ae77056805d2ef44a70f8;hb=a399d7c7b9239e055ba08a82b18eb68a511d1025;hp=3cfca013df4ef6eef10d69fda56f86a892bcbf5d;hpb=05d225e805607c8b413814ec7f6145cd454fadab;p=dcpomatic.git diff --git a/src/wx/language_tag_widget.h b/src/wx/language_tag_widget.h index 3cfca013d..ff3eeb727 100644 --- a/src/wx/language_tag_widget.h +++ b/src/wx/language_tag_widget.h @@ -20,8 +20,10 @@ #include +#include +LIBDCP_DISABLE_WARNINGS #include -#include +LIBDCP_ENABLE_WARNINGS #include @@ -31,16 +33,24 @@ class wxStaticText; class wxWindow; -class LanguageTagWidget : public boost::noncopyable +class LanguageTagWidget { public: - LanguageTagWidget (wxWindow* parent, wxString tooltip, dcp::LanguageTag tag); + LanguageTagWidget (wxWindow* parent, wxString tooltip, boost::optional tag, boost::optional size_to_fit = boost::none); + ~LanguageTagWidget(); + + LanguageTagWidget (LanguageTagWidget const&) = delete; + LanguageTagWidget& operator= (LanguageTagWidget const&) = delete; wxSizer* sizer () const { return _sizer; } - void set (dcp::LanguageTag tag); + boost::optional get () const { + return _tag; + } + void set (boost::optional tag); + void enable (bool e); boost::signals2::signal Changed; @@ -50,7 +60,7 @@ private: wxStaticText* _language; wxButton* _edit; wxWindow* _parent; - dcp::LanguageTag _tag; + boost::optional _tag; wxSizer* _sizer; };