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

dlgConf.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 dlgConf.hpp 00022 * Configuration dialog. 00023 */ 00024 00025 #ifndef INC_DLGCONF_HPP 00026 #define INC_DLGCONF_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 #include <wx/splitter.h> 00041 #include <wx/treectrl.h> 00042 //--------------------------------------------------------------------------- 00043 00044 00045 /** 00046 * The configuration dialog. 00047 */ 00048 class dlgConfigure : public wxDialog 00049 { 00050 public: 00051 // Creates a new dialog. 00052 dlgConfigure(); 00053 00054 // Creates a new dialog. 00055 dlgConfigure(wxWindow* parent); 00056 00057 // Destructor. 00058 virtual ~dlgConfigure(); 00059 00060 // Creates and initializes the controls of the dialog. 00061 void createControls(); 00062 00063 public: 00064 wxSplitterWindow* sptConfigure; ///< Configuration splitter. 00065 wxTreeCtrl* trePages; ///< Configuration tree pages. 00066 00067 wxCheckBox* chkWindowSavePosition; ///< Save the window position. 00068 wxCheckBox* chkWindowSaveSize; ///< Save the window size. 00069 wxListBox* lstSumsHeaders; ///< List of the sums' list headers. 00070 wxCheckBox* chkSumsSaveColumnToSort; ///< Save the column to sort (and the order). 00071 wxCheckBox* chkSumsSaveColumnsWidths; ///< Save the widths of the columns. 00072 wxCheckBox* chkSumsDirInAbsolutePath; ///< Display directories in absolute path. 00073 wxRadioButton* rbtSumsValuesCaseUpper; ///< Display the checksums values in uppercase. 00074 wxRadioButton* rbtSumsValuesCaseLower; ///< Display the checksums values in lowercase. 00075 wxCheckBox* chkSumsHRules; ///< Draws light horizontal rules between rows. 00076 wxCheckBox* chkSumsVRules; ///< Draws light vertical rules between columns. 00077 00078 wxCheckBox* chkAutoCheckOnOpen; ///< Checks automatically the checksums file when opening it. 00079 wxCheckBox* chkDlgSumUpCheck; ///< Opens a dialog box to sum up the check. 00080 wxCheckBox* chkWarnOnInvalidWhenSaving; ///< Displays a warning if the state of all the files is not 'OK' when saving a checksums file. 00081 00082 wxListBox* lstLanguages; ///< List of the languages. 00083 00084 wxCheckBox* chkCLnVerifyDontShowGUI; ///< Don't show the GUI when all checksums are corrects. 00085 wxRadioButton* rbxCLnAppendNeverShowGUI; ///< Never show the GUI. 00086 wxRadioButton* rbxCLnAppendShowGUIOnError; ///< Show the GUI only when an error occurs. 00087 wxRadioButton* rbxCLnAppendShowGUIOnWarning; ///< Show the GUI only when an warning or an error occurs. 00088 wxRadioButton* rbxCLnAppendAlwaysGUI; ///< Always show the GUI. 00089 wxRadioButton* rbxCLnCreateNeverShowGUI; ///< Never show the GUI. 00090 wxRadioButton* rbxCLnCreateShowGUIOnError; ///< Show the GUI only when an error occurs. 00091 wxRadioButton* rbxCLnCreateShowGUIOnWarning; ///< Show the GUI only when an warning or an error occurs. 00092 wxRadioButton* rbxCLnCreateAlwaysGUI; ///< Always show the GUI. 00093 00094 wxRadioButton* rbxSFVPathSepReadAuto; ///< Path separator on reading SFV files. 00095 wxRadioButton* rbxSFVPathSepReadUnix; ///< Path separator on reading SFV files. 00096 wxRadioButton* rbxSFVPathSepReadWindows; ///< Path separator on reading SFV files. 00097 wxRadioButton* rbxSFVPathSepReadMAC; ///< Path separator on reading SFV files. 00098 wxCheckBox* chkSFVSaveGenerator; ///< Save the name of the generator and the date of creation in the comments 00099 wxChoice* cboSFVIdentifyAs; ///< Identify as selector. 00100 wxCheckBox* chkSFVSaveFilesInfo; ///< Save the size and the modification date of the files in the comments 00101 wxRadioButton* rbxSFVPathSepWriteSystem; ///< Path separator to write in SFV files. 00102 wxRadioButton* rbxSFVPathSepWriteUnix; ///< Path separator to write in SFV files. 00103 wxRadioButton* rbxSFVPathSepWriteWindows; ///< Path separator to write in SFV files. 00104 wxRadioButton* rbxSFVPathSepWriteMAC; ///< Path separator to write in SFV files. 00105 wxRadioButton* rbxSFVEOLWriteSystem; ///< End of line to write in SFV files. 00106 wxRadioButton* rbxSFVEOLWriteWindows; ///< End of line to write in SFV files. 00107 wxRadioButton* rbxSFVEOLWriteUnix; ///< End of line to write in SFV files. 00108 wxRadioButton* rbxSFVEOLWriteMAC; ///< End of line to write in SFV files. 00109 00110 wxRadioButton* rbxMD5PathSepReadAuto; ///< Path separator on reading MD5 files. 00111 wxRadioButton* rbxMD5PathSepReadUnix; ///< Path separator on reading MD5 files. 00112 wxRadioButton* rbxMD5PathSepReadWindows; ///< Path separator on reading MD5 files. 00113 wxRadioButton* rbxMD5PathSepReadMAC; ///< Path separator on reading MD5 files. 00114 wxTextCtrl* txtMD5PathSepRead; ///< Path separator on reading MD5 files. 00115 wxCheckBox* chkMD5SaveGenerator; ///< Save the name of the generator and the date of creation in the comments 00116 wxCheckBox* chkMD5SaveFilesInfo; ///< Save the size and the modification date of the files in the comments 00117 wxRadioButton* rbxMD5PathSepWriteSystem; ///< Path separator to write in MD5 files. 00118 wxRadioButton* rbxMD5PathSepWriteUnix; ///< Path separator to write in MD5 files. 00119 wxRadioButton* rbxMD5PathSepWriteWindows; ///< Path separator to write in MD5 files. 00120 wxRadioButton* rbxMD5PathSepWriteMAC; ///< Path separator to write in MD5 files. 00121 wxTextCtrl* txtMD5PathSepWrite; ///< Path separator to write in MD5 files. 00122 wxRadioButton* rbxMD5EOLWriteSystem; ///< End of line to write in MD5 files. 00123 wxRadioButton* rbxMD5EOLWriteWindows; ///< End of line to write in MD5 files. 00124 wxRadioButton* rbxMD5EOLWriteUnix; ///< End of line to write in MD5 files. 00125 wxRadioButton* rbxMD5EOLWriteMAC; ///< End of line to write in MD5 files. 00126 00127 wxCheckBox* chkMCGlobalSummary; ///< Display a global summary. 00128 wxCheckBox* chkMCChecksumsFileSummary; ///< Display a summary for each checksums' file. 00129 wxCheckBox* chkMCFileState; ///< Display the state of each checked file. 00130 wxCheckBox* chkMCNoCorrectFileState; ///< Don't display the state of the corrects files. 00131 wxBitmapButton* btnMCNormalColour; ///< Button for colour of normal text. 00132 wxBitmapButton* btnMCSuccessColour; ///< Button for colour of success text. 00133 wxBitmapButton* btnMCWarningColour; ///< Button for colour of warning text. 00134 wxBitmapButton* btnMCErrorColour; ///< Button for colour of error or failure text. 00135 wxColour MCNormalColour; ///< Colour of normal text. 00136 wxColour MCSuccessColour; ///< Colour of success text. 00137 wxColour MCWarningColour; ///< Colour of warning text. 00138 wxColour MCErrorColour; ///< Colour of error or failure text. 00139 00140 wxRadioButton* rbxBCSkipExistingCkFile; ///< Skip the file if a checksum's file already exists. 00141 wxRadioButton* rbxBCOverwriteExistingCkFile; ///< Compute the checksum and overwrite the existing checksums' file. 00142 wxRadioButton* rbxBCReplaceFileExtension; ///< Replace the extension of the file for the name of the checksums' file. 00143 wxRadioButton* rbxBCAddFileExtension; ///< Add the extension of the checksums' file to the name of the added file. 00144 wxChoice* cboBCVerbosityLevel; ///< Report's verbosity level. 00145 wxBitmapButton* btnBCNormalColour; ///< Button for colour of normal text. 00146 wxBitmapButton* btnBCSuccessColour; ///< Button for colour of success text. 00147 wxBitmapButton* btnBCWarningColour; ///< Button for colour of warning text. 00148 wxBitmapButton* btnBCErrorColour; ///< Button for colour of error or failure text. 00149 wxColour BCNormalColour; ///< Colour of normal text. 00150 wxColour BCSuccessColour; ///< Colour of success text. 00151 wxColour BCWarningColour; ///< Colour of warning text. 00152 wxColour BCErrorColour; ///< Colour of error or failure text. 00153 00154 protected: 00155 // Data for the tree of configuration pages. 00156 class TreePagesItemData; 00157 00158 /// Identifiers of the elements of the tree that contains the configuration pages. 00159 enum TreePagesId 00160 { 00161 TpInterface, 00162 TpDisplay, 00163 TpBehavior, 00164 TpLanguage, 00165 TpCmdLine, 00166 TpChecksumsFiles, 00167 TpSFVFiles, 00168 TpMD5Files, 00169 TpTools, 00170 TpMultiCheck, 00171 TpBatchCreation 00172 }; 00173 00174 /// Table that contains pointers on the pages. Index is <CODE>TreePagesId</CODE>. 00175 wxArrayPtrVoid pagesArray; 00176 00177 protected: 00178 /// Controls IDs 00179 enum 00180 { 00181 TRE_PAGES = wxID_HIGHEST + 1, 00182 LST_SUMS_HEADERS, 00183 BTN_SUMS_HEADERS_UP, 00184 BTN_SUMS_HEADERS_DOWN, 00185 CBO_SFV_IDENTIFY_AS, 00186 CHK_MC_FILE_STATE, 00187 BTN_MC_NORMAL_COLOUR, 00188 BTN_MC_SUCCESS_COLOUR, 00189 BTN_MC_WARNING_COLOUR, 00190 BTN_MC_ERROR_COLOUR, 00191 BTN_BC_NORMAL_COLOUR, 00192 BTN_BC_SUCCESS_COLOUR, 00193 BTN_BC_WARNING_COLOUR, 00194 BTN_BC_ERROR_COLOUR 00195 }; 00196 00197 // Event handler for a selection change. 00198 void trePagesSelChanged(wxTreeEvent& event); 00199 00200 // Processes button Up 00201 void btnSumsHeadersUpClick(wxCommandEvent& event); 00202 // Processes button Down 00203 void btnSumsHeadersDownClick(wxCommandEvent& event); 00204 00205 // Processes a selection in the choices of SFV generators. 00206 void cboSFVIdentifyAsSelect(wxCommandEvent& event); 00207 00208 // Processes check on the <CODE>chkMCFileState</CODE> check box. 00209 void chkMCFileStateCheck(wxCommandEvent& event); 00210 // Processes button for changing colours of the results text of the multiple check dialog. 00211 void btnMCColoursClick(wxCommandEvent& event); 00212 00213 DECLARE_EVENT_TABLE() 00214 00215 // Makes a panel that contains the title of a configuration page. 00216 wxPanel* makePageTitlePanel(wxWindow* parent, const wxString& title, int const level = 2); 00217 00218 // Adds an item in the choices of the generators identifiers on saving SFV files. 00219 int addSFVGeneratorIdentifier(const wxString& identifier); 00220 00221 public: 00222 // Gets the configuration key of the nth generator identifier on saving SFV files. 00223 wxString getSFVGeneratorIdentifierConfigKey(const int n) const; 00224 00225 // Gets the maximum size of the history of the generators identifiers on saving SFV files. 00226 int getSFVGeneratorIdentifierHistoryMaxSize() const; 00227 00228 private: 00229 DECLARE_DYNAMIC_CLASS(dlgConfigure) 00230 }; 00231 //--------------------------------------------------------------------------- 00232 00233 #endif // INC_DLGCONF_HPP

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