X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fi18n_hook.h;h=50c020b2a33219aaaa2539c697a4de338bbc4c05;hb=00d0a99cfd1616e80efd86ec0531e5ca86a455e8;hp=9462e3f7f40fe0a4b2338e3a1f36089073c6c5e2;hpb=9c1bb2e5ca7c80c4e26b1b2e41159aa171360a94;p=dcpomatic.git diff --git a/src/wx/i18n_hook.h b/src/wx/i18n_hook.h index 9462e3f7f..50c020b2a 100644 --- a/src/wx/i18n_hook.h +++ b/src/wx/i18n_hook.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2018 Carl Hetherington + Copyright (C) 2018-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,23 +18,38 @@ */ + #ifndef DCPOMATIC_I18N_HOOK_H #define DCPOMATIC_I18N_HOOK_H + +#include +LIBDCP_DISABLE_WARNINGS #include +LIBDCP_ENABLE_WARNINGS +#include + class I18NHook { public: - I18NHook (wxWindow* window); + I18NHook (wxWindow* window, wxString original); virtual void set_text (wxString text) = 0; virtual wxString get_text () const = 0; + static std::map translations () { + return _translations; + } + private: void handle (wxMouseEvent &); wxWindow* _window; + wxString _original; + + static std::map _translations; }; + #endif