Cleaning GUI files

This commit is contained in:
Loic Guegan 2022-02-28 13:02:27 +01:00
parent ff6b1980c9
commit 7178f18ab8
37 changed files with 6078 additions and 6279 deletions

View file

@ -3,7 +3,7 @@
#include "ochess.hpp"
AppendGameDialog::AppendGameDialog(wxWindow *parent, GameBase *base)
: AppendGameDialogBF(parent), base(base) {
: DialogAppendGame(parent), base(base) {
for (TabInfos *i : MAINWIN->ListTabInfos()) {
if (i->type == TabInfos::GAME || i->type == TabInfos::BASE) {

View file

@ -1,7 +1,6 @@
#include "AppendGameDialogBF.h"
#include "gamebase/GameBase.hpp"
class AppendGameDialog : public AppendGameDialogBF {
class AppendGameDialog : public DialogAppendGame {
GameBase *base;
std::vector<TabInfos *> tinfos;

View file

@ -1,50 +0,0 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-40-g8042f487)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "AppendGameDialogBF.h"
///////////////////////////////////////////////////////////////////////////
AppendGameDialogBF::AppendGameDialogBF( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* main_sizer;
main_sizer = new wxBoxSizer( wxVERTICAL );
main_label = new wxStaticText( this, wxID_ANY, wxT("Please select games to import:"), wxDefaultPosition, wxDefaultSize, 0 );
main_label->Wrap( -1 );
main_sizer->Add( main_label, 0, wxALL|wxEXPAND, 5 );
game_list = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_MULTIPLE );
main_sizer->Add( game_list, 1, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizer5;
bSizer5 = new wxBoxSizer( wxHORIZONTAL );
bSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
cancel_button = new wxButton( this, ID_DIALOG_CANCEL_BUTTON, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer5->Add( cancel_button, 0, wxALL, 5 );
import_button = new wxButton( this, ID_DIALOG_IMPORT_BUTTON, wxT("Import"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer5->Add( import_button, 0, wxALL, 5 );
main_sizer->Add( bSizer5, 0, wxEXPAND, 5 );
this->SetSizer( main_sizer );
this->Layout();
this->Centre( wxBOTH );
}
AppendGameDialogBF::~AppendGameDialogBF()
{
}

View file

@ -1,51 +0,0 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-40-g8042f487)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/listbox.h>
#include <wx/button.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/sizer.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
#define ID_DIALOG_CANCEL_BUTTON 1000
#define ID_DIALOG_IMPORT_BUTTON 1001
///////////////////////////////////////////////////////////////////////////////
/// Class AppendGameDialogBF
///////////////////////////////////////////////////////////////////////////////
class AppendGameDialogBF : public wxDialog
{
private:
protected:
wxStaticText* main_label;
wxListBox* game_list;
wxButton* cancel_button;
wxButton* import_button;
public:
AppendGameDialogBF( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 388,263 ), long style = wxDEFAULT_DIALOG_STYLE );
~AppendGameDialogBF();
};

View file

@ -1,61 +0,0 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-40-g8042f487)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "BasePanelBF.h"
///////////////////////////////////////////////////////////////////////////
BasePanelBF::BasePanelBF( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
wxBoxSizer* main_sizer;
main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* top_sizer;
top_sizer = new wxBoxSizer( wxHORIZONTAL );
current_base = new wxStaticText( this, wxID_ANY, wxT("unknown"), wxDefaultPosition, wxDefaultSize, 0 );
current_base->Wrap( -1 );
top_sizer->Add( current_base, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
save_button = new wxButton( this, ID_SAVE_BUTTON, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 );
top_sizer->Add( save_button, 0, wxALL, 5 );
export_button = new wxButton( this, ID_EXPORT_BUTTON, wxT("Export"), wxDefaultPosition, wxDefaultSize, 0 );
top_sizer->Add( export_button, 0, wxALL, 5 );
main_sizer->Add( top_sizer, 0, wxEXPAND, 5 );
separator_1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
main_sizer->Add( separator_1, 0, wxEXPAND | wxALL, 5 );
wxBoxSizer* bottom_sizer;
bottom_sizer = new wxBoxSizer( wxHORIZONTAL );
bottom_sizer->Add( 0, 0, 1, wxEXPAND, 5 );
import_button = new wxButton( this, ID_IMPORT_BUTTON, wxT("Import games"), wxDefaultPosition, wxDefaultSize, 0 );
bottom_sizer->Add( import_button, 0, wxALL, 5 );
delete_button = new wxButton( this, ID_DELETE_BUTTON, wxT("Delete selection"), wxDefaultPosition, wxDefaultSize, 0 );
bottom_sizer->Add( delete_button, 0, wxALL, 5 );
main_sizer->Add( bottom_sizer, 0, wxEXPAND, 5 );
game_list = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_REPORT );
main_sizer->Add( game_list, 1, wxALL|wxEXPAND, 5 );
this->SetSizer( main_sizer );
this->Layout();
}
BasePanelBF::~BasePanelBF()
{
}

View file

@ -1,57 +0,0 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-40-g8042f487)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/button.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/listctrl.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
#define ID_SAVE_BUTTON 1000
#define ID_EXPORT_BUTTON 1001
#define ID_IMPORT_BUTTON 1002
#define ID_DELETE_BUTTON 1003
///////////////////////////////////////////////////////////////////////////////
/// Class BasePanelBF
///////////////////////////////////////////////////////////////////////////////
class BasePanelBF : public wxPanel
{
private:
protected:
wxStaticText* current_base;
wxButton* save_button;
wxButton* export_button;
wxStaticLine* separator_1;
wxButton* import_button;
wxButton* delete_button;
wxListCtrl* game_list;
public:
BasePanelBF( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 884,624 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~BasePanelBF();
};

View file

@ -3,7 +3,7 @@
#include <wx/filename.h>
BaseTab::BaseTab(wxFrame *parent, std::string base_file)
: BasePanelBF(parent), base_file(base_file), TabInfos(TabInfos::BASE),
: TabBase(parent), base_file(base_file), TabInfos(TabInfos::BASE),
base(NULL) {
game_list->InsertColumn(0, L"id", wxLIST_FORMAT_LEFT, 50);

View file

@ -1,5 +1,4 @@
#include "BasePanelBF.h"
#include "gamebase/GameBase.hpp"
#include "gamebase/PGNGameBase.hpp"
#include "ochess.hpp"
@ -8,7 +7,7 @@
wxDECLARE_EVENT(NEW_GAME_EVENT, wxCommandEvent);
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
class BaseTab : public BasePanelBF, public TabInfos {
class BaseTab : public TabBase, public TabInfos {
GameBase *base;
std::vector<std::uint32_t> deleted;
std::vector<Game *> edited;