Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

dlgNewFile.hpp

Go to the documentation of this file.
00001 /* 00002 * wxChecksums 00003 * Copyright (C) 2003-2004 Julien Couot 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 /** 00021 * \file dlgNewFile.hpp 00022 * New file dialog. 00023 */ 00024 00025 #ifndef INC_DLGNEWFILE_HPP 00026 #define INC_DLGNEWFILE_HPP 00027 00028 //--------------------------------------------------------------------------- 00029 // For compilers that support precompilation, includes "wx.h". 00030 #include <wx/wxprec.h> 00031 00032 #ifdef __BORLANDC__ 00033 #pragma hdrstop 00034 #endif 00035 00036 #ifndef WX_PRECOMP 00037 // Include your minimal set of headers here, or wx.h 00038 #include <wx/wx.h> 00039 #endif 00040 //--------------------------------------------------------------------------- 00041 00042 00043 /** 00044 * Dialog for choosing a new file name. 00045 */ 00046 class dlgNewFile : public wxDialog 00047 { 00048 public: 00049 // Creates a new dialog. 00050 dlgNewFile(); 00051 00052 // Creates a new dialog. 00053 dlgNewFile(wxWindow* parent); 00054 00055 // Destructor. 00056 virtual ~dlgNewFile(); 00057 00058 // Creates and initializes the controls of the dialog. 00059 void createControls(); 00060 00061 /// Enumeration of the file types 00062 enum FileType 00063 { 00064 ftSFV = 1, 00065 ftMD5 00066 }; 00067 00068 // Gets the choosen file type. 00069 FileType getFileType() const; 00070 00071 // Gets the name of the file. 00072 wxString getFileName() const; 00073 00074 00075 protected: 00076 wxRadioButton* rbxSFV; ///< Create an SFV file. 00077 wxRadioButton* rbxMD5; ///< Create an MD5 file. 00078 wxTextCtrl* txtFileName; ///< Name of the file. 00079 wxString fileName; ///< Name of the file given by the validator. 00080 00081 // Processes button Browse 00082 void btnBrowseClick(wxCommandEvent& event); 00083 00084 /// Controls IDs 00085 enum 00086 { 00087 BTN_BROWSE = wxID_HIGHEST + 1, 00088 }; 00089 00090 // A validator for the file name. 00091 class FileNameValidator; 00092 00093 DECLARE_EVENT_TABLE() 00094 00095 private: 00096 DECLARE_DYNAMIC_CLASS(dlgNewFile) 00097 }; 00098 //--------------------------------------------------------------------------- 00099 00100 #endif // INC_DLGNEWFILE_HPP

Generated on Sun May 30 13:37:44 2004 for wxChecksums by doxygen 1.3.7