20#include "../gui/NumeReWindow.h"
53 const wxString strData = wxConnection::GetTextFromData(data, size,
format);
55 if (strData.StartsWith(
_T(
"[IfExec_Open(\"")))
58 if (strData.StartsWith(
_T(
"[Open(\"")))
60 wxRegEx reCmd(
_T(
"\"(.*)\""));
62 if (reCmd.Matches(strData))
80 else if (strData.StartsWith(
_T(
"[CmdLine({")))
82 int pos = strData.Find(
_T(
"})]"));
84 if (pos != wxNOT_FOUND)
86 wxString line = strData.Mid(10, pos - 10);
87 line.Replace(
_T(
"\\)"),
_T(
")"));
88 line.Replace(
_T(
"\\("),
_T(
"("));
95 m_ArgV.Add(line.substr(0, line.find(
' ')));
96 line.erase(0, line.find(
' ')+1);
103 wxSafeShowMessage(wxT(
"Warning"), wxString::Format(wxT(
"DDE topic %s not handled."), strData.wx_str()));
127 m_Frame->RequestUserAttention();
This class is an implementation of a DDE connection between DDE::Client and DDE::Server.
virtual bool OnExecute(const wxString &topic, const void *data, size_t size, wxIPCFormat format) override
Handles the interprocess communication between two NumeRe instances.
virtual bool OnDisconnect() override
Called, when the DDE::Server or the DDE::Client closes the connection. Will pass the gathered command...
virtual wxConnectionBase * OnAcceptConnection(const wxString &topic) override
Creates a new DDEConnection, if the topic equals DDE_TOPIC.
void OpenFileByType(const wxFileName &filename)
This member function opens the file with the passed name in the corresponding widget (either editor,...
void EvaluateCommandLine(wxArrayString &wxArgV)
This member function evaluates the command line passed to this application at startup and evaluates,...
auto format(const std::locale &loc, const CharT *fmt, const Streamable &tp) -> decltype(to_stream(std::declval< std::basic_ostream< CharT > & >(), fmt, tp), std::basic_string< CharT >{})