You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.8 KiB

  1. /**
  2. * This file is part of the common library
  3. * TODO brief description
  4. * @file gestfich.h
  5. * @see common.h
  6. */
  7. #ifndef __INCLUDE__GESTFICH_H__
  8. #define __INCLUDE__GESTFICH_H__ 1
  9. #include <wx/filename.h>
  10. /* Forward class declarations. */
  11. class WinEDAListBox;
  12. /**
  13. * Function OpenPDF
  14. * run the PDF viewer and display a PDF file
  15. * @param file = PDF file to open
  16. * @return true is success, false if no PDF viewer found
  17. */
  18. bool OpenPDF( const wxString& file );
  19. void OpenFile( const wxString& file );
  20. bool EDA_DirectorySelector( const wxString& Title,
  21. wxString& Path,
  22. int flag, /* reserve */
  23. wxWindow* Frame,
  24. const wxPoint& Pos );
  25. wxString EDA_FileSelector( const wxString& Title,
  26. const wxString& Path,
  27. const wxString& FileName,
  28. const wxString& Ext,
  29. const wxString& Mask,
  30. wxWindow* Frame,
  31. int flag,
  32. const bool keep_working_directory,
  33. const wxPoint& Pos = wxPoint( -1, -1 ) );
  34. /* Return file name without path or extension.
  35. *
  36. * If the path is in the default kicad path, ./ is prepended to the
  37. * file name. If the file name has the default extension, the file
  38. * name is returned without an extension.
  39. */
  40. wxString MakeReducedFileName( const wxString& fullfilename,
  41. const wxString& default_path,
  42. const wxString& default_ext );
  43. WinEDAListBox* GetFileNames( char* Directory, char* Mask );
  44. int ExecuteFile( wxWindow* frame, const wxString& ExecFile,
  45. const wxString& param = wxEmptyString );
  46. void AddDelimiterString( wxString& string );
  47. /* Find absolute path for kicad/help (or kicad/help/<language>) */
  48. wxString FindKicadHelpPath();
  49. /* Return the kicad common data path. */
  50. wxString ReturnKicadDatasPath();
  51. /* Search the executable file shortname in kicad binary path and return
  52. * full file name if found or shortname */
  53. wxString FindKicadFile( const wxString& shortname );
  54. /**
  55. * Quote return value of wxFileName::GetFullPath().
  56. *
  57. * This allows file name paths with spaces to be used as parameters to
  58. * ProcessExecute function calls.
  59. * @param fn is the filename to wrap
  60. * @param format if provided, can be used to transform the nature of the
  61. * wrapped filename to another platform.
  62. */
  63. extern wxString QuoteFullPath( wxFileName& fn,
  64. wxPathFormat format = wxPATH_NATIVE );
  65. #endif /* __INCLUDE__GESTFICH_H__ */