/*
- Copyright (C) 2018-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
+
#include "i18n_hook.h"
#include "instant_i18n_dialog.h"
#include "wx_util.h"
#include "lib/cross.h"
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-#include <boost/bind.hpp>
+LIBDCP_ENABLE_WARNINGS
+#include <boost/bind/bind.hpp>
+
using std::map;
using std::string;
_window->Bind (wxEVT_MIDDLE_DOWN, bind(&I18NHook::handle, this, _1));
}
+
void
I18NHook::handle (wxMouseEvent& ev)
{
- InstantI18NDialog* d = new InstantI18NDialog (_window, get_text());
+ auto d = new InstantI18NDialog (_window, get_text());
d->ShowModal();
set_text (d->get());
d->Destroy ();
- wxWindow* w = _window;
+ auto w = _window;
while (w) {
if (w->GetContainingSizer()) {
w->GetContainingSizer()->Layout();