34 #include <wx/evtloop.h> 44 const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
45 long aStyle, const wxString& aWdoName ) :
46 EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName, aKiway ),
49 m_modal_resultant_parent( 0 )
56 const wxPoint& aPos,
const wxSize& aSize,
long aStyle,
57 const wxString& aWdoName ) :
61 m_modal_resultant_parent( 0 ),
62 m_modal_ret_val( false )
78 wxASSERT_MSG(
IsModal(), wxT(
"ShowModal() shouldn't be called on non-modal frame" ) );
94 NULLER(
void*& aPtr ) : m_what( aPtr ) {}
95 ~NULLER() { m_what = 0; }
113 wxWindowList wlist = GetChildren();
114 std::vector<wxWindow*> enabledTopLevelWindows;
116 for(
unsigned ii = 0; ii < wlist.size(); ii++ )
117 if( wlist[ii]->IsTopLevel() && wlist[ii]->IsEnabled() )
118 enabledTopLevelWindows.push_back( wlist[ii] );
122 wxWindowDisabler toggle(
this );
124 for(
unsigned ii = 0; ii < enabledTopLevelWindows.size(); ii++ )
125 enabledTopLevelWindows[ii]->Enable(
true );
137 if( aResultantFocusWindow )
139 aResultantFocusWindow->Raise();
144 aResultantFocusWindow->SetFocus();
152 return EDA_BASE_FRAME::Destroy();
185 int id =
event.GetId();
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...
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
wxWindow * m_modal_resultant_parent
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
KIWAY_PLAYER(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aWdoName=wxFrameNameStr)
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
virtual void SetLanguage(int aLanguage)
Change the language and then calls ShowChangedLanguage() on all #KIWAY_PLAYERs.
This file contains miscellaneous commonly used macros and functions.
EVT_MENU_RANGE(ID_GERBVIEW_DRILL_FILE1, ID_GERBVIEW_DRILL_FILEMAX, GERBVIEW_FRAME::OnDrlFileHistory) EVT_MENU_RANGE(ID_GERBVIEW_ZIP_FILE1
void language_change(wxCommandEvent &event)
An event handler called on a language menu selection.
#define EVT_KIWAY_EXPRESS(func)
Event table definition for the KIWAY_EXPRESS event class.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
virtual void KiwayMailIn(KIWAY_EXPRESS &aEvent)
Receive KIWAY_EXPRESS messages from other players.
void kiway_express(KIWAY_EXPRESS &aEvent)
event handler, routes to derivative specific virtual KiwayMailIn()
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...
void DismissModal(bool aRetVal, const wxString &aResult=wxEmptyString)
The base frame for deriving all KiCad main window classes.
WX_EVENT_LOOP * m_modal_loop
< Points to nested event_loop. NULL means not modal and dismissed.
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.