#include "BaseTab.hpp" #include BaseTab::BaseTab(wxFrame *parent) : BasePanelBF(parent), TabInfos(TabInfos::BASE), base(NULL) { wxListItem col0; col0.SetId(0); col0.SetText(_("White")); col0.SetWidth(200); game_list->InsertColumn(0, col0); wxListItem col1; col1.SetId(1); col1.SetText(_("Black")); col1.SetWidth(200); game_list->InsertColumn(1, col1); //LoadFile("/home/loic/test.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(); long itemIndex = game_list->InsertItem(0, g->GetTag("White")); // want this for col. 1 } } }