25 #ifndef KIWAY_PLAYER_H_ 26 #define KIWAY_PLAYER_H_ 29 #include <wx/cmdline.h> 43 #define WX_EVENT_LOOP wxGUIEventLoop 66 const wxString& aTitle,
const wxPoint& aPos,
const wxSize& aSize,
67 long aStyle,
const wxString& aWdoName = wxFrameNameStr );
71 KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId,
const wxString& aTitle,
72 const wxPoint& aPos,
const wxSize& aSize,
long aStyle,
73 const wxString& aWdoName = wxFrameNameStr );
78 #define KICTL_EAGLE_BRD (1<<0) 79 #define KICTL_CREATE (1<<1) 80 #define KICTL_IMPORT_LIB (1<<2) 155 virtual bool ShowModal( wxString* aResult =
nullptr,
156 wxWindow* aResultantFocusWindow =
nullptr );
180 void DismissModal(
bool aRetVal,
const wxString& aResult = wxEmptyString );
202 DECLARE_EVENT_TABLE()
210 bool OpenProjectFiles(
const std::vector<wxString>& aFileList,
int aCtl = 0 )
212 if( aFileList.size() != 1 )
218 assert( aFileList[0] is absolute )
226 if current open project files have been modified
228 ask
if user wants to save them and
if yes save.
231 unload any currently open project files.
233 Prj().SetProjectFullName( )
235 if( aFileList[0] does not exist )
237 notify user file does not exist and ask
if he wants to create it
240 create
empty project file(s)
241 mark file as modified.
243 use the
default project config file.
252 use the project config file
for project given by aFileList[0]s full path.
266 #endif // KIWAY_PLAYER_H_ 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...
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
virtual bool OpenProjectFiles(const std::vector< wxString > &aFileList, int aCtl=0)
Open a project or set of files given by aFileList.
A mix in class which holds the location of a wxWindow's KIWAY.
A KIFACE (I)mplementation.
const wxString & GetFileName() const
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
Container for project specific data.
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.
SCH_SCREEN * GetScreen() const
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
void language_change(wxCommandEvent &event)
An event handler called on a language menu selection.
std::unique_ptr< wxSingleInstanceChecker > LockFile(const wxString &aFileName)
Test to see if aFileName can be locked (is not already locked) and only then returns a wxSingleInstan...
Base window classes and related definitions.
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 SetModal(bool aIsModal)
void DismissModal(bool aRetVal, const wxString &aResult=wxEmptyString)
The base frame for deriving all KiCad main window classes.
Implement a participant in the KIWAY alchemy.
WX_EVENT_LOOP * m_modal_loop
< Points to nested event_loop. NULL means not modal and dismissed.
static bool empty(const wxTextEntryBase *aCtrl)
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
virtual void ParseArgs(wxCmdLineParser &aParser)
Handle command-line arguments in a frame-specific way.