Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DolphinWX: Make some UI functions/members private #2331

Merged
merged 2 commits into from
Apr 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions Source/Core/DolphinWX/ControllerConfigDiag.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,52 +20,59 @@ class ControllerConfigDiag : public wxDialog
public:
ControllerConfigDiag(wxWindow* const parent);

private:
void RefreshRealWiimotes(wxCommandEvent& event);

void ConfigEmulatedWiimote(wxCommandEvent& event);

void SelectSource(wxCommandEvent& event);
void RevertSource();

void ConfigEmulatedWiimote(wxCommandEvent& event);
void Save(wxCommandEvent& event);

void OnSensorBarPos(wxCommandEvent& event)
{
SConfig::GetInstance().m_SYSCONF->SetData("BT.BAR", event.GetInt());
event.Skip();
}

void OnSensorBarSensitivity(wxCommandEvent& event)
{
SConfig::GetInstance().m_SYSCONF->SetData("BT.SENS", event.GetInt());
event.Skip();
}

void OnSpeakerVolume(wxCommandEvent& event)
{
SConfig::GetInstance().m_SYSCONF->SetData("BT.SPKV", event.GetInt());
event.Skip();
}

void OnMotor(wxCommandEvent& event)
{
SConfig::GetInstance().m_SYSCONF->SetData("BT.MOT", event.GetInt());
event.Skip();
}

void OnContinuousScanning(wxCommandEvent& event)
{
SConfig::GetInstance().m_WiimoteContinuousScanning = event.IsChecked();
WiimoteReal::Initialize();
event.Skip();
}

void OnEnableSpeaker(wxCommandEvent& event)
{
SConfig::GetInstance().m_WiimoteEnableSpeaker = event.IsChecked();
event.Skip();
}

void OnGameCubeAdapter(wxCommandEvent& event)
{
SConfig::GetInstance().m_GameCubeAdapter = event.IsChecked();
event.Skip();
}

private:
wxStaticBoxSizer* CreateGamecubeSizer();
wxStaticBoxSizer* CreateWiimoteConfigSizer();
wxStaticBoxSizer* CreateBalanceBoardSizer();
Expand Down
21 changes: 11 additions & 10 deletions Source/Core/DolphinWX/Debugger/CodeView.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,10 @@ class CCodeView : public wxControl
public:
CCodeView(DebugInterface* debuginterface, SymbolDB *symbol_db,
wxWindow* parent, wxWindowID Id = wxID_ANY);
void OnPaint(wxPaintEvent& event);
void OnErase(wxEraseEvent& event);
void OnScrollWheel(wxMouseEvent& event);
void OnMouseDown(wxMouseEvent& event);
void OnMouseMove(wxMouseEvent& event);
void OnMouseUpL(wxMouseEvent& event);
void OnMouseUpR(wxMouseEvent& event);
void OnPopupMenu(wxCommandEvent& event);
void InsertBlrNop(int);

void ToggleBreakpoint(u32 address);

u32 GetSelection()
u32 GetSelection() const
{
return m_selection;
}
Expand All @@ -60,6 +51,16 @@ class CCodeView : public wxControl
}

private:
void OnPaint(wxPaintEvent& event);
void OnErase(wxEraseEvent& event);
void OnScrollWheel(wxMouseEvent& event);
void OnMouseDown(wxMouseEvent& event);
void OnMouseMove(wxMouseEvent& event);
void OnMouseUpL(wxMouseEvent& event);
void OnMouseUpR(wxMouseEvent& event);
void OnPopupMenu(wxCommandEvent& event);
void InsertBlrNop(int);

void RaiseEvent();
int YToAddress(int y);

Expand Down
22 changes: 10 additions & 12 deletions Source/Core/DolphinWX/Debugger/CodeWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ class CCodeWindow : public wxPanel
void UpdateManager();

// Menu bar
// -------------------
void OnCPUMode(wxCommandEvent& event); // CPU Mode menu
void OnJITOff(wxCommandEvent& event);

