mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
DolphinWX: Break up ConfigMain.cpp into separate classes
Prior to this, ConfigMain.cpp was a large (52KB) cpp file that contained all of the UI setting code. This breaks up the config code into subclasses of wxPanel, which are then just instantiated to add to the settings wxNoteBook. This keeps all the settings categories separated from one another and also cleans up the code in general.
This commit is contained in:
51
Source/Core/DolphinWX/Config/ConfigMain.h
Normal file
51
Source/Core/DolphinWX/Config/ConfigMain.h
Normal file
@ -0,0 +1,51 @@
|
||||
// Copyright 2013 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/dialog.h>
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
class wxNotebook;
|
||||
class wxPanel;
|
||||
class wxWindow;
|
||||
|
||||
class CConfigMain : public wxDialog
|
||||
{
|
||||
public:
|
||||
|
||||
CConfigMain(wxWindow* parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& title = _("Dolphin Configuration"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
virtual ~CConfigMain();
|
||||
|
||||
void SetSelectedTab(int tab);
|
||||
|
||||
enum
|
||||
{
|
||||
ID_NOTEBOOK = 1000,
|
||||
ID_GENERALPAGE,
|
||||
ID_DISPLAYPAGE,
|
||||
ID_AUDIOPAGE,
|
||||
ID_GAMECUBEPAGE,
|
||||
ID_WIIPAGE,
|
||||
ID_PATHSPAGE,
|
||||
ID_ADVANCEDPAGE,
|
||||
};
|
||||
|
||||
private:
|
||||
void CreateGUIControls();
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void OnOk(wxCommandEvent& event);
|
||||
|
||||
wxNotebook* Notebook;
|
||||
|
||||
bool bRefreshList;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
};
|
Reference in New Issue
Block a user