33#include <wx/evtloop.h>
44 const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
45 long aStyle, const wxString& aFrameName,
47 EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName, aKiway,
50 m_modal_loop(
nullptr ),
51 m_modal_resultant_parent(
nullptr ),
52 m_modal_ret_val( false ),
53 m_socketServer(
nullptr )
79 socket->Notify(
false );
96 wxASSERT_MSG(
IsModal(), wxT(
"ShowModal() shouldn't be called on non-modal frame" ) );
112 NULLER(
void*& aPtr ) : m_what( aPtr ) {}
113 ~NULLER() { m_what =
nullptr; }
131 wxWindowList wlist = GetChildren();
132 std::vector<wxWindow*> enabledTopLevelWindows;
134 for(
unsigned ii = 0; ii < wlist.size(); ii++ )
136 if( wlist[ii]->IsTopLevel() && wlist[ii]->IsEnabled() )
137 enabledTopLevelWindows.push_back( wlist[ii] );
142 wxWindowDisabler toggle(
this );
144 for(
unsigned ii = 0; ii < enabledTopLevelWindows.size(); ii++ )
145 enabledTopLevelWindows[ii]->Enable(
true );
147 wxGUIEventLoop event_loop;
157 if( aResultantFocusWindow )
159 aResultantFocusWindow->Raise();
164 aResultantFocusWindow->SetFocus();
175 return EDA_BASE_FRAME::Destroy();
209 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
interprocess communication
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.
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.
#define EVT_KIWAY_EXPRESS(func)
Event table definition for the KIWAY_EXPRESS event class.
This file contains miscellaneous commonly used macros and functions.