KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_export_step_process.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KICAD, a free EDA CAD application.
3 *
4 * Copyright (C) 2022 Kicad Developers, see AUTHORS.txt for contributors.
5 * Copyright (C) 2020 New Pagodi(https://stackoverflow.com/users/6846682/new-pagodi)
6 * from https://stackoverflow.com/a/63289812/1522001
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
27#include <wx/process.h>
28#include <wx/msgqueue.h>
29
30class wxProcess;
31class wxThread;
32
34{
35public:
36 enum class STATE_MESSAGE : int
37 {
41 };
42
43 DIALOG_EXPORT_STEP_LOG( wxWindow* aParent, wxString aStepCmd );
44 ~DIALOG_EXPORT_STEP_LOG() override;
45
46private:
47 void appendMessage( const wxString& aMessage );
48 void onProcessTerminate( wxProcessEvent& aEvent );
49 void onThreadInput( wxThreadEvent& );
50 void onClose( wxCloseEvent& event );
51
52 wxProcess* m_process;
53 wxThread* m_stdioThread;
54 wxMessageQueue<STATE_MESSAGE> m_msgQueue;
55};
void appendMessage(const wxString &aMessage)
void onProcessTerminate(wxProcessEvent &aEvent)
@ PROCESS_COMPLETE
Informs the thread the process terminate event was received from wx.
@ REQUEST_EXIT
Asks the thread to exit and kill the process.
@ SENTINEL
Just a dummy entry for end of list.
void onClose(wxCloseEvent &event)
wxMessageQueue< STATE_MESSAGE > m_msgQueue
Class DIALOG_EXPORT_STEP_PROCESS_BASE.