void ToggleCodeWindow(bool bShow);
void ToggleRegisterWindow(bool bShow);
void ToggleWatchWindow(bool bShow);
Expand All @@ -88,14 +84,6 @@ class CCodeWindow : public wxPanel
void ToggleSoundWindow(bool bShow);
void ToggleVideoWindow(bool bShow);

void OnChangeFont(wxCommandEvent& event);

void OnCodeStep(wxCommandEvent& event);
void OnAddrBoxChange(wxCommandEvent& event);
void OnSymbolsMenu(wxCommandEvent& event);
void OnJitMenu(wxCommandEvent& event);
void OnProfilerMenu(wxCommandEvent& event);

// Sub dialogs
CRegisterWindow* m_RegisterWindow;
CWatchWindow* m_WatchWindow;
Expand All @@ -111,6 +99,16 @@ class CCodeWindow : public wxPanel
int iNbAffiliation[IDM_CODE_WINDOW - IDM_LOG_WINDOW + 1];

private:
void OnCPUMode(wxCommandEvent& event);

void OnChangeFont(wxCommandEvent& event);

void OnCodeStep(wxCommandEvent& event);
void OnAddrBoxChange(wxCommandEvent& event);
void OnSymbolsMenu(wxCommandEvent& event);
void OnJitMenu(wxCommandEvent& event);
void OnProfilerMenu(wxCommandEvent& event);

void OnSymbolListChange(wxCommandEvent& event);
void OnSymbolListContextMenu(wxContextMenuEvent& event);
void OnCallstackListChange(wxCommandEvent& event);
Expand Down
19 changes: 10 additions & 9 deletions Source/Core/DolphinWX/Debugger/MemoryView.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,9 @@ class CMemoryView : public wxControl
{
public:
CMemoryView(DebugInterface* debuginterface, wxWindow* parent);
void OnPaint(wxPaintEvent& event);
void OnMouseDownL(wxMouseEvent& event);
void OnMouseMove(wxMouseEvent& event);
void OnMouseUpL(wxMouseEvent& event);
void OnMouseDownR(wxMouseEvent& event);
void OnScrollWheel(wxMouseEvent& event);
void OnPopupMenu(wxCommandEvent& event);

u32 GetSelection() { return selection ; }
int GetMemoryType() { return memory; }
u32 GetSelection() const { return selection ; }
int GetMemoryType() const { return memory; }

void Center(u32 addr)
{
Expand All @@ -36,6 +29,14 @@ class CMemoryView : public wxControl
int curAddress; // Will be accessed by parent

private:
void OnPaint(wxPaintEvent& event);
void OnMouseDownL(wxMouseEvent& event);
void OnMouseMove(wxMouseEvent& event);
void OnMouseUpL(wxMouseEvent& event);
void OnMouseDownR(wxMouseEvent& event);
void OnScrollWheel(wxMouseEvent& event);
void OnPopupMenu(wxCommandEvent& event);

int YToAddress(int y);
void OnResize(wxSizeEvent& event);

Expand Down
27 changes: 14 additions & 13 deletions Source/Core/DolphinWX/Debugger/MemoryWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ class CMemoryWindow : public wxPanel
long style = wxTAB_TRAVERSAL | wxBORDER_NONE,
const wxString& name = _("Memory"));

wxCheckBox* chk8;
wxCheckBox* chk16;
wxCheckBox* chk32;
wxButton* btnSearch;
wxCheckBox* chkAscii;
wxCheckBox* chkHex;
void Save(IniFile& _IniFile) const;
void Load(IniFile& _IniFile);

Expand All @@ -49,13 +43,6 @@ class CMemoryWindow : public wxPanel
private:
DECLARE_EVENT_TABLE()

CMemoryView* memview;
wxListBox* symbols;

wxButton* buttonGo;
wxTextCtrl* addrbox;
wxTextCtrl* valbox;

void U8(wxCommandEvent& event);
void U16(wxCommandEvent& event);
void U32(wxCommandEvent& event);
Expand All @@ -71,4 +58,18 @@ class CMemoryWindow : public wxPanel
void OnDumpMemory(wxCommandEvent& event);
void OnDumpMem2(wxCommandEvent& event);
void OnDumpFakeVMEM(wxCommandEvent& event);

wxCheckBox* chk8;
wxCheckBox* chk16;
wxCheckBox* chk32;
wxButton* btnSearch;
wxCheckBox* chkAscii;
wxCheckBox* chkHex;

CMemoryView* memview;
wxListBox* symbols;

wxButton* buttonGo;
wxTextCtrl* addrbox;
wxTextCtrl* valbox;
};
3 changes: 2 additions & 1 deletion Source/Core/DolphinWX/Debugger/RegisterView.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ class CRegisterView : public wxGrid
public:
CRegisterView(wxWindow* parent, wxWindowID id = wxID_ANY);
void Update() override;

