26#ifndef KIWAY_PLAYER_H_
27#define KIWAY_PLAYER_H_
68 const wxString& aTitle,
const wxPoint& aPos,
const wxSize& aSize,
69 long aStyle,
const wxString& aFrameName,
const EDA_IU_SCALE& aIuScale );
74#define KICTL_NONKICAD_ONLY (1<<0)
75#define KICTL_KICAD_ONLY (1<<1)
76#define KICTL_CREATE (1<<2)
77#define KICTL_IMPORT_LIB (1<<3)
78#define KICTL_REVERT (1<<4)
139 virtual bool ShowModal( wxString* aResult =
nullptr,
140 wxWindow* aResultantFocusWindow =
nullptr );
164 void DismissModal(
bool aRetVal,
const wxString& aResult = wxEmptyString );
202 DECLARE_EVENT_TABLE()
210bool OpenProjectFiles(
const std::vector<wxString>& aFileList,
int aCtl = 0 )
212 if( aFileList.size() != 1 )
218 assert( aFileList[0] is absolute )
220 if( !
Pgm().LockFile( fullFileName ) )
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
241 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.
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.
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)
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.
PGM_BASE & Pgm()
The global Program "get" accessor.
Implement a participant in the KIWAY alchemy.