mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-06-22 05:27:39 +00:00
Debug and improve preferences editor
This commit is contained in:
parent
a3c24f27f0
commit
5a43d62920
8 changed files with 182 additions and 10 deletions
|
@ -96,7 +96,6 @@ public:
|
|||
|
||||
virtual bool TransferDataFromWindow() {
|
||||
ApplyPreferences();
|
||||
MAINWIN->ApplyPreferences();
|
||||
return (true);
|
||||
}
|
||||
};
|
||||
|
|
44
src/preferences/EditorPrefs.hpp
Normal file
44
src/preferences/EditorPrefs.hpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
#include "EditorPrefsPanelBF.h"
|
||||
#include "game_tab/board/BoardCanvas.hpp"
|
||||
#include "ochess.hpp"
|
||||
#include <wx/combobox.h>
|
||||
#include <wx/dir.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/preferences.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/stdpaths.h>
|
||||
|
||||
class EditorPrefsPanel : public EditorPrefsPanelBF {
|
||||
|
||||
public:
|
||||
EditorPrefsPanel(wxWindow *parent) : EditorPrefsPanelBF(parent) {
|
||||
|
||||
// Bind(wxEVT_SPINCTRL, &BoardPrefsPanel::OnConfChange, this, wxID_ANY);
|
||||
}
|
||||
void OnConfChange(wxCommandEvent &event) {
|
||||
}
|
||||
|
||||
virtual bool TransferDataToWindow() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void ApplyPreferences() {
|
||||
|
||||
}
|
||||
|
||||
virtual bool TransferDataFromWindow() {
|
||||
|
||||
return (true);
|
||||
}
|
||||
};
|
||||
|
||||
class EditorPrefs : public wxPreferencesPage {
|
||||
public:
|
||||
virtual wxString GetName() const { return "Editor"; }
|
||||
virtual wxBitmap GetLargeIcon() {
|
||||
return wxArtProvider::GetBitmap(wxART_HELP, wxART_TOOLBAR);
|
||||
}
|
||||
virtual wxWindow *CreateWindow(wxWindow *parent) {
|
||||
return new EditorPrefsPanel(parent);
|
||||
}
|
||||
};
|
18
src/preferences/EditorPrefsPanelBF.cpp
Normal file
18
src/preferences/EditorPrefsPanelBF.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// 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 )
|
||||
{
|
||||
}
|
||||
|
||||
EditorPrefsPanelBF::~EditorPrefsPanelBF()
|
||||
{
|
||||
}
|
38
src/preferences/EditorPrefsPanelBF.h
Normal file
38
src/preferences/EditorPrefsPanelBF.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// 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>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class EditorPrefsPanelBF
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class EditorPrefsPanelBF : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
|
||||
public:
|
||||
|
||||
EditorPrefsPanelBF( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~EditorPrefsPanelBF();
|
||||
|
||||
};
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
#pragma once
|
||||
#include "BoardPrefs.hpp"
|
||||
#include "BoardPrefs.hpp"
|
||||
#include "EditorPrefs.hpp"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue