33#include <wx/evtloop.h>
45 const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
46 long aStyle, const wxString& aFrameName,
48 EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName, aKiway,
51 m_modal_loop(
nullptr ),
52 m_modal_resultant_parent(
nullptr ),
53 m_modal_ret_val( false ),
54 m_socketServer(
nullptr )
80 socket->Notify(
false );
97 wxASSERT_MSG(
IsModal(), wxT(
"ShowModal() shouldn't be called on non-modal frame" ) );
121 wxWindow* parent = GetParent();
123 while( parent && !parent->IsTopLevel() )
124 parent = parent->GetParent();
128 wxGUIEventLoop event_loop;
136 if( aResultantFocusWindow )
138 aResultantFocusWindow->Raise();
143 aResultantFocusWindow->SetFocus();
154 return EDA_BASE_FRAME::Destroy();
188 int id =
event.GetId();
The base frame for deriving all KiCad main window classes.
FRAME_T GetFrameType() const
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
virtual bool ShowModal(wxString *aResult=nullptr, wxWindow *aResultantFocusWindow=nullptr)
Show this wxFrame as if it were a modal dialog, with all other instantiated wxFrames disabled until t...
virtual void KiwayMailIn(KIWAY_EXPRESS &aEvent)
Receive KIWAY_EXPRESS messages from other players.
void language_change(wxCommandEvent &event)
An event handler called on a language menu selection.
void kiway_express(KIWAY_EXPRESS &aEvent)
Event handler, routes to derivative specific virtual KiwayMailIn().
wxWindow * m_modal_resultant_parent
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
wxGUIEventLoop * m_modal_loop
Points to nested event_loop. NULL means not modal and dismissed.
std::vector< wxSocketBase * > m_sockets
void DismissModal(bool aRetVal, const wxString &aResult=wxEmptyString)
bool IsModal() const override
Return true if the frame is shown in our modal mode and false if the frame is shown as an usual frame...
wxSocketServer * m_socketServer
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
virtual void SetLanguage(int aLanguage)
Change the language and then calls ShowChangedLanguage() on all #KIWAY_PLAYERs.
void PlayerDidClose(FRAME_T aFrameType)
Notifies a Kiway that a player has been closed.
Temporarily disable a window, and then re-enable on destruction.
EVT_MENU_RANGE(ID_GERBVIEW_DRILL_FILE1, ID_GERBVIEW_DRILL_FILEMAX, GERBVIEW_FRAME::OnDrlFileHistory) EVT_MENU_RANGE(ID_GERBVIEW_ZIP_FILE1
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Common command IDs shared by more than one of the KiCad applications.
#define EVT_KIWAY_EXPRESS(func)
Event table definition for the KIWAY_EXPRESS event class.
This file contains miscellaneous commonly used macros and functions.