wxMASSManager/GUI/EvtMainFrame.h

69 lines
2.1 KiB
C
Raw Normal View History

2020-01-09 13:59:19 +01:00
#ifndef __EvtMainFrame__
#define __EvtMainFrame__
// wxMASSManager
// Copyright (C) 2020 Guillaume Jacquemin
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <string>
#include <wx/fswatcher.h>
#include "../MassManager/MassManager.h"
2020-01-09 13:59:19 +01:00
#include "MainFrame.h"
class EvtMainFrame: public MainFrame {
public:
EvtMainFrame(wxWindow* parent);
~EvtMainFrame();
auto ready() -> bool;
2020-01-09 13:59:19 +01:00
protected:
void importEvent(wxCommandEvent&);
2020-01-16 00:35:43 +01:00
void exportEvent(wxCommandEvent&);
2020-01-09 13:59:19 +01:00
void moveEvent(wxCommandEvent&);
void deleteEvent(wxCommandEvent&);
2020-01-11 14:22:20 +01:00
void backupEvent(wxCommandEvent&);
2020-01-09 13:59:19 +01:00
void openSaveDirEvent(wxCommandEvent&);
void stagingSelectionEvent(wxCommandEvent&);
2020-01-16 01:21:47 +01:00
void deleteStagedEvent(wxCommandEvent&);
void stagingButtonEvent(wxCommandEvent&);
2020-01-09 13:59:19 +01:00
void installedSelectionEvent(wxListEvent&);
void listColumnDragEvent(wxListEvent&);
void fileUpdateEvent(wxFileSystemWatcherEvent& event);
void gameCheckTimerEvent(wxTimerEvent&);
2020-01-09 13:59:19 +01:00
private:
void initialiseListView();
void isGameRunning();
2020-01-09 13:59:19 +01:00
void refreshListView();
void getActiveSlot();
2020-01-09 13:59:19 +01:00
void updateCommandsState();
void refreshHangar(int slot);
2020-01-09 13:59:19 +01:00
void infoMessage(const wxString& message);
void warningMessage(const wxString& message);
void errorMessage(const wxString& message);
MassManager _manager;
wxFileSystemWatcher _watcher;
int _lastWatcherEventType = 0;
2020-01-09 13:59:19 +01:00
};
#endif // __EvtMainFrame__