projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
C++11 tidying.
[dcpomatic.git]
/
src
/
wx
/
html_dialog.cc
diff --git
a/src/wx/html_dialog.cc
b/src/wx/html_dialog.cc
index 57038f77f6d533301bd77450c4b157b141cb40a6..dcae84cd9d3b4b834e58a54bbf0c7138d34a84c9 100644
(file)
--- a/
src/wx/html_dialog.cc
+++ b/
src/wx/html_dialog.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018
-2021
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,6
+18,7
@@
*/
*/
+
#include "html_dialog.h"
#include "wx_util.h"
#include "lib/cross.h"
#include "html_dialog.h"
#include "wx_util.h"
#include "lib/cross.h"
@@
-29,24
+30,26
@@
DCPOMATIC_DISABLE_WARNINGS
DCPOMATIC_ENABLE_WARNINGS
#include <iostream>
DCPOMATIC_ENABLE_WARNINGS
#include <iostream>
+
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
+
HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html)
: wxDialog (parent, wxID_ANY, title)
{
HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html)
: wxDialog (parent, wxID_ANY, title)
{
-
wxBoxSizer*
sizer = new wxBoxSizer (wxVERTICAL);
+
auto
sizer = new wxBoxSizer (wxVERTICAL);
wxFileSystem::AddHandler(new wxMemoryFSHandler);
/* Add some resources that are used by HTML passed into this dialog */
wxMemoryFSHandler::AddFile(
"me.jpg",
wxFileSystem::AddHandler(new wxMemoryFSHandler);
/* Add some resources that are used by HTML passed into this dialog */
wxMemoryFSHandler::AddFile(
"me.jpg",
- wxBitmap(std_to_wx(boost::filesystem::path(
shared
_path() / "me.jpg").string()), wxBITMAP_TYPE_JPEG), wxBITMAP_TYPE_JPEG
+ wxBitmap(std_to_wx(boost::filesystem::path(
resources
_path() / "me.jpg").string()), wxBITMAP_TYPE_JPEG), wxBITMAP_TYPE_JPEG
);
);
-
wxHtmlWindow*
h = new wxHtmlWindow (this);
+
auto
h = new wxHtmlWindow (this);
h->SetPage (html);
sizer->Add (h, 1, wxEXPAND | wxALL, 6);
h->SetPage (html);
sizer->Add (h, 1, wxEXPAND | wxALL, 6);
@@
-62,6
+65,7
@@
HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html)
SetSize (h->GetInternalRepresentation()->GetWidth(), h->GetInternalRepresentation()->GetHeight() + 64);
}
SetSize (h->GetInternalRepresentation()->GetWidth(), h->GetInternalRepresentation()->GetHeight() + 64);
}
+
void
HTMLDialog::link_clicked (wxHtmlLinkEvent& ev)
{
void
HTMLDialog::link_clicked (wxHtmlLinkEvent& ev)
{