private:
void OnMouseDownR(wxGridEvent& event);
void OnPopupMenu(wxCommandEvent& event);

private:
u32 m_selectedAddress = 0;

// Owned by wx. Deleted implicitly upon destruction.
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/DolphinWX/Debugger/WatchView.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ class CWatchView : public wxGrid
public:
CWatchView(wxWindow* parent, wxWindowID id = wxID_ANY);
void Update() override;

private:
void OnMouseDownR(wxGridEvent& event);
void OnPopupMenu(wxCommandEvent& event);

private:
u32 m_selectedAddress = 0;
u32 m_selectedRow = 0;
CWatchTable* m_watch_table;
Expand Down
7 changes: 6 additions & 1 deletion Source/Core/DolphinWX/InputConfigDiag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ void InputConfigDialog::ClickSave(wxCommandEvent& event)
event.Skip();
}

int ControlDialog::GetRangeSliderValue() const
{
return range_slider->GetValue();
}

void ControlDialog::UpdateListContents()
{
control_lbox->Clear();
Expand Down Expand Up @@ -467,7 +472,7 @@ void GamepadPage::AdjustSettingUI(wxCommandEvent& event)

void GamepadPage::AdjustControlOption(wxCommandEvent&)
{
m_control_dialog->control_reference->range = (ControlState)(m_control_dialog->range_slider->GetValue()) / SLIDER_TICK_COUNT;
m_control_dialog->control_reference->range = (ControlState)(m_control_dialog->GetRangeSliderValue()) / SLIDER_TICK_COUNT;
}

void GamepadPage::ConfigControl(wxEvent& event)
Expand Down
32 changes: 17 additions & 15 deletions Source/Core/DolphinWX/InputConfigDiag.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,35 +98,37 @@ class ControlDialog : public wxDialog
public:
ControlDialog(GamepadPage* const parent, InputConfig& config, ControllerInterface::ControlReference* const ref);

wxStaticBoxSizer* CreateControlChooser(GamepadPage* const parent);
bool Validate() override;

virtual bool Validate() override;
int GetRangeSliderValue() const;

void DetectControl(wxCommandEvent& event);
void ClearControl(wxCommandEvent& event);
void SetDevice(wxCommandEvent& event);
ControllerInterface::ControlReference* const control_reference;
InputConfig& m_config;

private:
wxStaticBoxSizer* CreateControlChooser(GamepadPage* const parent);

void UpdateGUI();
void UpdateListContents();
void SelectControl(const std::string& name);

void DetectControl(wxCommandEvent& event);
void ClearControl(wxCommandEvent& event);
void SetDevice(wxCommandEvent& event);

void SetSelectedControl(wxCommandEvent& event);
void AppendControl(wxCommandEvent& event);

ControllerInterface::ControlReference* const control_reference;
InputConfig& m_config;
wxComboBox* device_cbox;

wxTextCtrl* textctrl;
wxListBox* control_lbox;
wxSlider* range_slider;
bool GetExpressionForSelectedControl(wxString &expr);

private:
GamepadPage* const m_parent;
wxComboBox* device_cbox;
wxTextCtrl* textctrl;
wxListBox* control_lbox;
wxSlider* range_slider;
wxStaticText* m_bound_label;
wxStaticText* m_error_label;
ciface::Core::DeviceQualifier m_devq;
bool GetExpressionForSelectedControl(wxString &expr);
ciface::Core::DeviceQualifier m_devq;
};

class ExtensionButton : public wxButton
Expand Down