diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-28 13:02:27 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-28 13:02:27 +0100 |
| commit | 7178f18ab88bcc93bfbf2019adf53d2f60d8fa20 (patch) | |
| tree | cdbe28d8de4e0774885779a85f7e8c3b7e059f30 /src/base_tab | |
| parent | ff6b1980c93140db2143b5dcad27f5cdc946632b (diff) | |
Cleaning GUI files
Diffstat (limited to 'src/base_tab')
| -rw-r--r-- | src/base_tab/AppendGameDialog.cpp | 2 | ||||
| -rw-r--r-- | src/base_tab/AppendGameDialog.hpp | 3 | ||||
| -rw-r--r-- | src/base_tab/AppendGameDialogBF.cpp | 50 | ||||
| -rw-r--r-- | src/base_tab/AppendGameDialogBF.h | 51 | ||||
| -rw-r--r-- | src/base_tab/BasePanelBF.cpp | 61 | ||||
| -rw-r--r-- | src/base_tab/BasePanelBF.h | 57 | ||||
| -rw-r--r-- | src/base_tab/BaseTab.cpp | 2 | ||||
| -rw-r--r-- | src/base_tab/BaseTab.hpp | 3 |
8 files changed, 4 insertions, 225 deletions
diff --git a/src/base_tab/AppendGameDialog.cpp b/src/base_tab/AppendGameDialog.cpp index 1ff4310..d8fe996 100644 --- a/src/base_tab/AppendGameDialog.cpp +++ b/src/base_tab/AppendGameDialog.cpp @@ -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) { diff --git a/src/base_tab/AppendGameDialog.hpp b/src/base_tab/AppendGameDialog.hpp index 551676e..fba8078 100644 --- a/src/base_tab/AppendGameDialog.hpp +++ b/src/base_tab/AppendGameDialog.hpp @@ -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; diff --git a/src/base_tab/AppendGameDialogBF.cpp b/src/base_tab/AppendGameDialogBF.cpp deleted file mode 100644 index 3f777ef..0000000 --- a/src/base_tab/AppendGameDialogBF.cpp +++ /dev/null @@ -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() -{ -} diff --git a/src/base_tab/AppendGameDialogBF.h b/src/base_tab/AppendGameDialogBF.h deleted file mode 100644 index a2c1871..0000000 --- a/src/base_tab/AppendGameDialogBF.h +++ /dev/null @@ -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(); - -}; - diff --git a/src/base_tab/BasePanelBF.cpp b/src/base_tab/BasePanelBF.cpp deleted file mode 100644 index 8af03b6..0000000 --- a/src/base_tab/BasePanelBF.cpp +++ /dev/null @@ -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() -{ -} diff --git a/src/base_tab/BasePanelBF.h b/src/base_tab/BasePanelBF.h deleted file mode 100644 index e00fc46..0000000 --- a/src/base_tab/BasePanelBF.h +++ /dev/null @@ -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(); - -}; - diff --git a/src/base_tab/BaseTab.cpp b/src/base_tab/BaseTab.cpp index fab165e..465f91f 100644 --- a/src/base_tab/BaseTab.cpp +++ b/src/base_tab/BaseTab.cpp @@ -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); diff --git a/src/base_tab/BaseTab.hpp b/src/base_tab/BaseTab.hpp index 8d01827..5eef3b1 100644 --- a/src/base_tab/BaseTab.hpp +++ b/src/base_tab/BaseTab.hpp @@ -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; |
