#include <frmSums.hpp>
Collaboration diagram for frmSums:
Public Member Functions | |
bool | closeAfterInitFromCmdLine (bool error, bool warning) |
Checks if the window should be closed after initialisation from the command line. | |
frmSums (const wxChar *title) | |
Creates a new frame. | |
frmSums (const wxChar *title, int xpos, int ypos, int width, int height) | |
Creates a new frame. | |
frmSums () | |
Creates a new frame. | |
void | initializeFromCmdLine (bool &error, bool &warning) |
Initializes some parameters from the command line. | |
virtual | ~frmSums () |
The class descructor. | |
Protected Types | |
enum | { STB_STATUS = wxID_HIGHEST + 1, LVW_SUMS, ITM_FILE_NEW, ITM_FILE_OPEN, MNU_FILE_OPENRECENT, ITM_FILE_OPENRECENT1, ITM_FILE_OPENRECENT2, ITM_FILE_OPENRECENT3, ITM_FILE_OPENRECENT4, ITM_FILE_OPENRECENT5, ITM_FILE_OPENRECENT6, ITM_FILE_OPENRECENT7, ITM_FILE_OPENRECENT8, ITM_FILE_OPENRECENT9, ITM_FILE_OPENRECENT10, ITM_FILE_OPENRECENT11, ITM_FILE_OPENRECENT12, ITM_FILE_OPENRECENT13, ITM_FILE_OPENRECENT14, ITM_FILE_OPENRECENT15, ITM_FILE_OPENRECENT16, ITM_FILE_SAVE, ITM_FILE_SAVEAS, ITM_FILE_CLOSE, ITM_FILE_QUIT, ITM_SUMS_ADDFILES, ITM_SUMS_ADDDIRECTORIES, ITM_SUMS_ADDMATCHINGFILES, ITM_SUMS_REMOVE, ITM_SUMS_CHECK, ITM_SUMS_RECOMPUTE, ITM_SUMS_SORTBY, ITM_SUMS_SORTBY_FILENAME, ITM_SUMS_SORTBY_DIRECTORY, ITM_SUMS_SORTBY_CHECKSUMVALUE, ITM_SUMS_SORTBY_STATE, ITM_SUMS_SORTBY_SEPARATOR1, ITM_SUMS_SORTBY_ASCENDING, ITM_SUMS_SORTBY_DESCENDING, ITM_SUMS_SORTBY_NONE, ITM_SUMS_SELECTALL, ITM_SUMS_INVERTSELECTION, ITM_TOOLS_CHECK_MULTIPLE, ITM_TOOLS_BATCH_CREATION, ITM_TOOLS_SHOW_TOOLBAR, ITM_TOOLS_SHOW_STATUSBAR, ITM_TOOLS_CONFIGURE, ITM_HELP_ABOUT } |
Controls IDs. More... | |
Protected Member Functions | |
void | addFileNameToOpenRecent (const wxString &fileName) |
Adds a name of file to the open recent submenu. | |
int | checkFileBeforeClose () |
Checks if the current checksums' file has been saved before closing it. | |
void | createControls () |
Creates and initializes the controls of the frame. | |
void | createStatusbar () |
Creates the status bar. | |
void | createToolbar () |
Creates the tools bar. | |
void | FrameCharHook (wxKeyEvent &event) |
Event handler for a keypressed. | |
void | FrameClose (wxCloseEvent &event) |
Event handler to respond to system close events. | |
wxString | getOpenRecentFileName (const int id) |
Gets the name of the file corresponding to the given identifier. | |
void | initializeOpenRecent () |
Initializes the open recent files. | |
void | itmFileCloseClick (wxCommandEvent &event) |
Processes menu File->Close. | |
void | itmFileNewClick (wxCommandEvent &event) |
Processes menu File->New. | |
void | itmFileOpenClick (wxCommandEvent &event) |
Processes menu File->Open. | |
void | itmFileOpenRecentClick (wxCommandEvent &event) |
Processes menu File->Open recent. | |
void | itmFileQuitClick (wxCommandEvent &event) |
Processes menu File->Quit. | |
void | itmFileSaveAsClick (wxCommandEvent &event) |
Processes menu File->Save as. | |
void | itmFileSaveClick (wxCommandEvent &event) |
Processes menu File->Save. | |
void | itmHelpAboutClick (wxCommandEvent &event) |
Processes menu Help->About. | |
void | itmSumsAddDirectoriesClick (wxCommandEvent &event) |
Processes menu Sums->Add directories... | |
void | itmSumsAddFilesClick (wxCommandEvent &event) |
Processes menu Sums->Add files... | |
void | itmSumsAddMatchingFilesClick (wxCommandEvent &event) |
Processes menu Sums->Add directories... | |
void | itmSumsCheckClick (wxCommandEvent &event) |
Processes menu Sums->Check. | |
void | itmSumsInvertSelectionClick (wxCommandEvent &event) |
Processes menu Sums->Invert selection. | |
void | itmSumsRecomputeClick (wxCommandEvent &event) |
Processes menu Sums->Recompute. | |
void | itmSumsRemoveClick (wxCommandEvent &event) |
Processes menu Sums->Remove... | |
void | itmSumsSelectAllClick (wxCommandEvent &event) |
Processes menu Sums->Select all. | |
void | itmSumsSortByClick (wxCommandEvent &event) |
Processes menu Sums->Sort by... | |
void | itmSumsSortByUpdate () |
Update the state of the Sort by... | |
void | itmToolsBatchCreationClick (wxCommandEvent &event) |
Processes menu Tools->Batch creation of checksums' files. | |
void | itmToolsCheckMultipleClick (wxCommandEvent &event) |
Processes menu Tools->Check multiple checksum's files. | |
void | itmToolsConfigureClick (wxCommandEvent &event) |
Processes menu Tools->Configure. | |
void | itmToolsShowStatusbarClick (wxCommandEvent &event) |
Processes menu Tools->Show statusbar. | |
void | itmToolsShowToolbarClick (wxCommandEvent &event) |
Processes menu Tools->Show toolbar. | |
void | lvwSumsColumnClick (wxListEvent &event) |
Processes a click on a header of a column of the list of checksums. | |
void | OnOpenRecentAddFile (wxCommandEvent &event) |
Processes the EVENT_OPEN_RECENT_ADD_FILE event. | |
void | OnUpdateStatusBar (wxCommandEvent &event) |
Processes the EVENT_UPDATE_SUMS_FRAME_STATUSBAR_COMMAND event. | |
void | OnUpdateTitle (wxCommandEvent &event) |
Processes the EVENT_UPDATE_SUMS_FRAME_TITLE_COMMAND event. | |
bool | saveChecksumFile (const wxString &fileName) |
Saves the current ckecksums file. | |
void | updateTitle () |
Sets the frame title. | |
Static Protected Member Functions | |
wxString | getOpenRecentConfigKey (const int n) |
Gets the configuration key for the last files' names open recently. | |
int | getOpenRecentHistoryMaxSize () |
Gets the number of maximal files in the open recent history. | |
Protected Attributes | |
ChecksumsListView * | lvwSums |
The listview which displays information about checksums. | |
wxMenu * | mnuOpenRecent |
Open recent sub menu. | |
wxArrayString | openRecent |
Open recent files. | |
wxStatusBar * | stbStatus |
The status bar. | |
wxToolBar * | tlbTools |
The tools bar. | |
Static Protected Attributes | |
const int | TOOL_BITMAP_SIZE = 24 |
The maximum size of a toolbar button. |
Definition at line 47 of file frmSums.hpp.
|
Controls IDs.
Definition at line 181 of file frmSums.hpp. |
|
Creates a new frame.
Definition at line 164 of file frmSums.cpp. |
|
Creates a new frame.
Definition at line 180 of file frmSums.cpp. References createControls(), and frmSUMS_STYLE. |
|
Creates a new frame. Use system defaults for the position and the size of the window.
Definition at line 194 of file frmSums.cpp. References createControls(), and frmSUMS_STYLE. |
|
The class descructor.
Definition at line 468 of file frmSums.cpp. |
|
Adds a name of file to the open recent submenu. If the file is already in the list it is moved on the first position. If the list is full, the most older entry is erased.
Definition at line 776 of file frmSums.cpp. References addFileNameToOpenRecent(), getOpenRecentHistoryMaxSize(), mnuOpenRecent, and openRecent. Referenced by addFileNameToOpenRecent(), initializeFromCmdLine(), initializeOpenRecent(), OnOpenRecentAddFile(), and saveChecksumFile(). |
|
Checks if the current checksums' file has been saved before closing it.
Definition at line 711 of file frmSums.cpp. References APP_NAME, SumFile::getFileName(), SumFile::getModified(), ChecksumsListView::getSumFile(), lvwSums, and saveChecksumFile(). Referenced by FrameClose(), itmFileCloseClick(), itmFileNewClick(), itmFileOpenClick(), and itmFileOpenRecentClick(). |
|
Checks if the window should be closed after initialisation from the command line.
Definition at line 594 of file frmSums.cpp. References closeAfterInitFromCmdLine(), DisplayGUI, AppPrefs::get(), ChecksumsListView::getStates(), lvwSums, AppPrefs::readBool(), and AppPrefs::readLong(). Referenced by closeAfterInitFromCmdLine(), and CkSumsApp::OnInit(). |
|
Creates and initializes the controls of the frame.
Definition at line 205 of file frmSums.cpp. References addMenuItemWithBitmap(), APP_NAME, createStatusbar(), createToolbar(), AppPrefs::get(), AppPrefs::getDefaultMainWindowRect(), initializeOpenRecent(), itmSumsSortByUpdate(), LVW_SUMS_NBCOLS, lvwSums, mnuOpenRecent, AppPrefs::readBool(), AppPrefs::readLong(), AppPrefs::readPoint(), AppPrefs::readSize(), ChecksumsListView::setColumns(), ChecksumsListView::setColumnToSort(), stbStatus, tlbTools, and updateTitle(). Referenced by frmSums(). |
|
Creates the status bar.
Definition at line 448 of file frmSums.cpp. References stbStatus. Referenced by createControls(). |
|
Creates the tools bar.
Definition at line 413 of file frmSums.cpp. References APP_NAME, tlbTools, and TOOL_BITMAP_SIZE. Referenced by createControls(). |
|
Event handler for a keypressed.
Definition at line 1611 of file frmSums.cpp. References FrameCharHook(). Referenced by FrameCharHook(). |
|
Event handler to respond to system close events.
Definition at line 1544 of file frmSums.cpp. References APP_NAME, checkFileBeforeClose(), FrameClose(), AppPrefs::get(), ChecksumsListView::getColumns(), ChecksumsListView::getColumnToSort(), SumFile::getModified(), getOpenRecentConfigKey(), ChecksumsListView::getSortOrder(), ChecksumsListView::getSumFile(), LVW_SUMS_NBCOLS, lvwSums, openRecent, AppPrefs::readBool(), updateTitle(), and AppPrefs::write(). Referenced by FrameClose(). |
|
Gets the configuration key for the last files' names open recently.
Definition at line 851 of file frmSums.cpp. References getOpenRecentConfigKey(), and getOpenRecentHistoryMaxSize(). Referenced by FrameClose(), getOpenRecentConfigKey(), and initializeOpenRecent(). |
|
Gets the name of the file corresponding to the given identifier.
Definition at line 833 of file frmSums.cpp. References getOpenRecentFileName(), and openRecent. Referenced by getOpenRecentFileName(), and itmFileOpenRecentClick(). |
|
Gets the number of maximal files in the open recent history.
Definition at line 867 of file frmSums.cpp. Referenced by addFileNameToOpenRecent(), getOpenRecentConfigKey(), and initializeOpenRecent(). |
|
Initializes some parameters from the command line. Open a file if one has been given in the command line.
Definition at line 484 of file frmSums.cpp. References addFileNameToOpenRecent(), ChecksumsListView::addFiles(), APP_NAME, ChecksumsListView::check(), AppPrefs::get(), CmdLineOptions::getchecksumsFileType(), ChecksumsListView::getSumFile(), initializeFromCmdLine(), lvwSums, ChecksumsListView::openChecksumFile(), AppPrefs::readBool(), AppPrefs::readLong(), ChecksumsListView::reformat(), SumFile::setModified(), ChecksumsListView::setSumFile(), updateTitle(), and SumFile::write(). Referenced by initializeFromCmdLine(), and CkSumsApp::OnInit(). |
|
Initializes the open recent files. Loads the list from the preferences file and add the entries to the menu. Definition at line 753 of file frmSums.cpp. References addFileNameToOpenRecent(), getOpenRecentConfigKey(), and getOpenRecentHistoryMaxSize(). Referenced by createControls(). |
|
Processes menu File->Close.
Definition at line 1031 of file frmSums.cpp. References checkFileBeforeClose(), ChecksumsListView::getSumFile(), itmFileCloseClick(), lvwSums, ChecksumsListView::setSumFile(), and updateTitle(). Referenced by itmFileCloseClick(). |
|
Processes menu File->New.
Definition at line 879 of file frmSums.cpp. References checkFileBeforeClose(), AppPrefs::get(), dlgNewFile::getFileName(), dlgNewFile::getFileType(), itmFileNewClick(), lvwSums, SumFile::setFileName(), ChecksumsListView::setSumFile(), updateTitle(), and AppPrefs::write(). Referenced by itmFileNewClick(). |
|
Processes menu File->Open.
Definition at line 914 of file frmSums.cpp. References checkFileBeforeClose(), AppPrefs::get(), wxFileDialogFilterMaker::GetFilters(), itmFileOpenClick(), lvwSums, ChecksumsListView::openChecksumFile(), AppPrefs::readString(), and AppPrefs::write(). Referenced by itmFileOpenClick(). |
|
Processes menu File->Open recent.
Definition at line 949 of file frmSums.cpp. References APP_NAME, checkFileBeforeClose(), SumFile::getFileName(), getOpenRecentFileName(), ChecksumsListView::getSumFile(), itmFileOpenRecentClick(), lvwSums, and ChecksumsListView::openChecksumFile(). Referenced by itmFileOpenRecentClick(). |
|
Processes menu File->Quit.
Definition at line 1052 of file frmSums.cpp. References itmFileQuitClick(). Referenced by itmFileQuitClick(). |
|
Processes menu File->Save as.
Definition at line 988 of file frmSums.cpp. References AppPrefs::get(), SumFile::getFileType(), wxFileDialogFilterMaker::GetFilters(), ChecksumsListView::getSumFile(), SumFileFactory::getSumFilesCount(), itmFileSaveAsClick(), lvwSums, AppPrefs::readString(), saveChecksumFile(), updateTitle(), and AppPrefs::write(). Referenced by itmFileSaveAsClick(). |
|
Processes menu File->Save.
Definition at line 974 of file frmSums.cpp. References SumFile::getFileName(), SumFile::getModified(), ChecksumsListView::getSumFile(), itmFileSaveClick(), lvwSums, and saveChecksumFile(). Referenced by itmFileSaveClick(). |
|
Processes menu Help->About.
Definition at line 1530 of file frmSums.cpp. References itmHelpAboutClick(). Referenced by itmHelpAboutClick(). |
|
Processes menu Sums->Add directories...
Definition at line 1077 of file frmSums.cpp. References itmSumsAddDirectoriesClick(), lvwSums, ChecksumsListView::selectDirectoriesToAdd(), and updateTitle(). Referenced by itmSumsAddDirectoriesClick(). |
|
Processes menu Sums->Add files...
Definition at line 1064 of file frmSums.cpp. References itmSumsAddFilesClick(), lvwSums, ChecksumsListView::selectFilesToAdd(), and updateTitle(). Referenced by itmSumsAddFilesClick(). |
|
Processes menu Sums->Add directories...
Definition at line 1090 of file frmSums.cpp. References itmSumsAddMatchingFilesClick(), lvwSums, ChecksumsListView::selectMatchingFilesToAdd(), and updateTitle(). Referenced by itmSumsAddMatchingFilesClick(). |
|
Processes menu Sums->Check.
Definition at line 1116 of file frmSums.cpp. References ChecksumsListView::check(), itmSumsCheckClick(), lvwSums, and updateTitle(). Referenced by itmSumsCheckClick(). |
|
Processes menu Sums->Invert selection.
Definition at line 1262 of file frmSums.cpp. References ChecksumsListView::invertSelection(), itmSumsInvertSelectionClick(), and lvwSums. Referenced by itmSumsInvertSelectionClick(). |
|
Processes menu Sums->Recompute.
Definition at line 1130 of file frmSums.cpp. References itmSumsRecomputeClick(), lvwSums, ChecksumsListView::recompute(), and updateTitle(). Referenced by itmSumsRecomputeClick(). |
|
Processes menu Sums->Remove...
Definition at line 1103 of file frmSums.cpp. References itmSumsRemoveClick(), lvwSums, ChecksumsListView::removeSelectedChecksums(), and updateTitle(). Referenced by itmSumsRemoveClick(). |
|
Processes menu Sums->Select all.
Definition at line 1250 of file frmSums.cpp. References itmSumsSelectAllClick(), lvwSums, and ChecksumsListView::selectAll(). Referenced by itmSumsSelectAllClick(). |
|
Processes menu Sums->Sort by...
Definition at line 1143 of file frmSums.cpp. References ChecksumsListView::getColumns(), itmSumsSortByClick(), LVW_SUMS_NBCOLS, lvwSums, ChecksumsListView::setColumnToSort(), ChecksumsListView::setSortOrder(), and ChecksumsListView::sort(). Referenced by itmSumsSortByClick(). |
|
Update the state of the Sort by... submenu. Checks the menus items corresponding to the new sort order and column. Definition at line 1200 of file frmSums.cpp. References ChecksumsListView::getColumns(), ChecksumsListView::getColumnToSort(), ChecksumsListView::getSortOrder(), LVW_SUMS_NBCOLS, and lvwSums. Referenced by createControls(), and lvwSumsColumnClick(). |
|
Processes menu Tools->Batch creation of checksums' files.
Definition at line 1296 of file frmSums.cpp. References dlgBatchCreationConf::getChecksumsFileTypeToCreate(), dlgFilesSelector::getFileNames(), dlgBatchCreationConf::getOptions(), dlgBatchCreationConf::initialize(), and itmToolsBatchCreationClick(). Referenced by itmToolsBatchCreationClick(). |
|
Processes menu Tools->Check multiple checksum's files.
Definition at line 1274 of file frmSums.cpp. References dlgFilesSelector::getFileNames(), dlgFilesSelector::initialize(), and itmToolsCheckMultipleClick(). Referenced by itmToolsCheckMultipleClick(). |
|
|
Processes menu Tools->Show statusbar.
Definition at line 1346 of file frmSums.cpp. References AppPrefs::get(), itmToolsShowStatusbarClick(), stbStatus, and AppPrefs::write(). Referenced by itmToolsShowStatusbarClick(). |
|
Processes menu Tools->Show toolbar.
Definition at line 1324 of file frmSums.cpp. References AppPrefs::get(), itmToolsShowToolbarClick(), tlbTools, and AppPrefs::write(). Referenced by itmToolsShowToolbarClick(). |
|
Processes a click on a header of a column of the list of checksums.
Definition at line 1639 of file frmSums.cpp. References ChecksumsListView::getColumnToSort(), ChecksumsListView::getSortOrder(), itmSumsSortByUpdate(), lvwSums, lvwSumsColumnClick(), ChecksumsListView::setColumnToSort(), ChecksumsListView::setSortOrder(), and ChecksumsListView::sort(). Referenced by lvwSumsColumnClick(). |
|
Processes the
The
Definition at line 1699 of file frmSums.cpp. References addFileNameToOpenRecent(), and OnOpenRecentAddFile(). Referenced by OnOpenRecentAddFile(). |
|
Processes the
The
Definition at line 1684 of file frmSums.cpp. References OnUpdateStatusBar(). Referenced by OnUpdateStatusBar(). |
|
Processes the
Definition at line 1667 of file frmSums.cpp. References OnUpdateTitle(), and updateTitle(). Referenced by OnUpdateTitle(). |
|
Saves the current ckecksums file.
Definition at line 662 of file frmSums.cpp. References addFileNameToOpenRecent(), APP_NAME, AppPrefs::get(), ChecksumsListView::getStates(), ChecksumsListView::getSumFile(), lvwSums, AppPrefs::readBool(), ChecksumsListView::reformat(), saveChecksumFile(), updateTitle(), and SumFile::write(). Referenced by checkFileBeforeClose(), itmFileSaveAsClick(), itmFileSaveClick(), and saveChecksumFile(). |
|
Sets the frame title.
Definition at line 627 of file frmSums.cpp. References APP_NAME, SumFile::getFileName(), SumFile::getFileType(), SumFile::getModified(), ChecksumsListView::getSumFile(), lvwSums, and stbStatus. Referenced by createControls(), FrameClose(), initializeFromCmdLine(), itmFileCloseClick(), itmFileNewClick(), itmFileSaveAsClick(), itmSumsAddDirectoriesClick(), itmSumsAddFilesClick(), itmSumsAddMatchingFilesClick(), itmSumsCheckClick(), itmSumsRecomputeClick(), itmSumsRemoveClick(), OnUpdateTitle(), and saveChecksumFile(). |
|
The listview which displays information about checksums.
Definition at line 105 of file frmSums.hpp. Referenced by checkFileBeforeClose(), closeAfterInitFromCmdLine(), createControls(), FrameClose(), initializeFromCmdLine(), itmFileCloseClick(), itmFileNewClick(), itmFileOpenClick(), itmFileOpenRecentClick(), itmFileSaveAsClick(), itmFileSaveClick(), itmSumsAddDirectoriesClick(), itmSumsAddFilesClick(), itmSumsAddMatchingFilesClick(), itmSumsCheckClick(), itmSumsInvertSelectionClick(), itmSumsRecomputeClick(), itmSumsRemoveClick(), itmSumsSelectAllClick(), itmSumsSortByClick(), itmSumsSortByUpdate(), itmToolsConfigureClick(), lvwSumsColumnClick(), saveChecksumFile(), and updateTitle(). |
|
Open recent sub menu.
Definition at line 108 of file frmSums.hpp. Referenced by addFileNameToOpenRecent(), and createControls(). |
|
Open recent files.
Definition at line 109 of file frmSums.hpp. Referenced by addFileNameToOpenRecent(), FrameClose(), and getOpenRecentFileName(). |
|
The status bar.
Definition at line 107 of file frmSums.hpp. Referenced by createControls(), createStatusbar(), itmToolsShowStatusbarClick(), and updateTitle(). |
|
The tools bar.
Definition at line 106 of file frmSums.hpp. Referenced by createControls(), createToolbar(), and itmToolsShowToolbarClick(). |
|
The maximum size of a toolbar button.
Definition at line 158 of file frmSums.cpp. Referenced by createToolbar(). |