26#ifndef KIWAY_PLAYER_H_
27#define KIWAY_PLAYER_H_
42#define WX_EVENT_LOOP wxGUIEventLoop
70 const wxString& aTitle,
const wxPoint& aPos,
const wxSize& aSize,
71 long aStyle,
const wxString& aFrameName,
const EDA_IU_SCALE& aIuScale );
76#define KICTL_NONKICAD_ONLY (1<<0)
77#define KICTL_KICAD_ONLY (1<<1)
78#define KICTL_CREATE (1<<2)
79#define KICTL_IMPORT_LIB (1<<3)
80#define KICTL_REVERT (1<<4)
141 virtual bool ShowModal( wxString* aResult =
nullptr,
142 wxWindow* aResultantFocusWindow =
nullptr );
166 void DismissModal(
bool aRetVal,
const wxString& aResult = wxEmptyString );
204 DECLARE_EVENT_TABLE()
212bool OpenProjectFiles(
const std::vector<wxString>& aFileList,
int aCtl = 0 )
214 if( aFileList.size() != 1 )
220 assert( aFileList[0] is absolute )
222 if( !
Pgm().LockFile( fullFileName ) )
228 if current open
project files have been modified
230 ask
if user wants to
save them and
if yes
save.
233 unload any currently open
project files.
235 Prj().SetProjectFullName( )
237 if( aFileList[0] does not exist )
239 notify user file does not exist and ask
if he wants to create it
243 mark file as modified.
The base frame for deriving all KiCad main window classes.
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
A mix in class which holds the location of a wxWindow's KIWAY.
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.
WX_EVENT_LOOP * m_modal_loop
< Points to nested event_loop. NULL means not modal and dismissed.
virtual void ExecuteRemoteCommand(const char *cmdline)
Execute a remote command sent via socket (to port KICAD_PCB_PORT_SERVICE_NUMBER, currently 4242).
void language_change(wxCommandEvent &event)
An event handler called on a language menu selection.
void CreateServer(int service, bool local=true)
void kiway_express(KIWAY_EXPRESS &aEvent)
event handler, routes to derivative specific virtual KiwayMailIn()
wxWindow * m_modal_resultant_parent
void SetModal(bool aIsModal)
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
virtual bool OpenProjectFiles(const std::vector< wxString > &aFileList, int aCtl=0)
Open a project or set of files given by aFileList.
std::vector< wxSocketBase * > m_sockets
interprocess communication
void DismissModal(bool aRetVal, const wxString &aResult=wxEmptyString)
void OnSockRequestServer(wxSocketEvent &evt)
void OnSockRequest(wxSocketEvent &evt)
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...
Container for project specific data.
const wxString & GetFileName() const
SCH_SCREEN * GetScreen() const
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
static bool empty(const wxTextEntryBase *aCtrl)
Base window classes and related definitions.
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Implement a participant in the KIWAY alchemy.