X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Flanguage_tag_widget.h;h=16c00e3a63cc1fc0186a37a10a1781456bd43def;hb=6324b792da5d1e99425185ab92f3de0c6b81c3dd;hp=eee72f6a087296370ea2978a0a3787878ec6fda1;hpb=f54286b03b7b653147608dcfada81f794fc80448;p=dcpomatic.git diff --git a/src/wx/language_tag_widget.h b/src/wx/language_tag_widget.h index eee72f6a0..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,12 +30,24 @@ class wxStaticText; class wxWindow; -class LanguageTagWidget : public boost::noncopyable +class LanguageTagWidget { public: - LanguageTagWidget (wxWindow* parent, wxSizer* sizer, wxString label, wxString tooltip, dcp::LanguageTag tag); + LanguageTagWidget (wxWindow* parent, wxString tooltip, boost::optional tag, boost::optional size_to_fit = boost::none); + ~LanguageTagWidget (); - void set (dcp::LanguageTag tag); + LanguageTagWidget (LanguageTagWidget const&) = delete; + LanguageTagWidget& operator= (LanguageTagWidget const&) = delete; + + wxSizer* sizer () const { + return _sizer; + } + + boost::optional get () const { + return _tag; + } + void set (boost::optional tag); + void enable (bool e); boost::signals2::signal Changed; @@ -46,6 +57,7 @@ private: wxStaticText* _language; wxButton* _edit; wxWindow* _parent; - dcp::LanguageTag _tag; + boost::optional _tag; + wxSizer* _sizer; };