KiCad PCB EDA Suite
gestfich.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2009-2014 Jerry Jacobs
5  * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.TXT for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef GESTFICH_H
26 #define GESTFICH_H
27 
28 #include <wx/filename.h>
29 #include <wx/process.h>
30 
31 
35 #define UNIX_STRING_DIR_SEP wxT( "/" )
36 #define WIN_STRING_DIR_SEP wxT( "\\" )
37 
38 /* Forward class declarations. */
39 class EDA_LIST_DIALOG;
40 
41 
48 bool OpenPDF( const wxString& file );
49 void OpenFile( const wxString& file );
50 
51 void PrintFile( const wxString& file );
52 bool CanPrintFile( const wxString& file );
53 
59 void KiCopyFile( const wxString& aSrcPath, const wxString& aDestPath, wxString& aErrors );
60 
64 int ExecuteFile( const wxString& aEditorName, const wxString& aFileName = wxEmptyString,
65  wxProcess* aCallback = nullptr );
66 
72 void QuoteString( wxString& string );
73 
84 wxString FindKicadFile( const wxString& shortname );
85 
96 extern wxString QuoteFullPath( wxFileName& fn, wxPathFormat format = wxPATH_NATIVE );
97 
98 #endif /* GESTFICH_H */
wxString FindKicadFile(const wxString &shortname)
Search the executable file shortname in KiCad binary path and return full file name if found or short...
Definition: gestfich.cpp:51
int ExecuteFile(const wxString &aEditorName, const wxString &aFileName=wxEmptyString, wxProcess *aCallback=nullptr)
Call the executable file aEditorName with the parameter aFileName.
Definition: gestfich.cpp:114
bool OpenPDF(const wxString &file)
Run the PDF viewer and display a PDF file.
Definition: gestfich.cpp:158
A dialog which shows:
void OpenFile(const wxString &file)
Definition: gestfich.cpp:209
bool CanPrintFile(const wxString &file)
Definition: gestfich.cpp:320
void PrintFile(const wxString &file)
Definition: gestfich.cpp:314
void QuoteString(wxString &string)
Add un " to the start and the end of string (if not already done).
Definition: gestfich.cpp:41
wxString QuoteFullPath(wxFileName &fn, wxPathFormat format=wxPATH_NATIVE)
Quote return value of wxFileName::GetFullPath().
Definition: gestfich.cpp:341
void KiCopyFile(const wxString &aSrcPath, const wxString &aDestPath, wxString &aErrors)
Definition: gestfich.cpp:326