Files
dhfs/launcher/gui/src/DhfsGuiInstance.cpp
2025-06-26 08:03:35 +02:00

24 lines
690 B
C++

//
// Created by Stepan Usatiuk on 25.06.2025.
//
#include "DhfsGuiInstance.hpp"
#include "LauncherAppMainFrame.h"
DhfsGuiInstance::DhfsGuiInstance(LauncherAppMainFrame& parent): _parent(parent) {
}
void DhfsGuiInstance::OnTerminate(int pid, int status) {
wxCommandEvent* event = new wxCommandEvent(SHUTDOWN_EVENT, _parent.GetId());
event->SetEventObject(&_parent);
_parent.GetEventHandler()->QueueEvent(event);
}
void DhfsGuiInstance::OnRead(std::string s) {
wxCommandEvent* event = new wxCommandEvent(NEW_LINE_OUTPUT_EVENT, _parent.GetId());
event->SetEventObject(&_parent);
event->SetString(std::move(s));
_parent.GetEventHandler()->QueueEvent(event);
}