44#include <wx/filename.h>
53#define URL_GET_INVOLVED wxS( "https://go.kicad.org/contribute/" )
54#define URL_DONATE wxS( "https://go.kicad.org/app-donate" )
55#define URL_DOCUMENTATION wxS( "https://go.kicad.org/docs/" )
60 wxS(
"https://gitlab.com/kicad/code/kicad/-/issues/new?issuable_template=bare&issue"
79 m_frame->ShowPreferences( wxEmptyString, wxEmptyString );
164 if( aFrame->IsIconized() )
165 aFrame->Iconize(
false );
171 if( wxWindow::FindFocus() != aFrame )
177 blocking_win->Raise();
178 blocking_win->SetFocus();
189 wxCHECK_MSG(
editor !=
nullptr, 0, wxT(
"Cannot open/create the editor frame" ) );
202 m_frame->Kiway().OnKiCadExit();
226 bool isKicadBinary =
false;
232 isKicadBinary =
true;
235 long pid =
ExecuteFile( aExecutible, aParam, callback, isKicadBinary );
242 script.Printf( wxS(
"tell application \"System Events\" to tell application process \"%s\"\n"
243 " set frontmost to true\n"
249 wxExecute( wxString::Format(
"osascript -e '%s'", script ) );
269 wxFAIL_MSG(
"Execute(): unexpected request" );
271 if( execFile.IsEmpty() )
274 return Execute( execFile, param );
300 +
Pgm().
GetLocale()->GetName().BeforeLast(
'_' ) + wxT(
"/" );
311 const wxChar* names[2] = {
312 wxT(
"getting_started_in_kicad" ),
313 wxT(
"Getting_Started_in_KiCad" )
318 for(
auto&
name : names )
322 if( !helpFile.IsEmpty() )
328 msg = wxString::Format(
_(
"Help file '%s' or\n'%s' could not be found.\n"
329 "Do you want to access the KiCad online help?" ),
330 names[0], names[1] );
332 wxYES_NO | wxNO_DEFAULT | wxCANCEL );
334 if( dlg.ShowModal() != wxID_YES )
337 helpFile = baseUrl + names[0] + wxS(
"/" );
342 wxString base_name =
m_frame->help_name();
348 msg = wxString::Format(
_(
"Help file '%s' could not be found.\n"
349 "Do you want to access the KiCad online help?" ),
352 wxYES_NO | wxNO_DEFAULT | wxCANCEL );
354 if( dlg.ShowModal() != wxID_YES )
357 helpFile = baseUrl + base_name + wxS(
"/" );
386 msg.Printf(
_(
"Could not launch the default browser.\n"
387 "For information on how to help the KiCad project, visit %s" ),
389 wxMessageBox( msg,
_(
"Get involved with KiCad" ), wxOK,
m_frame );
401 msg.Printf(
_(
"Could not launch the default browser.\n"
402 "To donate to the KiCad project, visit %s" ),
404 wxMessageBox( msg,
_(
"Donate to KiCad" ), wxOK,
m_frame );
425 wxLaunchDefaultBrowser( url_string );
433 if(
Pgm().GetCommonSettings()->m_Api.enable_server )
438 reporter = std::make_shared<STATUSBAR_WARNING_REPORTER>( statusBar, wxS(
"plugin" ) );
450 if( !wxFileName::DirExists( dir ) )
455 wxString::Format(
_(
"Unable to create plugin directory '%s'." ),
463 wxString::Format(
_(
"Unable to open plugin directory '%s'." ),
void ShowAboutDialog(EDA_BASE_FRAME *aParent)
BASE_SCREEN class implementation.
wxString GetMajorMinorVersion()
Get only the major and minor version in a string major.minor.
wxString GetVersionInfoData(const wxString &aTitle, bool aHtml, bool aBrief)
Create a version info string for bug reports and the about dialog.
static TOOL_ACTION showCalculatorTools
static TOOL_ACTION reportBug
static TOOL_ACTION pluginsReload
static TOOL_ACTION showSymbolLibTable
static TOOL_ACTION showSymbolEditor
static TOOL_ACTION showSymbolBrowser
static TOOL_ACTION pluginsShowFolder
static TOOL_ACTION donate
static TOOL_ACTION listHotKeys
static TOOL_ACTION openPreferences
static TOOL_ACTION getInvolved
static TOOL_ACTION showFootprintLibTable
static TOOL_ACTION showDesignBlockLibTable
static TOOL_ACTION showFootprintEditor
static TOOL_ACTION configurePaths
static TOOL_ACTION showProjectManager
static TOOL_ACTION gettingStarted
static TOOL_ACTION showFootprintBrowser
void ReloadPlugins(std::optional< wxString > aDirectoryToScan=std::nullopt, std::shared_ptr< REPORTER > aReporter=nullptr)
Clears the loaded plugins and actions and re-scans the filesystem to register new ones.
int ConfigurePaths(const TOOL_EVENT &aEvent)
int ShowHelp(const TOOL_EVENT &aEvent)
EDA_BASE_FRAME * m_frame
Pointer to the currently used edit frame.
int ShowLibraryTable(const TOOL_EVENT &aEvent)
int Quit(const TOOL_EVENT &aEvent)
int ShowPluginFolder(const TOOL_EVENT &aEvent)
int ReloadPlugins(const TOOL_EVENT &aEvent)
int About(const TOOL_EVENT &aEvent)
int ListHotKeys(const TOOL_EVENT &aEvent)
static wxString m_bugReportUrl
URL to launch a new issue with pre-populated description.
int GetInvolved(const TOOL_EVENT &aEvent)
int ShowProjectManager(const TOOL_EVENT &aEvent)
int Execute(const TOOL_EVENT &aEvent)
int ReportBug(const TOOL_EVENT &aEvent)
int ShowPlayer(const TOOL_EVENT &aEvent)
int Donate(const TOOL_EVENT &aEvent)
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
int OpenPreferences(const TOOL_EVENT &aEvent)
static wxString m_bugReportTemplate
Issue template to use for reporting bugs (this should not be translated)
void setTransitions() override
Sets up handlers for various events.
The base frame for deriving all KiCad main window classes.
std::string Escape(const std::string &aUrl)
Escapes a string for use as a URL.
KISTATUSBAR is a wxStatusBar suitable for Kicad manager.
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
wxWindow * GetBlockingDialog()
Gets the window pointer to the blocking dialog (to send it signals)
static wxString GetUserPluginsPath()
Gets the user path for plugins.
static bool EnsurePathExists(const wxString &aPath, bool aPathToFile=false)
Attempts to create a given path if it does not exist.
virtual API_PLUGIN_MANAGER & GetPluginManager() const
virtual wxLocale * GetLocale()
void OnTerminate(int pid, int status) override
TERMINATE_HANDLER(const wxString &appName)
bool WarnUserIfOperatingSystemUnsupported()
Checks if the operating system is explicitly unsupported and displays a disclaimer message box.
#define URL_DOCUMENTATION
void showFrame(EDA_BASE_FRAME *aFrame)
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
#define KICAD_MESSAGE_DIALOG
bool GetAssociatedDocument(wxWindow *aParent, const wxString &aDocName, PROJECT *aProject, SEARCH_STACK *aPaths, std::vector< EMBEDDED_FILES * > aFilesStack)
Open a document (file) with the suitable browser.
This file is part of the common library.
const wxString EESCHEMA_EXE
const wxString GERBVIEW_EXE
const wxString PL_EDITOR_EXE
const wxString BITMAPCONVERTER_EXE
const wxString PCBNEW_EXE
const wxString PCB_CALCULATOR_EXE
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
@ DIALOG_PCB_LIBRARY_TABLE
@ DIALOG_SCH_LIBRARY_TABLE
@ DIALOG_DESIGN_BLOCK_LIBRARY_TABLE
int ExecuteFile(const wxString &aEditorName, const wxString &aFileName, wxProcess *aCallback, bool aFileForKicad)
Call the executable file aEditorName with the parameter aFileName.
void DisplayHotkeyList(EDA_BASE_FRAME *aParent)
Display the current hotkey list.
bool LaunchExternal(const wxString &aPath)
Launches the given file or folder in the host OS.
PGM_BASE & Pgm()
The global program "get" accessor.
wxString SearchHelpFileFullPath(const wxString &aBaseName)
Return the help file's full path.
Implement a participant in the KIWAY alchemy.
IFACE KIFACE_BASE kiface("pcb_test_frame", KIWAY::FACE_PCB)
IbisParser parser & reporter
KIBIS top(path, &reporter)