aboutsummaryrefslogtreecommitdiff
path: root/src/base_tab/BaseTab.cpp
blob: 9c46d9b151c50f7bc132cefb450c670851ac152a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "BaseTab.hpp"
#include <wx/filename.h>

BaseTab::BaseTab(wxFrame *parent)
    : BasePanelBF(parent), TabInfos(TabInfos::BASE), base(NULL) {
  LoadFile("/home/loic/text.PGn");
}

void BaseTab::ApplyPreferences() {}

void BaseTab::LoadFile(std::string path) {
  wxFileName file(path);
  wxString ext = file.GetExt().Lower();
  if (ext == "pgn") {
    base = new PGNGameBase(path);
  }

  if (base != NULL) {
      while(base->HasNextGame()){
          Game *g=base->GetNextGame();

      }
  }
}