25#ifndef KIWAY_PLAYER_H_
26#define KIWAY_PLAYER_H_
41#define WX_EVENT_LOOP wxGUIEventLoop
69 const wxString& aTitle,
const wxPoint& aPos,
const wxSize& aSize,
70 long aStyle,
const wxString& aFrameName,
const EDA_IU_SCALE& aIuScale );
74 KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId,
const wxString& aTitle,
75 const wxPoint& aPos,
const wxSize& aSize,
long aStyle,
76 const wxString& aWdoName = wxFrameNameStr );
81#define KICTL_EAGLE_BRD (1<<0)
82#define KICTL_CREATE (1<<1)
83#define KICTL_IMPORT_LIB (1<<2)
144 virtual bool ShowModal( wxString* aResult =
nullptr,
145 wxWindow* aResultantFocusWindow =
nullptr );
169 void DismissModal(
bool aRetVal,
const wxString& aResult = wxEmptyString );
208 DECLARE_EVENT_TABLE()
216bool OpenProjectFiles(
const std::vector<wxString>& aFileList,
int aCtl = 0 )
218 if( aFileList.size() != 1 )
224 assert( aFileList[0] is absolute )
232 if current open
project files have been modified
234 ask
if user wants to
save them and
if yes
save.
237 unload any currently open
project files.
239 Prj().SetProjectFullName( )
241 if( aFileList[0] does not exist )
243 notify user file does not exist and ask
if he wants to create it
247 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
KIWAY_PLAYER(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName, const EDA_IU_SCALE &aIuScale)
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.
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...
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Implement a participant in the KIWAY alchemy.