mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-07 02:26:29 +02:00
Cleaning code
This commit is contained in:
parent
d6e8d80a8f
commit
53090ab2a3
11 changed files with 87 additions and 119 deletions
|
@ -1,18 +1,13 @@
|
||||||
#include "BaseGameTab.hpp"
|
#include "BaseGameTab.hpp"
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
|
|
||||||
wxDEFINE_EVENT(OPEN_GAME_EVENT, wxCommandEvent);
|
BaseGameTab::BaseGameTab(wxFrame *parent, std::shared_ptr<GameBase> base)
|
||||||
|
: TabBase_TabGames(parent),base(base) {
|
||||||
|
|
||||||
BaseGameTab::BaseGameTab(wxFrame *parent, std::shared_ptr<GameBase> base, TabInfos *main_tab)
|
|
||||||
: TabBase_TabGames(parent), main_tab(main_tab),base(base) {
|
|
||||||
|
|
||||||
glm=std::make_shared<GameListManager>(game_list);
|
glm=std::make_shared<GameListManager>(game_list);
|
||||||
Reset(base);
|
Reset(base);
|
||||||
|
|
||||||
|
|
||||||
this->Bind(wxEVT_BUTTON, &BaseGameTab::OnDelete, this, ID_DELETE_BUTTON);
|
this->Bind(wxEVT_BUTTON, &BaseGameTab::OnDelete, this, ID_DELETE_BUTTON);
|
||||||
this->Bind(wxEVT_LIST_ITEM_ACTIVATED, &BaseGameTab::OnOpenGame, this, wxID_ANY);
|
|
||||||
this->Bind(wxEVT_BUTTON, &BaseGameTab::OnApplyFilter, this, ID_APPLY_FILTER_BUTTON);
|
this->Bind(wxEVT_BUTTON, &BaseGameTab::OnApplyFilter, this, ID_APPLY_FILTER_BUTTON);
|
||||||
this->Bind(wxEVT_TEXT_ENTER, &BaseGameTab::OnApplyFilter, this, ID_SEARCH_TERMS);
|
this->Bind(wxEVT_TEXT_ENTER, &BaseGameTab::OnApplyFilter, this, ID_SEARCH_TERMS);
|
||||||
|
|
||||||
|
@ -28,15 +23,6 @@ void BaseGameTab::OnApplyFilter(wxCommandEvent &event){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseGameTab::OnImport(wxCommandEvent &event) {
|
|
||||||
// AppendGameDialog *dia = new AppendGameDialog(this, base);
|
|
||||||
// dia->ShowModal();
|
|
||||||
// glm->Clear();
|
|
||||||
// deleted.clear();
|
|
||||||
// edited.clear();
|
|
||||||
// LoadFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BaseGameTab::OnDelete(wxCommandEvent &event) {
|
void BaseGameTab::OnDelete(wxCommandEvent &event) {
|
||||||
for(auto i: glm->GetSelectedItems()){
|
for(auto i: glm->GetSelectedItems()){
|
||||||
deleted.push_back(glm->GetItemGameId(i));
|
deleted.push_back(glm->GetItemGameId(i));
|
||||||
|
@ -44,56 +30,25 @@ void BaseGameTab::OnDelete(wxCommandEvent &event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseGameTab::OnSave(wxCommandEvent &event) {
|
std::shared_ptr<Game> BaseGameTab::OpenGame(long gameid, long item) {
|
||||||
// std::vector<std::shared_ptr<GameBase>> new_games_bases;
|
if(edited.find(gameid) != edited.end()){
|
||||||
|
// TODO: Focus on the game tab and if close reopen it
|
||||||
// // Build edited games vector
|
wxLogDebug("Already opened!");
|
||||||
// std::vector<std::shared_ptr<Game>> edited_games;
|
}
|
||||||
// for (auto itr = edited.begin(); itr != edited.end(); itr++) {
|
else {
|
||||||
// edited_games.push_back(itr->second);
|
std::shared_ptr<Game> g = base->GetGame(gameid);
|
||||||
// }
|
if(g){
|
||||||
|
edited[gameid]=g;
|
||||||
// // Combine new_games and edited games
|
deleted.push_back(gameid);
|
||||||
// std::vector<std::shared_ptr<Game>> new_games;
|
glm->MarkItemAsOpen(item);
|
||||||
// new_games.insert(
|
return g;
|
||||||
// new_games.end(), edited_games.begin(),
|
|
||||||
// edited_games.end()); // Add edited game (since they are also deleted)
|
|
||||||
// base->Save(deleted, new_games_bases, new_games);
|
|
||||||
|
|
||||||
// // Close all opened games in this database
|
|
||||||
// wxCommandEvent closeLinkedTabEvent(CLOSE_LINKED_TAB, GetId());
|
|
||||||
// closeLinkedTabEvent.SetClientData(main_tab);
|
|
||||||
// ProcessEvent(closeLinkedTabEvent);
|
|
||||||
|
|
||||||
// glm->Clear();
|
|
||||||
// edited.clear();
|
|
||||||
// deleted.clear();
|
|
||||||
// LoadFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BaseGameTab::OnOpenGame(wxListEvent &event) {
|
|
||||||
long id = std::stoi(event.GetItem().GetText().ToStdString());
|
|
||||||
std::shared_ptr<Game> *g = new std::shared_ptr<Game>(base->GetGame(id));
|
|
||||||
wxLogDebug("kjkj");
|
|
||||||
|
|
||||||
if (g != NULL) {
|
|
||||||
if(edited.find(id) != edited.end()){
|
|
||||||
// TODO: Focus on the game tab and if close reopen it
|
|
||||||
wxLogDebug("Already opened!");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
wxLogDebug("Open game");
|
|
||||||
edited[id]=*g;
|
|
||||||
deleted.push_back(id);
|
|
||||||
glm->MarkItemAsOpen(event.GetIndex());
|
|
||||||
wxCommandEvent openGameEvent(OPEN_GAME_EVENT, GetId());
|
|
||||||
openGameEvent.SetEventObject(this);
|
|
||||||
openGameEvent.SetClientData(g);
|
|
||||||
ProcessEvent(openGameEvent);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::vector<std::shared_ptr<Game>> BaseGameTab::GetEditedGames(){
|
std::vector<std::shared_ptr<Game>> BaseGameTab::GetEditedGames(){
|
||||||
std::vector<std::shared_ptr<Game>> games;
|
std::vector<std::shared_ptr<Game>> games;
|
||||||
for(auto it = edited.begin(); it != edited.end(); it++){
|
for(auto it = edited.begin(); it != edited.end(); it++){
|
||||||
|
@ -123,21 +78,5 @@ void BaseGameTab::Reset(std::shared_ptr<GameBase> base){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseGameTab::OnExport(wxCommandEvent &event) {
|
|
||||||
// wxFileDialog openFileDialog(this, _("Export database"), "", "",
|
|
||||||
// "Database files (*.pgn)|*.pgn",
|
|
||||||
// wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
|
||||||
// if (openFileDialog.ShowModal() != wxID_CANCEL) {
|
|
||||||
// std::string path = openFileDialog.GetPath().ToStdString();
|
|
||||||
// wxFileName file(base_file);
|
|
||||||
// wxString ext = file.GetExt().Lower();
|
|
||||||
// GameBase *base;
|
|
||||||
// if (ext == "pgn") {
|
|
||||||
// base = new PGNGameBase(path);
|
|
||||||
// base->Export(this->base);
|
|
||||||
// delete base;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,30 +3,25 @@
|
||||||
#include "gamebase/PGNGameBase.hpp"
|
#include "gamebase/PGNGameBase.hpp"
|
||||||
#include "GameListManager.hpp"
|
#include "GameListManager.hpp"
|
||||||
|
|
||||||
// Foreign events
|
|
||||||
wxDECLARE_EVENT(OPEN_GAME_EVENT, wxCommandEvent);
|
|
||||||
wxDECLARE_EVENT(CLOSE_LINKED_TAB, wxCommandEvent);
|
|
||||||
|
|
||||||
class BaseGameTab : public TabBase_TabGames {
|
class BaseGameTab : public TabBase_TabGames {
|
||||||
std::shared_ptr<GameBase> base;
|
std::shared_ptr<GameBase> base;
|
||||||
|
/// @brief Old deleted games id
|
||||||
std::vector<std::uint32_t> deleted;
|
std::vector<std::uint32_t> deleted;
|
||||||
|
/// @brief Old edited game id+object
|
||||||
std::unordered_map<long, std::shared_ptr<Game>> edited;
|
std::unordered_map<long, std::shared_ptr<Game>> edited;
|
||||||
TabInfos *main_tab;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<GameListManager> glm;
|
std::shared_ptr<GameListManager> glm;
|
||||||
|
|
||||||
BaseGameTab(wxFrame *parent, std::shared_ptr<GameBase> base, TabInfos *main_tab);
|
BaseGameTab(wxFrame *parent, std::shared_ptr<GameBase> base);
|
||||||
|
|
||||||
void Reset(std::shared_ptr<GameBase> base);
|
void Reset(std::shared_ptr<GameBase> base);
|
||||||
void OnDelete(wxCommandEvent &event);
|
void OnDelete(wxCommandEvent &event);
|
||||||
void OnSave(wxCommandEvent &event);
|
|
||||||
void OnExport(wxCommandEvent &event);
|
|
||||||
void OnOpenGame(wxListEvent &event);
|
|
||||||
void OnImport(wxCommandEvent &event);
|
|
||||||
void OnApplyFilter(wxCommandEvent &event);
|
void OnApplyFilter(wxCommandEvent &event);
|
||||||
std::vector<std::shared_ptr<Game>> GetEditedGames();
|
std::vector<std::shared_ptr<Game>> GetEditedGames();
|
||||||
std::vector<std::uint32_t> GetDeletedGameIds() {return(deleted);};
|
std::vector<std::uint32_t> GetDeletedGameIds() {return(deleted);};
|
||||||
|
std::shared_ptr<Game> OpenGame(long gameid, long item);
|
||||||
|
|
||||||
std::shared_ptr<Game> GetGame() { return (std::shared_ptr<Game>(NULL)); }
|
std::shared_ptr<Game> GetGame() { return (std::shared_ptr<Game>(NULL)); }
|
||||||
std::shared_ptr<GameBase> GetBase() { return (std::shared_ptr<GameBase>(base)); };
|
std::shared_ptr<GameBase> GetBase() { return (std::shared_ptr<GameBase>(base)); };
|
||||||
};
|
};
|
|
@ -8,8 +8,7 @@ BaseTab::BaseTab(wxFrame *parent, std::string base_file)
|
||||||
base=OpenDatabase(base_file);
|
base=OpenDatabase(base_file);
|
||||||
|
|
||||||
// Games tab
|
// Games tab
|
||||||
games_tab=new BaseGameTab((wxFrame *)notebook,base,this);
|
games_tab=new BaseGameTab((wxFrame *)notebook,base);
|
||||||
glm=games_tab->glm;
|
|
||||||
notebook->AddPage(games_tab, "Games list",true); // true for selecting the tab
|
notebook->AddPage(games_tab, "Games list",true); // true for selecting the tab
|
||||||
// Import tab
|
// Import tab
|
||||||
import_tab=new BaseImportTab((wxFrame *)notebook,base,this);
|
import_tab=new BaseImportTab((wxFrame *)notebook,base,this);
|
||||||
|
@ -22,21 +21,22 @@ BaseTab::BaseTab(wxFrame *parent, std::string base_file)
|
||||||
Refresh();
|
Refresh();
|
||||||
|
|
||||||
// Bindings
|
// Bindings
|
||||||
this->Bind(OPEN_GAME_EVENT, &BaseTab::OnOpenGame, this, wxID_ANY);
|
|
||||||
this->Bind(wxEVT_BUTTON, &BaseTab::OnSave, this, ID_SAVE_BUTTON);
|
this->Bind(wxEVT_BUTTON, &BaseTab::OnSave, this, ID_SAVE_BUTTON);
|
||||||
|
this->Bind(wxEVT_LIST_ITEM_ACTIVATED, &BaseTab::OnOpenGame, this, ID_TABGAMES_GAME_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BaseTab::OnOpenGame(wxListEvent &event){
|
||||||
void BaseTab::OnOpenGame(wxCommandEvent &event){
|
long gameid=std::stol(event.GetItem().GetText().ToStdString());
|
||||||
std::shared_ptr<Game> *g = (std::shared_ptr<Game>*)event.GetClientData();
|
std::shared_ptr<Game> g = games_tab->OpenGame(gameid,event.GetIndex());
|
||||||
this->game=*g;
|
if(g){
|
||||||
|
game=g;
|
||||||
// Ask MainFrame to open a new game
|
// Ask MainFrame to open a new game
|
||||||
// TODO: Simplify that is, use wxWidget main app to do it
|
// TODO: Simplify that is, use wxWidget main app to do it
|
||||||
wxCommandEvent newGameEvent(NEW_GAME_EVENT, GetId());
|
wxCommandEvent newGameEvent(NEW_GAME_EVENT, GetId());
|
||||||
newGameEvent.SetEventObject(this);
|
newGameEvent.SetEventObject(this);
|
||||||
newGameEvent.SetClientData((TabInfos*)this);
|
newGameEvent.SetClientData((TabInfos*)this);
|
||||||
ProcessEvent(newGameEvent);
|
ProcessEvent(newGameEvent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseTab::Refresh(){
|
void BaseTab::Refresh(){
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
#include "BaseImportTab.hpp"
|
#include "BaseImportTab.hpp"
|
||||||
#include "BaseManageTab.hpp"
|
#include "BaseManageTab.hpp"
|
||||||
|
|
||||||
|
// Foreign events
|
||||||
wxDECLARE_EVENT(NEW_GAME_EVENT, wxCommandEvent);
|
wxDECLARE_EVENT(NEW_GAME_EVENT, wxCommandEvent);
|
||||||
|
wxDECLARE_EVENT(CLOSE_LINKED_TAB, wxCommandEvent);
|
||||||
|
|
||||||
class BaseTab : public TabBase, public TabInfos {
|
class BaseTab : public TabBase, public TabInfos {
|
||||||
/// @brief The opened database
|
/// @brief The opened database
|
||||||
|
@ -19,10 +21,12 @@ class BaseTab : public TabBase, public TabInfos {
|
||||||
BaseImportTab *import_tab;
|
BaseImportTab *import_tab;
|
||||||
BaseManageTab *manage_tab;
|
BaseManageTab *manage_tab;
|
||||||
|
|
||||||
|
/// @brief Database file path
|
||||||
std::string base_file;
|
std::string base_file;
|
||||||
std::shared_ptr<GameListManager> glm;
|
|
||||||
|
|
||||||
void OnOpenGame(wxCommandEvent &event);
|
/// @brief Listen events from BaseImportTab
|
||||||
|
void OnOpenGame(wxListEvent &event);
|
||||||
|
/// @brief Listen events from BaseManageTab
|
||||||
void OnSave(wxCommandEvent &event);
|
void OnSave(wxCommandEvent &event);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -74,6 +74,21 @@ void GameListManager::SortBy(short col){
|
||||||
case 1:
|
case 1:
|
||||||
std::sort(rows.begin(),rows.end(), [&](RType a, RType b){return(a.White < b.White);});
|
std::sort(rows.begin(),rows.end(), [&](RType a, RType b){return(a.White < b.White);});
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
std::sort(rows.begin(),rows.end(), [&](RType a, RType b){return(a.Black < b.Black);});
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
std::sort(rows.begin(),rows.end(), [&](RType a, RType b){return(a.Event < b.Event);});
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
std::sort(rows.begin(),rows.end(), [&](RType a, RType b){return(a.Round < b.Round);});
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
std::sort(rows.begin(),rows.end(), [&](RType a, RType b){return(a.Result < b.Result);});
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
std::sort(rows.begin(),rows.end(), [&](RType a, RType b){return(a.Eco < b.Eco);});
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
std::sort(rows.begin(),rows.end(), [&](RType a, RType b){return(a.id < b.id);});
|
std::sort(rows.begin(),rows.end(), [&](RType a, RType b){return(a.id < b.id);});
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,10 @@
|
||||||
#define BG_IMPORT(INDEX) game_list->SetItemBackgroundColour(INDEX, *wxBLUE)
|
#define BG_IMPORT(INDEX) game_list->SetItemBackgroundColour(INDEX, *wxBLUE)
|
||||||
#define DISPLAY_ALL_ROWS() {for(int i=0;i<rows.size();i++){DisplayRow(i);}}
|
#define DISPLAY_ALL_ROWS() {for(int i=0;i<rows.size();i++){DisplayRow(i);}}
|
||||||
|
|
||||||
|
///@brief Column content type
|
||||||
typedef std::string CType;
|
typedef std::string CType;
|
||||||
|
|
||||||
|
///@brief Row item content
|
||||||
typedef struct Item {
|
typedef struct Item {
|
||||||
long id;
|
long id;
|
||||||
CType White;
|
CType White;
|
||||||
|
@ -22,6 +24,10 @@ typedef struct Item {
|
||||||
CType Eco;
|
CType Eco;
|
||||||
} RType;
|
} RType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief A manager for wxListCtrl that display games
|
||||||
|
*
|
||||||
|
*/
|
||||||
class GameListManager {
|
class GameListManager {
|
||||||
long game_counter;
|
long game_counter;
|
||||||
wxListCtrl *game_list;
|
wxListCtrl *game_list;
|
||||||
|
@ -30,17 +36,25 @@ class GameListManager {
|
||||||
void DisplayRow(long id);
|
void DisplayRow(long id);
|
||||||
void ClearDisplayedRow();
|
void ClearDisplayedRow();
|
||||||
public:
|
public:
|
||||||
|
/// @brief Accessible outside (DO NOT MODIFY FROM OUTSIDE)
|
||||||
std::vector<RType> rows;
|
std::vector<RType> rows;
|
||||||
|
|
||||||
GameListManager(wxListCtrl *game_list);
|
GameListManager(wxListCtrl *game_list);
|
||||||
|
/// @brief Add a game to the list
|
||||||
long AddGame(CType White,CType Black,CType Event,CType Round, CType Result, CType Eco);
|
long AddGame(CType White,CType Black,CType Event,CType Round, CType Result, CType Eco);
|
||||||
void Clear();
|
|
||||||
void MarkItemAsOpen(long item);
|
void MarkItemAsOpen(long item);
|
||||||
void MarkItemAsDeleted(long item);
|
void MarkItemAsDeleted(long item);
|
||||||
void MarkItemAsImported(long item);
|
void MarkItemAsImported(long item);
|
||||||
|
/// @brief Clear the state of the GameListManager
|
||||||
|
void Clear();
|
||||||
|
/// @brief Return the id of the selected items
|
||||||
std::vector<long> GetSelectedItems();
|
std::vector<long> GetSelectedItems();
|
||||||
|
/// @brief Get the game id from the item id
|
||||||
long GetItemGameId(long item);
|
long GetItemGameId(long item);
|
||||||
|
/// @brief Filter the rows given terms
|
||||||
void Filter(std::string terms);
|
void Filter(std::string terms);
|
||||||
|
/// @brief Remove all filters
|
||||||
void ClearFilter();
|
void ClearFilter();
|
||||||
|
/// @brief Sort items by the given column
|
||||||
void SortBy(short col);
|
void SortBy(short col);
|
||||||
};
|
};
|
|
@ -4,7 +4,7 @@
|
||||||
std::shared_ptr<GameBase> OpenDatabase(const std::string &dbpath, bool createIfNotExist){
|
std::shared_ptr<GameBase> OpenDatabase(const std::string &dbpath, bool createIfNotExist){
|
||||||
wxFileName file(dbpath);
|
wxFileName file(dbpath);
|
||||||
wxString ext = file.GetExt().Lower();
|
wxString ext = file.GetExt().Lower();
|
||||||
bool create=createIfNotExist && !file.Exists();
|
bool create=(createIfNotExist && !file.Exists());
|
||||||
if (ext == "pgn") {
|
if (ext == "pgn") {
|
||||||
if(create)
|
if(create)
|
||||||
PGNGameBase::CreateDatabaseFile(dbpath);
|
PGNGameBase::CreateDatabaseFile(dbpath);
|
||||||
|
|
|
@ -539,7 +539,7 @@ TabBase_TabGames::TabBase_TabGames( wxWindow* parent, wxWindowID id, const wxPoi
|
||||||
|
|
||||||
main_sizer->Add( top_sizer, 0, wxEXPAND, 5 );
|
main_sizer->Add( top_sizer, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
game_list = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_REPORT );
|
game_list = new wxListCtrl( this, ID_TABGAMES_GAME_LIST, wxDefaultPosition, wxSize( -1,-1 ), wxLC_REPORT );
|
||||||
main_sizer->Add( game_list, 1, wxALL|wxEXPAND, 5 );
|
main_sizer->Add( game_list, 1, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bottom_sizer;
|
wxBoxSizer* bottom_sizer;
|
||||||
|
@ -616,7 +616,7 @@ TabBase_TabImport::TabBase_TabImport( wxWindow* parent, wxWindowID id, const wxP
|
||||||
import_from_db_button = new wxButton( this, ID_IMPORT_SELECTION, wxT("Import Selection"), wxDefaultPosition, wxDefaultSize, 0 );
|
import_from_db_button = new wxButton( this, ID_IMPORT_SELECTION, wxT("Import Selection"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
databases_sizer->Add( import_from_db_button, 0, wxALL|wxEXPAND, 5 );
|
databases_sizer->Add( import_from_db_button, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_button16 = new wxButton( this, ID_IMPORT_DB, wxT("Import all games"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_button16 = new wxButton( this, ID_IMPORT_DB, wxT("Import entire database"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
databases_sizer->Add( m_button16, 0, wxALL|wxEXPAND, 5 );
|
databases_sizer->Add( m_button16, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
|
13
src/gui.h
13
src/gui.h
|
@ -57,12 +57,13 @@
|
||||||
#define LIVE_ANALYSIS_GAME_BUTTON 1012
|
#define LIVE_ANALYSIS_GAME_BUTTON 1012
|
||||||
#define ID_SEARCH_TERMS 1013
|
#define ID_SEARCH_TERMS 1013
|
||||||
#define ID_APPLY_FILTER_BUTTON 1014
|
#define ID_APPLY_FILTER_BUTTON 1014
|
||||||
#define ID_DELETE_BUTTON 1015
|
#define ID_TABGAMES_GAME_LIST 1015
|
||||||
#define ID_IMPORT_GAME_BUTTON 1016
|
#define ID_DELETE_BUTTON 1016
|
||||||
#define ID_LOAD_BUTTON 1017
|
#define ID_IMPORT_GAME_BUTTON 1017
|
||||||
#define ID_IMPORT_SELECTION 1018
|
#define ID_LOAD_BUTTON 1018
|
||||||
#define ID_IMPORT_DB 1019
|
#define ID_IMPORT_SELECTION 1019
|
||||||
#define ID_SAVE_BUTTON 1020
|
#define ID_IMPORT_DB 1020
|
||||||
|
#define ID_SAVE_BUTTON 1021
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class MainFrame
|
/// Class MainFrame
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
long linked_id;
|
long linked_id;
|
||||||
/// @brief Set to true if this tab is attach to another one (c.f linked_id)
|
/// @brief Set to true if this tab is attach to another one (c.f linked_id)
|
||||||
bool is_linked;
|
bool is_linked;
|
||||||
TabInfos(Type type_) : type(type_), id(tab_count), is_linked(false) { tab_count++; wxLogDebug("Tabid=%d",(int)id); }
|
TabInfos(Type type_) : type(type_), id(tab_count), is_linked(false) { tab_count++; }
|
||||||
void Link(TabInfos *tab);
|
void Link(TabInfos *tab);
|
||||||
virtual void Refresh(){};
|
virtual void Refresh(){};
|
||||||
virtual void ApplyPreferences() {};
|
virtual void ApplyPreferences() {};
|
||||||
|
|
|
@ -3622,7 +3622,7 @@
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="Panel" expanded="0">
|
<object class="Panel" expanded="1">
|
||||||
<property name="aui_managed">0</property>
|
<property name="aui_managed">0</property>
|
||||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
|
@ -3645,7 +3645,7 @@
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||||
<object class="wxBoxSizer" expanded="0">
|
<object class="wxBoxSizer" expanded="1">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">main_sizer</property>
|
<property name="name">main_sizer</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
@ -5403,7 +5403,7 @@
|
||||||
<property name="font"></property>
|
<property name="font"></property>
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">ID_TABGAMES_GAME_LIST</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -6272,7 +6272,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">ID_IMPORT_DB</property>
|
<property name="id">ID_IMPORT_DB</property>
|
||||||
<property name="label">Import all games</property>
|
<property name="label">Import entire database</property>
|
||||||
<property name="margins"></property>
|
<property name="margins"></property>
|
||||||
<property name="markup">0</property>
|
<property name="markup">0</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
|
|
Loading…
Add table
Reference in a new issue