From ae5338735144c3d9e874be2421a1528729806d92 Mon Sep 17 00:00:00 2001 From: William JCM Date: Sat, 20 Jun 2020 10:39:31 +0200 Subject: [PATCH] MainFrame: add more events to handle. --- GUI/MainFrame.cpp | 6 ++++++ GUI/MainFrame.fbp | 3 +++ GUI/MainFrame.h | 2 ++ 3 files changed, 11 insertions(+) diff --git a/GUI/MainFrame.cpp b/GUI/MainFrame.cpp index 706a837..cd6a7fc 100644 --- a/GUI/MainFrame.cpp +++ b/GUI/MainFrame.cpp @@ -218,6 +218,9 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co _stagingList->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainFrame::stagingSelectionEvent ), NULL, this ); _deleteStagedButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::deleteStagedEvent ), NULL, this ); _stagingAreaButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::stagingButtonEvent ), NULL, this ); + _screenshotsList->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( MainFrame::viewScreenshotEvent ), NULL, this ); + _screenshotsList->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( MainFrame::screenshotListSelectionEvent ), NULL, this ); + _screenshotsList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrame::screenshotListSelectionEvent ), NULL, this ); _nameRadio->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainFrame::screenshotFilenameSortingEvent ), NULL, this ); _creationDateRadio->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainFrame::screenshotCreationDateSortingEvent ), NULL, this ); _ascendingRadio->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainFrame::screenshotAscendingSortingEvent ), NULL, this ); @@ -241,6 +244,9 @@ MainFrame::~MainFrame() _stagingList->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainFrame::stagingSelectionEvent ), NULL, this ); _deleteStagedButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::deleteStagedEvent ), NULL, this ); _stagingAreaButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::stagingButtonEvent ), NULL, this ); + _screenshotsList->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( MainFrame::viewScreenshotEvent ), NULL, this ); + _screenshotsList->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( MainFrame::screenshotListSelectionEvent ), NULL, this ); + _screenshotsList->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrame::screenshotListSelectionEvent ), NULL, this ); _nameRadio->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainFrame::screenshotFilenameSortingEvent ), NULL, this ); _creationDateRadio->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainFrame::screenshotCreationDateSortingEvent ), NULL, this ); _ascendingRadio->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainFrame::screenshotAscendingSortingEvent ), NULL, this ); diff --git a/GUI/MainFrame.fbp b/GUI/MainFrame.fbp index dace211..9575c6d 100644 --- a/GUI/MainFrame.fbp +++ b/GUI/MainFrame.fbp @@ -1206,6 +1206,9 @@ + viewScreenshotEvent + screenshotListSelectionEvent + screenshotListSelectionEvent diff --git a/GUI/MainFrame.h b/GUI/MainFrame.h index 19b2b95..d71fe5e 100644 --- a/GUI/MainFrame.h +++ b/GUI/MainFrame.h @@ -82,6 +82,8 @@ class MainFrame : public wxFrame virtual void stagingSelectionEvent( wxCommandEvent& event ) { event.Skip(); } virtual void deleteStagedEvent( wxCommandEvent& event ) { event.Skip(); } virtual void stagingButtonEvent( wxCommandEvent& event ) { event.Skip(); } + virtual void viewScreenshotEvent( wxListEvent& event ) { event.Skip(); } + virtual void screenshotListSelectionEvent( wxListEvent& event ) { event.Skip(); } virtual void screenshotFilenameSortingEvent( wxCommandEvent& event ) { event.Skip(); } virtual void screenshotCreationDateSortingEvent( wxCommandEvent& event ) { event.Skip(); } virtual void screenshotAscendingSortingEvent( wxCommandEvent& event ) { event.Skip(); }