aboutsummaryrefslogtreecommitdiff
path: root/src/base_tab/BaseTab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base_tab/BaseTab.cpp')
-rw-r--r--src/base_tab/BaseTab.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/base_tab/BaseTab.cpp b/src/base_tab/BaseTab.cpp
index e69de29..9c46d9b 100644
--- a/src/base_tab/BaseTab.cpp
+++ b/src/base_tab/BaseTab.cpp
@@ -0,0 +1,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();
+
+ }
+ }
+} \ No newline at end of file