aboutsummaryrefslogtreecommitdiff
path: root/src/MainWindow.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-26 12:30:07 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-26 12:30:07 +0100
commite0a1894928abb8361f959a147066e94e2cda996b (patch)
tree1ce31d0dda368d6b1c5527aa28d11543e620ee1e /src/MainWindow.cpp
parent3b6e7d39cf2d03f2e43c249ece6da32f1f8030a7 (diff)
Improve database game import
Diffstat (limited to 'src/MainWindow.cpp')
-rw-r--r--src/MainWindow.cpp12
1 files changed, 12 insertions, 0 deletions
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<TabInfos *> MainWindow::ListTabInfos() {
+ std::vector<TabInfos *> tinfos;
+ for (int i = 0; i < notebook->GetPageCount(); i++) {
+ tinfos.push_back(dynamic_cast<TabInfos *>(notebook->GetPage(i)));
+ }
+ return (tinfos);
+}
+
void MainWindow::OnClose(wxCloseEvent &e) {
if (prefsEditor != NULL) {
prefsEditor->Dismiss();