mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-06-14 01:47:40 +00:00
Cleaning GUI files
This commit is contained in:
parent
ff6b1980c9
commit
7178f18ab8
37 changed files with 6078 additions and 6279 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
}
|
|
@ -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();
|
||||
|
||||
};
|
||||
|
|
@ -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()
|
||||
{
|
||||
}
|
|
@ -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();
|
||||
|
||||
};
|
||||
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
EngineTab::EngineTab(wxWindow *parent, uciadapter::UCI *engine,
|
||||
std::string engine_path_or_name)
|
||||
: EngineTabBF(parent), TabInfos(TabInfos::ENGINE),
|
||||
: TabEngine(parent), TabInfos(TabInfos::ENGINE),
|
||||
enginePath(engine_path_or_name), engine(engine) {
|
||||
SetLabel("New Engine");
|
||||
|
||||
|
@ -30,7 +30,7 @@ EngineTab::EngineTab(wxWindow *parent, uciadapter::UCI *engine,
|
|||
}
|
||||
|
||||
EngineTab::EngineTab(wxWindow *parent, std::string name)
|
||||
: EngineTabBF(parent), TabInfos(TabInfos::ENGINE) {
|
||||
: TabEngine(parent), TabInfos(TabInfos::ENGINE) {
|
||||
SetLabel(name);
|
||||
engineName = name;
|
||||
confGroup = "engines/" + engineName;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include "EngineTabBF.h"
|
||||
#include "UCI.hpp"
|
||||
#include "ochess.hpp"
|
||||
|
||||
|
@ -6,7 +5,7 @@
|
|||
wxDECLARE_EVENT(CLOSE_TAB_EVENT, wxCommandEvent);
|
||||
wxDECLARE_EVENT(REFRESH_ENGINE_LIST, wxCommandEvent);
|
||||
|
||||
class EngineTab : public EngineTabBF, public TabInfos {
|
||||
class EngineTab : public TabEngine, public TabInfos {
|
||||
uciadapter::UCI *engine;
|
||||
std::string confGroup, enginePath;
|
||||
std::string engineName;
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-40-g8042f487)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "EngineTabBF.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
EngineTabBF::EngineTabBF( 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* engine_name_sizer;
|
||||
engine_name_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
engine_name_label = new wxStaticText( this, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
engine_name_label->Wrap( -1 );
|
||||
engine_name_sizer->Add( engine_name_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
engine_name = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
engine_name_sizer->Add( engine_name, 1, wxALL, 5 );
|
||||
|
||||
|
||||
main_sizer->Add( engine_name_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* engine_location_sizer;
|
||||
engine_location_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
engine_location_label = new wxStaticText( this, wxID_ANY, wxT("Location:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
engine_location_label->Wrap( -1 );
|
||||
engine_location_sizer->Add( engine_location_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
engine_location = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
|
||||
engine_location_sizer->Add( engine_location, 1, wxALL, 5 );
|
||||
|
||||
|
||||
main_sizer->Add( engine_location_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
separator_1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
main_sizer->Add( separator_1, 0, wxEXPAND | wxALL, 5 );
|
||||
|
||||
params_label = new wxStaticText( this, wxID_ANY, wxT("Parameters:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
params_label->Wrap( -1 );
|
||||
main_sizer->Add( params_label, 0, wxALL, 5 );
|
||||
|
||||
engine_parameters = new wxPropertyGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_DEFAULT_STYLE|wxPG_SPLITTER_AUTO_CENTER);
|
||||
main_sizer->Add( engine_parameters, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
save_button = new wxButton( this, ENGINE_SAVE_CONF_BUTTON, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
main_sizer->Add( save_button, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
delete_button = new wxButton( this, ENGINE_DELETE_CONF_BUTTON, wxT("Delete engine"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
main_sizer->Add( delete_button, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( main_sizer );
|
||||
this->Layout();
|
||||
}
|
||||
|
||||
EngineTabBF::~EngineTabBF()
|
||||
{
|
||||
}
|
|
@ -1,59 +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/textctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/propgrid/propgrid.h>
|
||||
#include <wx/propgrid/advprops.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define ENGINE_SAVE_CONF_BUTTON 1000
|
||||
#define ENGINE_DELETE_CONF_BUTTON 1001
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class EngineTabBF
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class EngineTabBF : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* engine_name_label;
|
||||
wxTextCtrl* engine_name;
|
||||
wxStaticText* engine_location_label;
|
||||
wxTextCtrl* engine_location;
|
||||
wxStaticLine* separator_1;
|
||||
wxStaticText* params_label;
|
||||
wxPropertyGrid* engine_parameters;
|
||||
wxButton* save_button;
|
||||
wxButton* delete_button;
|
||||
|
||||
public:
|
||||
|
||||
EngineTabBF( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~EngineTabBF();
|
||||
|
||||
};
|
||||
|
|
@ -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();
|
||||
|
||||
};
|
||||
|
521
src/gui.cpp
Normal file
521
src/gui.cpp
Normal file
|
@ -0,0 +1,521 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-40-g8042f487)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "gui.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
||||
menu_bar = new wxMenuBar( 0 );
|
||||
menu_file = new wxMenu();
|
||||
menu_bar->Append( menu_file, wxT("Files") );
|
||||
|
||||
menu_game = new wxMenu();
|
||||
menu_bar->Append( menu_game, wxT("Game") );
|
||||
|
||||
menu_db = new wxMenu();
|
||||
menu_bar->Append( menu_db, wxT("Database") );
|
||||
|
||||
menu_engine = new wxMenu();
|
||||
menu_bar->Append( menu_engine, wxT("Engine") );
|
||||
|
||||
this->SetMenuBar( menu_bar );
|
||||
|
||||
status_bar = this->CreateStatusBar( 1, wxSTB_SIZEGRIP, wxID_ANY );
|
||||
wxBoxSizer* main_sizer;
|
||||
main_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
notebook = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_DEFAULT_STYLE );
|
||||
|
||||
main_sizer->Add( notebook, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( main_sizer );
|
||||
this->Layout();
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
}
|
||||
|
||||
MainFrame::~MainFrame()
|
||||
{
|
||||
}
|
||||
|
||||
DialogLiveEngine::DialogLiveEngine( 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 );
|
||||
}
|
||||
|
||||
DialogLiveEngine::~DialogLiveEngine()
|
||||
{
|
||||
}
|
||||
|
||||
DialogAppendGame::DialogAppendGame( 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, 0 );
|
||||
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 );
|
||||
}
|
||||
|
||||
DialogAppendGame::~DialogAppendGame()
|
||||
{
|
||||
}
|
||||
|
||||
TabEngine::TabEngine( 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* engine_name_sizer;
|
||||
engine_name_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
engine_name_label = new wxStaticText( this, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
engine_name_label->Wrap( -1 );
|
||||
engine_name_sizer->Add( engine_name_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
engine_name = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
engine_name_sizer->Add( engine_name, 1, wxALL, 5 );
|
||||
|
||||
|
||||
main_sizer->Add( engine_name_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* engine_location_sizer;
|
||||
engine_location_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
engine_location_label = new wxStaticText( this, wxID_ANY, wxT("Location:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
engine_location_label->Wrap( -1 );
|
||||
engine_location_sizer->Add( engine_location_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
engine_location = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
|
||||
engine_location_sizer->Add( engine_location, 1, wxALL, 5 );
|
||||
|
||||
|
||||
main_sizer->Add( engine_location_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
separator_1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
main_sizer->Add( separator_1, 0, wxEXPAND | wxALL, 5 );
|
||||
|
||||
params_label = new wxStaticText( this, wxID_ANY, wxT("Parameters:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
params_label->Wrap( -1 );
|
||||
main_sizer->Add( params_label, 0, wxALL, 5 );
|
||||
|
||||
engine_parameters = new wxPropertyGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_DEFAULT_STYLE|wxPG_SPLITTER_AUTO_CENTER);
|
||||
main_sizer->Add( engine_parameters, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
save_button = new wxButton( this, ENGINE_SAVE_CONF_BUTTON, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
main_sizer->Add( save_button, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
delete_button = new wxButton( this, ENGINE_DELETE_CONF_BUTTON, wxT("Delete engine"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
main_sizer->Add( delete_button, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( main_sizer );
|
||||
this->Layout();
|
||||
}
|
||||
|
||||
TabEngine::~TabEngine()
|
||||
{
|
||||
}
|
||||
|
||||
PrefsEditor::PrefsEditor( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
||||
{
|
||||
wxGridSizer* main_sizer;
|
||||
main_sizer = new wxGridSizer( 10, 2, 0, 0 );
|
||||
|
||||
color_margin_label = new wxStaticText( this, wxID_ANY, wxT("Margin color"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
color_margin_label->Wrap( -1 );
|
||||
main_sizer->Add( color_margin_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
color_margin = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
|
||||
main_sizer->Add( color_margin, 0, wxALL, 5 );
|
||||
|
||||
color_scrollbar_label = new wxStaticText( this, wxID_ANY, wxT("Scrollbar color"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
color_scrollbar_label->Wrap( -1 );
|
||||
main_sizer->Add( color_scrollbar_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
color_scrollbar = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
|
||||
main_sizer->Add( color_scrollbar, 0, wxALL, 5 );
|
||||
|
||||
color_scrollbarbg_label = new wxStaticText( this, wxID_ANY, wxT("Scrollbar background color"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
color_scrollbarbg_label->Wrap( -1 );
|
||||
main_sizer->Add( color_scrollbarbg_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
color_scrollbarbg = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
|
||||
main_sizer->Add( color_scrollbarbg, 0, wxALL, 5 );
|
||||
|
||||
color_commentbg_label = new wxStaticText( this, wxID_ANY, wxT("Comments background color"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
color_commentbg_label->Wrap( -1 );
|
||||
main_sizer->Add( color_commentbg_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
color_commentbg = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
|
||||
main_sizer->Add( color_commentbg, 0, wxALL, 5 );
|
||||
|
||||
row_size_label = new wxStaticText( this, wxID_ANY, wxT("Move row size"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
row_size_label->Wrap( -1 );
|
||||
main_sizer->Add( row_size_label, 0, wxALL, 5 );
|
||||
|
||||
row_size = new wxSpinCtrl( this, wxID_ANY, wxT("50"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 30, 70, 0 );
|
||||
main_sizer->Add( row_size, 0, wxALL, 5 );
|
||||
|
||||
col_size_label = new wxStaticText( this, wxID_ANY, wxT("Move column size"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
col_size_label->Wrap( -1 );
|
||||
main_sizer->Add( col_size_label, 0, wxALL, 5 );
|
||||
|
||||
col_size = new wxSpinCtrl( this, wxID_ANY, wxT("100"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 80, 120, 0 );
|
||||
main_sizer->Add( col_size, 0, wxALL, 5 );
|
||||
|
||||
show_move_icons = new wxCheckBox( this, wxID_ANY, wxT("Show move icons"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
main_sizer->Add( show_move_icons, 0, wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( main_sizer );
|
||||
this->Layout();
|
||||
}
|
||||
|
||||
PrefsEditor::~PrefsEditor()
|
||||
{
|
||||
}
|
||||
|
||||
PrefsBoard::PrefsBoard( 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 );
|
||||
|
||||
splitter = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE );
|
||||
splitter->Connect( wxEVT_IDLE, wxIdleEventHandler( PrefsBoard::splitterOnIdle ), NULL, this );
|
||||
|
||||
board_canvas = new wxPanel( splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
options_panel = new wxPanel( splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* options_sizer;
|
||||
options_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* themes_sizer;
|
||||
themes_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* piece_theme_sizer;
|
||||
piece_theme_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
piece_theme_label = new wxStaticText( options_panel, wxID_ANY, wxT("Piece theme"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
piece_theme_label->Wrap( -1 );
|
||||
piece_theme_sizer->Add( piece_theme_label, 0, wxALL, 5 );
|
||||
|
||||
piece_theme = new wxListBox( options_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
piece_theme_sizer->Add( piece_theme, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
themes_sizer->Add( piece_theme_sizer, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* square_theme_sizer;
|
||||
square_theme_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
square_theme_label = new wxStaticText( options_panel, wxID_ANY, wxT("Square theme"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
square_theme_label->Wrap( -1 );
|
||||
square_theme_sizer->Add( square_theme_label, 0, wxALL, 5 );
|
||||
|
||||
square_theme = new wxListBox( options_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
square_theme_sizer->Add( square_theme, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
themes_sizer->Add( square_theme_sizer, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
options_sizer->Add( themes_sizer, 1, wxEXPAND, 5 );
|
||||
|
||||
show_side_badge = new wxCheckBox( options_panel, wxID_ANY, wxT("Side to play badge"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
options_sizer->Add( show_side_badge, 0, wxALL, 5 );
|
||||
|
||||
show_captures = new wxCheckBox( options_panel, wxID_ANY, wxT("Show captured pieces"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
options_sizer->Add( show_captures, 0, wxALL, 5 );
|
||||
|
||||
black_by_default = new wxCheckBox( options_panel, wxID_ANY, wxT("Black side by default"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
options_sizer->Add( black_by_default, 0, wxALL, 5 );
|
||||
|
||||
wxBoxSizer* border_radius_sizer;
|
||||
border_radius_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
border_radius_label = new wxStaticText( options_panel, wxID_ANY, wxT("Corner radius:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
border_radius_label->Wrap( -1 );
|
||||
border_radius_sizer->Add( border_radius_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
corner_radius = new wxSpinCtrl( options_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 20, 0 );
|
||||
border_radius_sizer->Add( corner_radius, 0, wxALL, 5 );
|
||||
|
||||
|
||||
options_sizer->Add( border_radius_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* board_size_sizer;
|
||||
board_size_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
board_size_label = new wxStaticText( options_panel, wxID_ANY, wxT("Board squares size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
board_size_label->Wrap( -1 );
|
||||
board_size_sizer->Add( board_size_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
square_size = new wxSpinCtrl( options_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 20, 150, 0 );
|
||||
board_size_sizer->Add( square_size, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
options_sizer->Add( board_size_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
options_panel->SetSizer( options_sizer );
|
||||
options_panel->Layout();
|
||||
options_sizer->Fit( options_panel );
|
||||
splitter->SplitHorizontally( board_canvas, options_panel, 350 );
|
||||
main_sizer->Add( splitter, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( main_sizer );
|
||||
this->Layout();
|
||||
}
|
||||
|
||||
PrefsBoard::~PrefsBoard()
|
||||
{
|
||||
}
|
||||
|
||||
TabBase::TabBase( 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();
|
||||
}
|
||||
|
||||
TabBase::~TabBase()
|
||||
{
|
||||
}
|
||||
|
||||
TabGameRightPanel::TabGameRightPanel( 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();
|
||||
}
|
||||
|
||||
TabGameRightPanel::~TabGameRightPanel()
|
||||
{
|
||||
}
|
280
src/gui.h
Normal file
280
src/gui.h
Normal file
|
@ -0,0 +1,280 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// 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/menu.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/statusbr.h>
|
||||
#include <wx/aui/auibook.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/frame.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/propgrid/propgrid.h>
|
||||
#include <wx/propgrid/advprops.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/clrpicker.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/splitter.h>
|
||||
#include <wx/notebook.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define LIVE_ENGINE_PAUSE_BUTTON 1000
|
||||
#define ID_DIALOG_CANCEL_BUTTON 1001
|
||||
#define ID_DIALOG_IMPORT_BUTTON 1002
|
||||
#define ENGINE_SAVE_CONF_BUTTON 1003
|
||||
#define ENGINE_DELETE_CONF_BUTTON 1004
|
||||
#define ID_SAVE_BUTTON 1005
|
||||
#define ID_EXPORT_BUTTON 1006
|
||||
#define ID_IMPORT_BUTTON 1007
|
||||
#define ID_DELETE_BUTTON 1008
|
||||
#define COMMENT_INPUT_BOX 1009
|
||||
#define UPDATE_BTN 1010
|
||||
#define DELETE_BTN 1011
|
||||
#define LIVE_ANALYSIS_GAME_BUTTON 1012
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class MainFrame
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class MainFrame : public wxFrame
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxMenuBar* menu_bar;
|
||||
wxMenu* menu_file;
|
||||
wxMenu* menu_game;
|
||||
wxMenu* menu_db;
|
||||
wxMenu* menu_engine;
|
||||
wxStatusBar* status_bar;
|
||||
wxAuiNotebook* notebook;
|
||||
|
||||
public:
|
||||
|
||||
MainFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("OChess"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
|
||||
|
||||
~MainFrame();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DialogLiveEngine
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DialogLiveEngine : 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:
|
||||
|
||||
DialogLiveEngine( 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 );
|
||||
|
||||
~DialogLiveEngine();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DialogAppendGame
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DialogAppendGame : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* main_label;
|
||||
wxListBox* game_list;
|
||||
wxButton* cancel_button;
|
||||
wxButton* import_button;
|
||||
|
||||
public:
|
||||
|
||||
DialogAppendGame( 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 );
|
||||
|
||||
~DialogAppendGame();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class TabEngine
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class TabEngine : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* engine_name_label;
|
||||
wxTextCtrl* engine_name;
|
||||
wxStaticText* engine_location_label;
|
||||
wxTextCtrl* engine_location;
|
||||
wxStaticLine* separator_1;
|
||||
wxStaticText* params_label;
|
||||
wxPropertyGrid* engine_parameters;
|
||||
wxButton* save_button;
|
||||
wxButton* delete_button;
|
||||
|
||||
public:
|
||||
|
||||
TabEngine( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~TabEngine();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class PrefsEditor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class PrefsEditor : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* color_margin_label;
|
||||
wxColourPickerCtrl* color_margin;
|
||||
wxStaticText* color_scrollbar_label;
|
||||
wxColourPickerCtrl* color_scrollbar;
|
||||
wxStaticText* color_scrollbarbg_label;
|
||||
wxColourPickerCtrl* color_scrollbarbg;
|
||||
wxStaticText* color_commentbg_label;
|
||||
wxColourPickerCtrl* color_commentbg;
|
||||
wxStaticText* row_size_label;
|
||||
wxSpinCtrl* row_size;
|
||||
wxStaticText* col_size_label;
|
||||
wxSpinCtrl* col_size;
|
||||
wxCheckBox* show_move_icons;
|
||||
|
||||
public:
|
||||
|
||||
PrefsEditor( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 622,420 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~PrefsEditor();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class PrefsBoard
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class PrefsBoard : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxSplitterWindow* splitter;
|
||||
wxPanel* board_canvas;
|
||||
wxPanel* options_panel;
|
||||
wxStaticText* piece_theme_label;
|
||||
wxListBox* piece_theme;
|
||||
wxStaticText* square_theme_label;
|
||||
wxListBox* square_theme;
|
||||
wxCheckBox* show_side_badge;
|
||||
wxCheckBox* show_captures;
|
||||
wxCheckBox* black_by_default;
|
||||
wxStaticText* border_radius_label;
|
||||
wxSpinCtrl* corner_radius;
|
||||
wxStaticText* board_size_label;
|
||||
wxSpinCtrl* square_size;
|
||||
|
||||
public:
|
||||
|
||||
PrefsBoard( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 756,751 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~PrefsBoard();
|
||||
|
||||
void splitterOnIdle( wxIdleEvent& )
|
||||
{
|
||||
splitter->SetSashPosition( 350 );
|
||||
splitter->Disconnect( wxEVT_IDLE, wxIdleEventHandler( PrefsBoard::splitterOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class TabBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class TabBase : 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:
|
||||
|
||||
TabBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 884,624 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~TabBase();
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class TabGameRightPanel
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class TabGameRightPanel : 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:
|
||||
|
||||
TabGameRightPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~TabGameRightPanel();
|
||||
|
||||
};
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
#include <wx/config.h>
|
||||
#include <wx/filefn.h> // Check file exists etc
|
||||
#include <wx/log.h>
|
||||
#include "gui.h"
|
||||
|
||||
#define MAINWIN ((MainWindow *)wxGetApp().GetTopWindow())
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include "BoardPrefsPanelBF.h"
|
||||
#include "game_tab/board/BoardCanvas.hpp"
|
||||
#include "ochess.hpp"
|
||||
#include <wx/combobox.h>
|
||||
|
@ -8,13 +7,13 @@
|
|||
#include <wx/spinctrl.h>
|
||||
#include <wx/stdpaths.h>
|
||||
|
||||
class BoardPrefsPanel : public BoardPrefsPanelBF {
|
||||
class BoardPrefsPanel : public PrefsBoard {
|
||||
BoardCanvas *real_board_canvas;
|
||||
wxFileName pieces_path;
|
||||
wxFileName squares_path;
|
||||
|
||||
public:
|
||||
BoardPrefsPanel(wxWindow *parent) : BoardPrefsPanelBF(parent) {
|
||||
BoardPrefsPanel(wxWindow *parent) : PrefsBoard(parent) {
|
||||
wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
real_board_canvas = new BoardCanvas((wxFrame *)board_canvas, 40, true);
|
||||
sizer->Add(real_board_canvas, 1, wxEXPAND, 5);
|
||||
|
|
|
@ -1,106 +0,0 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-40-g8042f487)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "BoardPrefsPanelBF.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BoardPrefsPanelBF::BoardPrefsPanelBF( 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 );
|
||||
|
||||
splitter = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE );
|
||||
splitter->Connect( wxEVT_IDLE, wxIdleEventHandler( BoardPrefsPanelBF::splitterOnIdle ), NULL, this );
|
||||
|
||||
board_canvas = new wxPanel( splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
options_panel = new wxPanel( splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* options_sizer;
|
||||
options_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* themes_sizer;
|
||||
themes_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* piece_theme_sizer;
|
||||
piece_theme_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
piece_theme_label = new wxStaticText( options_panel, wxID_ANY, wxT("Piece theme"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
piece_theme_label->Wrap( -1 );
|
||||
piece_theme_sizer->Add( piece_theme_label, 0, wxALL, 5 );
|
||||
|
||||
piece_theme = new wxListBox( options_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
piece_theme_sizer->Add( piece_theme, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
themes_sizer->Add( piece_theme_sizer, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* square_theme_sizer;
|
||||
square_theme_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
square_theme_label = new wxStaticText( options_panel, wxID_ANY, wxT("Square theme"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
square_theme_label->Wrap( -1 );
|
||||
square_theme_sizer->Add( square_theme_label, 0, wxALL, 5 );
|
||||
|
||||
square_theme = new wxListBox( options_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
square_theme_sizer->Add( square_theme, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
themes_sizer->Add( square_theme_sizer, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
options_sizer->Add( themes_sizer, 1, wxEXPAND, 5 );
|
||||
|
||||
show_side_badge = new wxCheckBox( options_panel, wxID_ANY, wxT("Side to play badge"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
options_sizer->Add( show_side_badge, 0, wxALL, 5 );
|
||||
|
||||
show_captures = new wxCheckBox( options_panel, wxID_ANY, wxT("Show captured pieces"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
options_sizer->Add( show_captures, 0, wxALL, 5 );
|
||||
|
||||
black_by_default = new wxCheckBox( options_panel, wxID_ANY, wxT("Black side by default"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
options_sizer->Add( black_by_default, 0, wxALL, 5 );
|
||||
|
||||
wxBoxSizer* border_radius_sizer;
|
||||
border_radius_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
border_radius_label = new wxStaticText( options_panel, wxID_ANY, wxT("Corner radius:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
border_radius_label->Wrap( -1 );
|
||||
border_radius_sizer->Add( border_radius_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
corner_radius = new wxSpinCtrl( options_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 20, 0 );
|
||||
border_radius_sizer->Add( corner_radius, 0, wxALL, 5 );
|
||||
|
||||
|
||||
options_sizer->Add( border_radius_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* board_size_sizer;
|
||||
board_size_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
board_size_label = new wxStaticText( options_panel, wxID_ANY, wxT("Board squares size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
board_size_label->Wrap( -1 );
|
||||
board_size_sizer->Add( board_size_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
square_size = new wxSpinCtrl( options_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 20, 150, 0 );
|
||||
board_size_sizer->Add( square_size, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
options_sizer->Add( board_size_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
options_panel->SetSizer( options_sizer );
|
||||
options_panel->Layout();
|
||||
options_sizer->Fit( options_panel );
|
||||
splitter->SplitHorizontally( board_canvas, options_panel, 350 );
|
||||
main_sizer->Add( splitter, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( main_sizer );
|
||||
this->Layout();
|
||||
}
|
||||
|
||||
BoardPrefsPanelBF::~BoardPrefsPanelBF()
|
||||
{
|
||||
}
|
|
@ -1,64 +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/panel.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/splitter.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class BoardPrefsPanelBF
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class BoardPrefsPanelBF : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxSplitterWindow* splitter;
|
||||
wxPanel* board_canvas;
|
||||
wxPanel* options_panel;
|
||||
wxStaticText* piece_theme_label;
|
||||
wxListBox* piece_theme;
|
||||
wxStaticText* square_theme_label;
|
||||
wxListBox* square_theme;
|
||||
wxCheckBox* show_side_badge;
|
||||
wxCheckBox* show_captures;
|
||||
wxCheckBox* black_by_default;
|
||||
wxStaticText* border_radius_label;
|
||||
wxSpinCtrl* corner_radius;
|
||||
wxStaticText* board_size_label;
|
||||
wxSpinCtrl* square_size;
|
||||
|
||||
public:
|
||||
|
||||
BoardPrefsPanelBF( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 756,751 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~BoardPrefsPanelBF();
|
||||
|
||||
void splitterOnIdle( wxIdleEvent& )
|
||||
{
|
||||
splitter->SetSashPosition( 350 );
|
||||
splitter->Disconnect( wxEVT_IDLE, wxIdleEventHandler( BoardPrefsPanelBF::splitterOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
};
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
#include "EditorPrefsPanelBF.h"
|
||||
#include "game_tab/board/BoardCanvas.hpp"
|
||||
#include "ochess.hpp"
|
||||
#include <wx/combobox.h>
|
||||
|
@ -8,10 +7,10 @@
|
|||
#include <wx/spinctrl.h>
|
||||
#include <wx/stdpaths.h>
|
||||
|
||||
class EditorPrefsPanel : public EditorPrefsPanelBF {
|
||||
class EditorPrefsPanel : public PrefsEditor {
|
||||
|
||||
public:
|
||||
EditorPrefsPanel(wxWindow *parent) : EditorPrefsPanelBF(parent) {
|
||||
EditorPrefsPanel(wxWindow *parent) : PrefsEditor(parent) {
|
||||
|
||||
// Bind(wxEVT_SPINCTRL, &BoardPrefsPanel::OnConfChange, this, wxID_ANY);
|
||||
}
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-40-g8042f487)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "EditorPrefsPanelBF.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
EditorPrefsPanelBF::EditorPrefsPanelBF( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
||||
{
|
||||
wxGridSizer* main_sizer;
|
||||
main_sizer = new wxGridSizer( 10, 2, 0, 0 );
|
||||
|
||||
color_margin_label = new wxStaticText( this, wxID_ANY, wxT("Margin color"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
color_margin_label->Wrap( -1 );
|
||||
main_sizer->Add( color_margin_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
color_margin = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
|
||||
main_sizer->Add( color_margin, 0, wxALL, 5 );
|
||||
|
||||
color_scrollbar_label = new wxStaticText( this, wxID_ANY, wxT("Scrollbar color"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
color_scrollbar_label->Wrap( -1 );
|
||||
main_sizer->Add( color_scrollbar_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
color_scrollbar = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
|
||||
main_sizer->Add( color_scrollbar, 0, wxALL, 5 );
|
||||
|
||||
color_scrollbarbg_label = new wxStaticText( this, wxID_ANY, wxT("Scrollbar background color"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
color_scrollbarbg_label->Wrap( -1 );
|
||||
main_sizer->Add( color_scrollbarbg_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
color_scrollbarbg = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
|
||||
main_sizer->Add( color_scrollbarbg, 0, wxALL, 5 );
|
||||
|
||||
color_commentbg_label = new wxStaticText( this, wxID_ANY, wxT("Comments background color"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
color_commentbg_label->Wrap( -1 );
|
||||
main_sizer->Add( color_commentbg_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
color_commentbg = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
|
||||
main_sizer->Add( color_commentbg, 0, wxALL, 5 );
|
||||
|
||||
row_size_label = new wxStaticText( this, wxID_ANY, wxT("Move row size"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
row_size_label->Wrap( -1 );
|
||||
main_sizer->Add( row_size_label, 0, wxALL, 5 );
|
||||
|
||||
row_size = new wxSpinCtrl( this, wxID_ANY, wxT("100"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 );
|
||||
main_sizer->Add( row_size, 0, wxALL, 5 );
|
||||
|
||||
col_size_label = new wxStaticText( this, wxID_ANY, wxT("Move column size"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
col_size_label->Wrap( -1 );
|
||||
main_sizer->Add( col_size_label, 0, wxALL, 5 );
|
||||
|
||||
col_size = new wxSpinCtrl( this, wxID_ANY, wxT("50"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 );
|
||||
main_sizer->Add( col_size, 0, wxALL, 5 );
|
||||
|
||||
show_move_icons = new wxCheckBox( this, wxID_ANY, wxT("Show move icons"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
main_sizer->Add( show_move_icons, 0, wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( main_sizer );
|
||||
this->Layout();
|
||||
}
|
||||
|
||||
EditorPrefsPanelBF::~EditorPrefsPanelBF()
|
||||
{
|
||||
}
|
|
@ -1,56 +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/clrpicker.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class EditorPrefsPanelBF
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class EditorPrefsPanelBF : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* color_margin_label;
|
||||
wxColourPickerCtrl* color_margin;
|
||||
wxStaticText* color_scrollbar_label;
|
||||
wxColourPickerCtrl* color_scrollbar;
|
||||
wxStaticText* color_scrollbarbg_label;
|
||||
wxColourPickerCtrl* color_scrollbarbg;
|
||||
wxStaticText* color_commentbg_label;
|
||||
wxColourPickerCtrl* color_commentbg;
|
||||
wxStaticText* row_size_label;
|
||||
wxSpinCtrl* row_size;
|
||||
wxStaticText* col_size_label;
|
||||
wxSpinCtrl* col_size;
|
||||
wxCheckBox* show_move_icons;
|
||||
|
||||
public:
|
||||
|
||||
EditorPrefsPanelBF( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 622,420 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~EditorPrefsPanelBF();
|
||||
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue