00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "fileManagerView.hpp"
00023
00025
00028 FileManagerView::FileManagerView()
00029 {
00030 }
00031
00032 FileManagerView::~FileManagerView()
00033 {
00034 }
00035
00037
00043 wxString FileManagerView::openFileChoose(wxWindow* parent, wxString message, wxString wildcard)
00044 {
00045 return fileChoose(parent,
00046 message,
00047 wildcard,
00048 wxOPEN | wxFILE_MUST_EXIST | wxCHANGE_DIR);
00049 }
00050
00051
00053
00059 wxString FileManagerView::saveFileChoose(wxWindow* parent, wxString message, wxString wildcard)
00060 {
00061 return fileChoose(parent,
00062 message,
00063 wildcard,
00064 wxSAVE | wxOVERWRITE_PROMPT | wxCHANGE_DIR);
00065 }
00066
00067
00069
00076 wxString FileManagerView::fileChoose(wxWindow* parent, wxString message, wxString wildcard, long style)
00077 {
00078 wxFileDialog *fileDialog = new wxFileDialog(
00079 parent,
00080 message,
00081 _(""),
00082 _(""),
00083 wildcard,
00084 style);
00085
00086 if (fileDialog->ShowModal() == wxID_OK)
00087 {
00088 return fileDialog->GetPath();
00089 }
00090 else
00091 {
00092 return wxEmptyString;
00093 }
00094 }