aboutsummaryrefslogtreecommitdiff
path: root/src/preferences
diff options
context:
space:
mode:
Diffstat (limited to 'src/preferences')
-rw-r--r--src/preferences/BoardPrefs.hpp5
-rw-r--r--src/preferences/BoardPrefsPanelBF.cpp106
-rw-r--r--src/preferences/BoardPrefsPanelBF.h64
-rw-r--r--src/preferences/EditorPrefs.hpp5
-rw-r--r--src/preferences/EditorPrefsPanelBF.cpp69
-rw-r--r--src/preferences/EditorPrefsPanelBF.h56
6 files changed, 4 insertions, 301 deletions
diff --git a/src/preferences/BoardPrefs.hpp b/src/preferences/BoardPrefs.hpp
index eff3b58..e0672b0 100644
--- a/src/preferences/BoardPrefs.hpp
+++ b/src/preferences/BoardPrefs.hpp
@@ -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);
diff --git a/src/preferences/BoardPrefsPanelBF.cpp b/src/preferences/BoardPrefsPanelBF.cpp
deleted file mode 100644
index 06058f9..0000000
--- a/src/preferences/BoardPrefsPanelBF.cpp
+++ /dev/null
@@ -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()
-{
-}
diff --git a/src/preferences/BoardPrefsPanelBF.h b/src/preferences/BoardPrefsPanelBF.h
deleted file mode 100644
index 0bcea9e..0000000
--- a/src/preferences/BoardPrefsPanelBF.h
+++ /dev/null
@@ -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 );
- }
-
-};
-
diff --git a/src/preferences/EditorPrefs.hpp b/src/preferences/EditorPrefs.hpp
index dab05ca..8974bfe 100644
--- a/src/preferences/EditorPrefs.hpp
+++ b/src/preferences/EditorPrefs.hpp
@@ -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);
}
diff --git a/src/preferences/EditorPrefsPanelBF.cpp b/src/preferences/EditorPrefsPanelBF.cpp
deleted file mode 100644
index 9b37d1f..0000000
--- a/src/preferences/EditorPrefsPanelBF.cpp
+++ /dev/null
@@ -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()
-{
-}
diff --git a/src/preferences/EditorPrefsPanelBF.h b/src/preferences/EditorPrefsPanelBF.h
deleted file mode 100644
index 0f3a011..0000000
--- a/src/preferences/EditorPrefsPanelBF.h
+++ /dev/null
@@ -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();
-
-};
-