KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kiway_mail.cpp
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) 2014 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.TXT for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#include <kiway_mail.h>
26#include <wx/window.h>
27
28wxDEFINE_EVENT( EDA_KIWAY_MAIL_RECEIVED, KIWAY_MAIL_EVENT );
29
30
32 wxEvent( anOther ),
34 m_payload( anOther.m_payload )
35{
36}
37
38
39KIWAY_MAIL_EVENT::KIWAY_MAIL_EVENT( FRAME_T aDestination, MAIL_T aCommand, std::string& aPayload,
40 wxWindow* aSource ) :
41 wxEvent( aCommand, EDA_KIWAY_MAIL_RECEIVED ),
42 m_destination( aDestination ),
43 m_payload( aPayload )
44{
45 SetEventObject( aSource );
46}
47
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition kiway_mail.h:38
FRAME_T m_destination
could have been a bitmap indicating multiple recipients.
Definition kiway_mail.h:67
std::string & m_payload
very often s-expression text, but not always.
Definition kiway_mail.h:68
KIWAY_MAIL_EVENT(FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=nullptr)
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition frame_type.h:33
wxDEFINE_EVENT(EDA_KIWAY_MAIL_RECEIVED, KIWAY_MAIL_EVENT)
MAIL_T
The set of mail types sendable via KIWAY::ExpressMail() and supplied as the aCommand parameter to tha...
Definition mail_type.h:38