From e0a1894928abb8361f959a147066e94e2cda996b Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sat, 26 Feb 2022 12:30:07 +0100 Subject: Improve database game import --- src/MainWindow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/MainWindow.cpp') diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index f9d5905..bc417b6 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -56,6 +56,10 @@ MainWindow::MainWindow() Bind(REFRESH_TAB_TITLE, &MainWindow::OnRefreshTabTitle, this, wxID_ANY); Bind(NEW_GAME_EVENT, &MainWindow::OnNewGame, this, wxID_ANY); Bind(wxEVT_CLOSE_WINDOW, &MainWindow::OnClose, this); + + /*BaseTab *bt = new BaseTab((wxFrame *)notebook, "/home/loic/hartwig.pgn"); + notebook->AddPage(bt, bt->GetLabel()); + notebook->SetSelection(notebook->GetPageIndex(bt));*/ } void MainWindow::OnSettings(wxCommandEvent &event) { @@ -77,6 +81,14 @@ void MainWindow::ApplyPreferences() { void MainWindow::OnExit(wxCommandEvent &event) { Close(true); } +std::vector MainWindow::ListTabInfos() { + std::vector tinfos; + for (int i = 0; i < notebook->GetPageCount(); i++) { + tinfos.push_back(dynamic_cast(notebook->GetPage(i))); + } + return (tinfos); +} + void MainWindow::OnClose(wxCloseEvent &e) { if (prefsEditor != NULL) { prefsEditor->Dismiss(); -- cgit v1.2.3