00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef INC_FRMSUMS_HPP
00026
#define INC_FRMSUMS_HPP
00027
00028
00029
00030
#include <wx/wxprec.h>
00031
00032
#ifdef __BORLANDC__
00033
#pragma hdrstop
00034
#endif
00035
00036
#ifndef WX_PRECOMP
00037
00038
#include <wx/wx.h>
00039
#endif
00040
#include "lvwSums.hpp"
00041
00042
00043
00044
00045
00046
00047 class frmSums :
public wxFrame
00048 {
00049
public:
00050
00051
frmSums();
00052
00053
00054
frmSums(
const wxChar* title,
int xpos,
int ypos,
int width,
int height);
00055
00056
00057
frmSums(
const wxChar* title);
00058
00059
00060
virtual ~frmSums();
00061
00062
protected:
00063
00064
void createControls();
00065
00066
00067
void createToolbar();
00068
00069
00070
void createStatusbar();
00071
00072
public:
00073
00074
void initializeFromCmdLine(
bool& error,
bool& warning);
00075
00076
00077
bool closeAfterInitFromCmdLine(
bool error,
bool warning);
00078
00079
protected:
00080
00081
void updateTitle();
00082
00083
00084
bool saveChecksumFile(
const wxString& fileName);
00085
00086
00087
int checkFileBeforeClose();
00088
00089
00090
void initializeOpenRecent();
00091
00092
00093
void addFileNameToOpenRecent(
const wxString& fileName);
00094
00095
00096 wxString
getOpenRecentFileName(
const int id);
00097
00098
00099
static wxString
getOpenRecentConfigKey(
const int n);
00100
00101
00102
static int getOpenRecentHistoryMaxSize();
00103
00104
static const int TOOL_BITMAP_SIZE;
00105 ChecksumsListView*
lvwSums;
00106 wxToolBar*
tlbTools;
00107 wxStatusBar*
stbStatus;
00108 wxMenu*
mnuOpenRecent;
00109 wxArrayString
openRecent;
00110
00111
00112
00113
void itmFileNewClick(wxCommandEvent& event);
00114
00115
void itmFileOpenClick(wxCommandEvent& event);
00116
00117
void itmFileOpenRecentClick(wxCommandEvent& event);
00118
00119
void itmFileSaveClick(wxCommandEvent& event);
00120
00121
void itmFileSaveAsClick(wxCommandEvent& event);
00122
00123
void itmFileCloseClick(wxCommandEvent& event);
00124
00125
void itmFileQuitClick(wxCommandEvent& event);
00126
00127
00128
void itmSumsAddFilesClick(wxCommandEvent& event);
00129
00130
void itmSumsAddDirectoriesClick(wxCommandEvent& event);
00131
00132
void itmSumsAddMatchingFilesClick(wxCommandEvent& event);
00133
00134
void itmSumsRemoveClick(wxCommandEvent& event);
00135
00136
void itmSumsCheckClick(wxCommandEvent& event);
00137
00138
void itmSumsRecomputeClick(wxCommandEvent& event);
00139
00140
void itmSumsSortByClick(wxCommandEvent& event);
00141
00142
void itmSumsSortByUpdate();
00143
00144
void itmSumsSelectAllClick(wxCommandEvent& event);
00145
00146
void itmSumsInvertSelectionClick(wxCommandEvent& event);
00147
00148
00149
void itmToolsCheckMultipleClick(wxCommandEvent& event);
00150
00151
void itmToolsBatchCreationClick(wxCommandEvent& event);
00152
00153
void itmToolsShowToolbarClick(wxCommandEvent& event);
00154
00155
void itmToolsShowStatusbarClick(wxCommandEvent& event);
00156
00157
void itmToolsConfigureClick(wxCommandEvent& event);
00158
00159
00160
void itmHelpAboutClick(wxCommandEvent& event);
00161
00162
00163
void FrameCharHook(wxKeyEvent& event);
00164
00165
00166
void FrameClose(wxCloseEvent& event);
00167
00168
00169
void lvwSumsColumnClick(wxListEvent& event);
00170
00171
00172
void OnUpdateTitle(wxCommandEvent& event);
00173
00174
00175
void OnUpdateStatusBar(wxCommandEvent& event);
00176
00177
00178
void OnOpenRecentAddFile(wxCommandEvent& event);
00179
00180
00181
enum
00182 {
00183 STB_STATUS = wxID_HIGHEST + 1,
00184 LVW_SUMS,
00185 ITM_FILE_NEW,
00186 ITM_FILE_OPEN,
00187 MNU_FILE_OPENRECENT,
00188 ITM_FILE_OPENRECENT1,
00189 ITM_FILE_OPENRECENT2,
00190 ITM_FILE_OPENRECENT3,
00191 ITM_FILE_OPENRECENT4,
00192 ITM_FILE_OPENRECENT5,
00193 ITM_FILE_OPENRECENT6,
00194 ITM_FILE_OPENRECENT7,
00195 ITM_FILE_OPENRECENT8,
00196 ITM_FILE_OPENRECENT9,
00197 ITM_FILE_OPENRECENT10,
00198 ITM_FILE_OPENRECENT11,
00199 ITM_FILE_OPENRECENT12,
00200 ITM_FILE_OPENRECENT13,
00201 ITM_FILE_OPENRECENT14,
00202 ITM_FILE_OPENRECENT15,
00203 ITM_FILE_OPENRECENT16,
00204 ITM_FILE_SAVE,
00205 ITM_FILE_SAVEAS,
00206 ITM_FILE_CLOSE,
00207 ITM_FILE_QUIT,
00208 ITM_SUMS_ADDFILES,
00209 ITM_SUMS_ADDDIRECTORIES,
00210 ITM_SUMS_ADDMATCHINGFILES,
00211 ITM_SUMS_REMOVE,
00212 ITM_SUMS_CHECK,
00213 ITM_SUMS_RECOMPUTE,
00214 ITM_SUMS_SORTBY,
00215 ITM_SUMS_SORTBY_FILENAME,
00216 ITM_SUMS_SORTBY_DIRECTORY,
00217 ITM_SUMS_SORTBY_CHECKSUMVALUE,
00218 ITM_SUMS_SORTBY_STATE,
00219 ITM_SUMS_SORTBY_SEPARATOR1,
00220 ITM_SUMS_SORTBY_ASCENDING,
00221 ITM_SUMS_SORTBY_DESCENDING,
00222 ITM_SUMS_SORTBY_NONE,
00223 ITM_SUMS_SELECTALL,
00224 ITM_SUMS_INVERTSELECTION,
00225 ITM_TOOLS_CHECK_MULTIPLE,
00226 ITM_TOOLS_BATCH_CREATION,
00227 ITM_TOOLS_SHOW_TOOLBAR,
00228 ITM_TOOLS_SHOW_STATUSBAR,
00229 ITM_TOOLS_CONFIGURE,
00230 ITM_HELP_ABOUT
00231 };
00232
00233 DECLARE_EVENT_TABLE()
00234
00235 private:
00236 DECLARE_DYNAMIC_CLASS(
frmSums)
00237 };
00238
00239
00240
00241 #endif