X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Flanguage_tag_widget.h;h=16c00e3a63cc1fc0186a37a10a1781456bd43def;hb=cf7b5fd94e50f740ab93f52343610d01c80ac6d5;hp=336f7dce234316d6d2cc2d155839fdac618065a6;hpb=e519feaca11005d330e7b8403b948d4ad9cc3ae8;p=dcpomatic.git diff --git a/src/wx/language_tag_widget.h b/src/wx/language_tag_widget.h index 336f7dce2..16c00e3a6 100644 --- a/src/wx/language_tag_widget.h +++ b/src/wx/language_tag_widget.h @@ -21,7 +21,6 @@ #include #include -#include #include @@ -31,19 +30,23 @@ 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; } - dcp::LanguageTag get () const { + boost::optional get () const { return _tag; } - void set (dcp::LanguageTag tag); + void set (boost::optional tag); void enable (bool e); boost::signals2::signal Changed; @@ -54,7 +57,7 @@ private: wxStaticText* _language; wxButton* _edit; wxWindow* _parent; - dcp::LanguageTag _tag; + boost::optional _tag; wxSizer* _sizer; };