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-2014 KiCad Developers, see CHANGELOG.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 
33 #ifndef __INCLUDE__GESTFICH_H__
34 #define __INCLUDE__GESTFICH_H__ 1
35 
36 #include <wx/filename.h>
37 #include <wx/process.h>
38 
39 
43 #define UNIX_STRING_DIR_SEP wxT( "/" )
44 #define WIN_STRING_DIR_SEP wxT( "\\" )
45 
46 /* Forward class declarations. */
47 class EDA_LIST_DIALOG;
48 
49 
56 bool OpenPDF( const wxString& file );
57 
58 void OpenFile( const wxString& file );
59 
74 bool EDA_PATH_SELECTOR( const wxString& aTitle,
75  wxString& aPath,
76  int aFlags, /* reserve */
77  wxWindow* aParent,
78  const wxPoint& aPosition = wxDefaultPosition );
79 
100 wxString EDA_FILE_SELECTOR( const wxString& aTitle,
101  const wxString& aPath,
102  const wxString& aFileName,
103  const wxString& aExtension,
104  const wxString& aWildcard,
105  wxWindow* aParent,
106  int aStyle,
107  const bool aKeepWorkingDirectory,
108  const wxPoint& aPosition = wxDefaultPosition,
109  wxString* aMruPath = NULL );
110 
111 EDA_LIST_DIALOG* GetFileNames( char* Directory, char* Mask );
112 
113 
118 int ExecuteFile( wxWindow* frame, const wxString& ExecFile,
119  const wxString& param = wxEmptyString, wxProcess *callback = NULL );
120 
126 void AddDelimiterString( wxString& string );
127 
139 wxString KicadDatasPath();
140 
152 wxString FindKicadFile( const wxString& shortname );
153 
163 extern wxString QuoteFullPath( wxFileName& fn, wxPathFormat format = wxPATH_NATIVE );
164 
165 #endif /* __INCLUDE__GESTFICH_H__ */
wxString FindKicadFile(const wxString &shortname)
Function FindKicadFile searches the executable file shortname in KiCad binary path and return full fi...
Definition: gestfich.cpp:146
bool OpenPDF(const wxString &file)
Function OpenPDF run the PDF viewer and display a PDF file.
Definition: gestfich.cpp:345
EDA_LIST_DIALOG * GetFileNames(char *Directory, char *Mask)
void AddDelimiterString(wxString &string)
Function AddDelimiterString Add un " to the start and the end of string (if not already done)...
Definition: gestfich.cpp:44
class EDA_LIST_DIALOG
void OpenFile(const wxString &file)
Definition: gestfich.cpp:392
wxString KicadDatasPath()
Function KicadDatasPath returns the data path common to KiCad.
Definition: gestfich.cpp:239
bool EDA_PATH_SELECTOR(const wxString &aTitle, wxString &aPath, int aFlags, wxWindow *aParent, const wxPoint &aPosition=wxDefaultPosition)
Function EDA_PATH_SELECTOR.
Definition: gestfich.cpp:54
wxString QuoteFullPath(wxFileName &fn, wxPathFormat format=wxPATH_NATIVE)
Quote return value of wxFileName::GetFullPath().
Definition: gestfich.cpp:417
int ExecuteFile(wxWindow *frame, const wxString &ExecFile, const wxString &param=wxEmptyString, wxProcess *callback=NULL)
Function ExecuteFile calls the executable file ExecFile with the command line parameters param...
Definition: gestfich.cpp:208
wxString EDA_FILE_SELECTOR(const wxString &aTitle, const wxString &aPath, const wxString &aFileName, const wxString &aExtension, const wxString &aWildcard, wxWindow *aParent, int aStyle, const bool aKeepWorkingDirectory, const wxPoint &aPosition=wxDefaultPosition, wxString *aMruPath=NULL)
Function EDA_FILE_SELECTOR.
Definition: gestfich.cpp:82