mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-07-03 10:47:39 +00:00
Cleaning GUI files
This commit is contained in:
parent
ff6b1980c9
commit
7178f18ab8
37 changed files with 6078 additions and 6279 deletions
|
@ -9,7 +9,7 @@ wxDEFINE_EVENT(PREVIOUS_MOVE_EVENT, wxCommandEvent);
|
|||
wxDEFINE_EVENT(NEXT_MOVE_EVENT, wxCommandEvent);
|
||||
|
||||
EditorPanel::EditorPanel(wxFrame *parent, Game *game)
|
||||
: EditorPanelBF(parent), game(game), selected_item(-1) {
|
||||
: TabGameRightPanel(parent), game(game), selected_item(-1) {
|
||||
editor_canvas = new EditorCanvas((wxFrame *)editor_page);
|
||||
editor_canvas_sizer->Add(editor_canvas, 1, wxEXPAND);
|
||||
tags_list->InsertColumn(0, L"Name", wxLIST_FORMAT_LEFT, 200);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "../Game.hpp"
|
||||
#include "EditorCanvas.hpp"
|
||||
#include "EditorPanelBF.h"
|
||||
#include "ochess.hpp"
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/notebook.h>
|
||||
|
@ -15,7 +14,7 @@ wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
|
|||
// Foreign events
|
||||
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);
|
||||
|
||||
class EditorPanel : public EditorPanelBF {
|
||||
class EditorPanel : public TabGameRightPanel {
|
||||
Game *game;
|
||||
EditorCanvas *editor_canvas;
|
||||
long selected_item;
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-40-g8042f487)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "EditorPanelBF.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
EditorPanelBF::EditorPanelBF( 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 );
|
||||
|
||||
notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
editor_page = new wxPanel( notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
editor_page_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
editor_canvas_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
editor_page_sizer->Add( editor_canvas_sizer, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticline1 = new wxStaticLine( editor_page, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
editor_page_sizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
||||
|
||||
comment_label = new wxStaticText( editor_page, wxID_ANY, wxT("Comment:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
comment_label->Wrap( -1 );
|
||||
editor_page_sizer->Add( comment_label, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
comment_input = new wxTextCtrl( editor_page, COMMENT_INPUT_BOX, wxEmptyString, wxDefaultPosition, wxSize( -1,200 ), wxTE_MULTILINE );
|
||||
editor_page_sizer->Add( comment_input, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
editor_page->SetSizer( editor_page_sizer );
|
||||
editor_page->Layout();
|
||||
editor_page_sizer->Fit( editor_page );
|
||||
notebook->AddPage( editor_page, wxT("Editor"), false );
|
||||
tags_page = new wxPanel( notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* tags_page_sizer;
|
||||
tags_page_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* tags_list_control_sizer;
|
||||
tags_list_control_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
tagTextCtrl = new wxTextCtrl( tags_page, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
tags_list_control_sizer->Add( tagTextCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
valueTextCtrl = new wxTextCtrl( tags_page, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
tags_list_control_sizer->Add( valueTextCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer7;
|
||||
bSizer7 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
update_button = new wxButton( tags_page, UPDATE_BTN, wxT("Update"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer7->Add( update_button, 1, wxALL, 5 );
|
||||
|
||||
|
||||
tags_list_control_sizer->Add( bSizer7, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
tags_page_sizer->Add( tags_list_control_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
tags_list = new wxListCtrl( tags_page, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
|
||||
tags_page_sizer->Add( tags_list, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
delete_button = new wxButton( tags_page, DELETE_BTN, wxT("Delete selection"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
tags_page_sizer->Add( delete_button, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
tags_page->SetSizer( tags_page_sizer );
|
||||
tags_page->Layout();
|
||||
tags_page_sizer->Fit( tags_page );
|
||||
notebook->AddPage( tags_page, wxT("Tags"), false );
|
||||
engine_page = new wxPanel( notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* engine_page_sizer;
|
||||
engine_page_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
engine_list_label = new wxStaticText( engine_page, wxID_ANY, wxT("Choose the engine to use:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
engine_list_label->Wrap( -1 );
|
||||
engine_page_sizer->Add( engine_list_label, 0, wxALL, 5 );
|
||||
|
||||
engine_list = new wxListBox( engine_page, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
engine_page_sizer->Add( engine_list, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
analyze_game_button = new wxButton( engine_page, wxID_ANY, wxT("Analyze game"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
engine_page_sizer->Add( analyze_game_button, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
live_analysis_button = new wxButton( engine_page, LIVE_ANALYSIS_GAME_BUTTON, wxT("Live analysis"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
engine_page_sizer->Add( live_analysis_button, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
engine_page->SetSizer( engine_page_sizer );
|
||||
engine_page->Layout();
|
||||
engine_page_sizer->Fit( engine_page );
|
||||
notebook->AddPage( engine_page, wxT("Engine"), false );
|
||||
|
||||
main_sizer->Add( notebook, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( main_sizer );
|
||||
this->Layout();
|
||||
}
|
||||
|
||||
EditorPanelBF::~EditorPanelBF()
|
||||
{
|
||||
}
|
|
@ -1,71 +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/sizer.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/notebook.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define COMMENT_INPUT_BOX 1000
|
||||
#define UPDATE_BTN 1001
|
||||
#define DELETE_BTN 1002
|
||||
#define LIVE_ANALYSIS_GAME_BUTTON 1003
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class EditorPanelBF
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class EditorPanelBF : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxNotebook* notebook;
|
||||
wxPanel* editor_page;
|
||||
wxBoxSizer* editor_page_sizer;
|
||||
wxBoxSizer* editor_canvas_sizer;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStaticText* comment_label;
|
||||
wxTextCtrl* comment_input;
|
||||
wxPanel* tags_page;
|
||||
wxTextCtrl* tagTextCtrl;
|
||||
wxTextCtrl* valueTextCtrl;
|
||||
wxButton* update_button;
|
||||
wxListCtrl* tags_list;
|
||||
wxButton* delete_button;
|
||||
wxPanel* engine_page;
|
||||
wxStaticText* engine_list_label;
|
||||
wxListBox* engine_list;
|
||||
wxButton* analyze_game_button;
|
||||
wxButton* live_analysis_button;
|
||||
|
||||
public:
|
||||
|
||||
EditorPanelBF( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 525,485 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~EditorPanelBF();
|
||||
|
||||
};
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#include "LiveEngineDialog.hpp"
|
||||
|
||||
LiveEngineDialog::LiveEngineDialog(wxWindow *parent, std::string engine_name)
|
||||
: LiveEngineDialogFB(parent), engine_name(engine_name), interval(1000),
|
||||
: DialogLiveEngine(parent), engine_name(engine_name), interval(1000),
|
||||
engine(NULL) {
|
||||
lines_list->InsertColumn(0, "#", wxLIST_FORMAT_LEFT, 50);
|
||||
lines_list->InsertColumn(1, "CP", wxLIST_FORMAT_LEFT, 70);
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#include "LiveEngineDialogFB.h"
|
||||
#include "UCI.hpp"
|
||||
#include "ochess.hpp"
|
||||
#include <wx/timer.h>
|
||||
|
||||
class LiveEngineDialog : public LiveEngineDialogFB {
|
||||
class LiveEngineDialog : public DialogLiveEngine {
|
||||
uciadapter::UCI *engine;
|
||||
std::string engine_name;
|
||||
wxTimer timer;
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-40-g8042f487)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "LiveEngineDialogFB.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
LiveEngineDialogFB::LiveEngineDialogFB( 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 );
|
||||
|
||||
wxBoxSizer* current_engine_sizer;
|
||||
current_engine_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
current_engine_label = new wxStaticText( this, wxID_ANY, wxT("Current engine:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
current_engine_label->Wrap( -1 );
|
||||
current_engine_sizer->Add( current_engine_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
current_engine = new wxStaticText( this, wxID_ANY, wxT("???"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
current_engine->Wrap( -1 );
|
||||
current_engine_sizer->Add( current_engine, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
||||
current_engine_sizer->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
engine_stop_button = new wxButton( this, LIVE_ENGINE_PAUSE_BUTTON, wxT("Stop"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
current_engine_sizer->Add( engine_stop_button, 0, wxALL, 5 );
|
||||
|
||||
|
||||
main_sizer->Add( current_engine_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
wxGridSizer* infos_sizer;
|
||||
infos_sizer = new wxGridSizer( 0, 6, 0, 0 );
|
||||
|
||||
multipv_label = new wxStaticText( this, wxID_ANY, wxT("MultiPV:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
multipv_label->Wrap( -1 );
|
||||
infos_sizer->Add( multipv_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
multipv = new wxStaticText( this, wxID_ANY, wxT("?"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
multipv->Wrap( -1 );
|
||||
infos_sizer->Add( multipv, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
threads_label = new wxStaticText( this, wxID_ANY, wxT("Threads:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
threads_label->Wrap( -1 );
|
||||
infos_sizer->Add( threads_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
threads = new wxStaticText( this, wxID_ANY, wxT("?"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
threads->Wrap( -1 );
|
||||
infos_sizer->Add( threads, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_staticText13 = new wxStaticText( this, wxID_ANY, wxT("Depth:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText13->Wrap( -1 );
|
||||
infos_sizer->Add( m_staticText13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
depth = new wxSpinCtrl( this, wxID_ANY, wxT("30"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 10000, 0 );
|
||||
depth->Enable( false );
|
||||
|
||||
infos_sizer->Add( depth, 0, wxALL, 5 );
|
||||
|
||||
|
||||
main_sizer->Add( infos_sizer, 0, 0, 5 );
|
||||
|
||||
lines_list = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
|
||||
main_sizer->Add( lines_list, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( main_sizer );
|
||||
this->Layout();
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
}
|
||||
|
||||
LiveEngineDialogFB::~LiveEngineDialogFB()
|
||||
{
|
||||
}
|
|
@ -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/spinctrl.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define LIVE_ENGINE_PAUSE_BUTTON 1000
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class LiveEngineDialogFB
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class LiveEngineDialogFB : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* current_engine_label;
|
||||
wxStaticText* current_engine;
|
||||
wxButton* engine_stop_button;
|
||||
wxStaticText* multipv_label;
|
||||
wxStaticText* multipv;
|
||||
wxStaticText* threads_label;
|
||||
wxStaticText* threads;
|
||||
wxStaticText* m_staticText13;
|
||||
wxSpinCtrl* depth;
|
||||
wxListCtrl* lines_list;
|
||||
|
||||
public:
|
||||
|
||||
LiveEngineDialogFB( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 464,468 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
|
||||
~LiveEngineDialogFB();
|
||||
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue