/home/enzo/treballs/fib/pfc/nanocomp/src/fileManagerView.cpp

Go to the documentation of this file.
00001 /*
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *   This program is distributed in the hope that it will be useful,       *
00009  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00010  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00011  *   GNU General Public License for more details.                          *
00012  *                                                                         *
00013  *   You should have received a copy of the GNU General Public License     *
00014  *   along with this program; if not, write to the                         *
00015  *   Free Software Foundation, Inc.,                                       *
00016  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00017                                                                           */
00018 
00019 // $Revision: 1.2 $
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 }

Generated on Fri Sep 1 23:55:13 2006 for NanoComp by  doxygen 1.4.6