1 // Copyright (C) 2003 Dolphin Project.
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, version 2.0.
7 // This program is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 // GNU General Public License 2.0 for more details.
12 // A copy of the GPL 2.0 should have been included with the program.
13 // If not, see http://www.gnu.org/licenses/
15 // Official SVN repository and contact information can be found at
16 // http://code.google.com/p/dolphin-emu/
22 #include <wx/dialog.h>
23 #include <wx/textctrl.h>
24 #include <wx/listbox.h>
25 #include <wx/artprov.h>
28 #include "CoreParameter.h"
31 #include "../../DolphinWX/Src/Globals.h"
32 #include "../../DolphinWX/Src/Frame.h"
35 class CRegisterWindow
;
36 class CBreakPointWindow
;
46 CCodeWindow(const SCoreStartupParameter
& _LocalCoreStartupParameter
,
48 wxWindowID id
= wxID_ANY
,
49 const wxPoint
& pos
= wxDefaultPosition
,
50 const wxSize
& size
= wxDefaultSize
,
51 long style
= wxTAB_TRAVERSAL
,
52 const wxString
& name
= wxT("Code")
61 wxMenuBar
* GetMenuBar();
62 wxAuiToolBar
* GetToolBar();
63 int GetNootebookAffiliation(wxString
);
64 wxBitmap m_Bitmaps
[ToolbarDebugBitmapMax
];
66 bool UseInterpreter();
68 bool AutomaticStart();
69 bool JITNoBlockCache();
70 bool JITBlockLinking();
71 void JumpToAddress(u32 _Address
);
74 void NotifyMapLoaded();
75 void CreateMenu(const SCoreStartupParameter
& _LocalCoreStartupParameter
, wxMenuBar
* pMenuBar
);
76 void CreateMenuView(wxMenuBar
* pMenuBar
, wxMenu
*);
77 void CreateMenuOptions(wxMenuBar
* pMenuBar
, wxMenu
*);
78 void CreateMenuSymbols();
79 void RecreateToolbar(wxAuiToolBar
*);
80 void PopulateToolbar(wxAuiToolBar
* toolBar
);
81 void UpdateButtonStates();
86 // -------------------
87 void OnCPUMode(wxCommandEvent
& event
); // CPU Mode menu
88 void OnJITOff(wxCommandEvent
& event
);
90 void OnToggleWindow(wxCommandEvent
& event
);
91 void ToggleCodeWindow(bool bShow
);
92 void ToggleRegisterWindow(bool bShow
);
93 void ToggleBreakPointWindow(bool bShow
);
94 void ToggleMemoryWindow(bool bShow
);
95 void ToggleJitWindow(bool bShow
);
96 void ToggleDLLWindow(int Id
, bool bShow
);
98 void OnChangeFont(wxCommandEvent
& event
);
100 void OnCodeStep(wxCommandEvent
& event
);
101 void OnAddrBoxChange(wxCommandEvent
& event
);
102 void OnSymbolsMenu(wxCommandEvent
& event
);
103 void OnJitMenu(wxCommandEvent
& event
);
104 void OnProfilerMenu(wxCommandEvent
& event
);
108 CRegisterWindow
* m_RegisterWindow
;
109 CBreakPointWindow
* m_BreakpointWindow
;
110 CMemoryWindow
* m_MemoryWindow
;
111 CJitWindow
* m_JitWindow
;
114 bool bAutomaticStart
; bool bBootToPause
;
117 bool bCodeWindow
; int iCodeWindow
;
118 bool bRegisterWindow
; int iRegisterWindow
;
119 bool bBreakpointWindow
; int iBreakpointWindow
;
120 bool bMemoryWindow
; int iMemoryWindow
;
121 bool bJitWindow
; int iJitWindow
;
122 bool bSoundWindow
; int iSoundWindow
;
123 bool bVideoWindow
; int iVideoWindow
;
129 // Debugger GUI Objects
137 void OnSymbolListChange(wxCommandEvent
& event
);
138 void OnSymbolListContextMenu(wxContextMenuEvent
& event
);
139 void OnCallstackListChange(wxCommandEvent
& event
);
140 void OnCallersListChange(wxCommandEvent
& event
);
141 void OnCallsListChange(wxCommandEvent
& event
);
142 void OnCodeViewChange(wxCommandEvent
&event
);
143 void SingleCPUStep();
144 void OnHostMessage(wxCommandEvent
& event
);
147 void UpdateCallstack();
148 void OnStatusBar(wxMenuEvent
& event
); void OnStatusBar_(wxUpdateUIEvent
& event
);
149 void DoTip(wxString text
);
150 void OnKeyDown(wxKeyEvent
& event
);
153 void CreateGUIControls(const SCoreStartupParameter
& _LocalCoreStartupParameter
);
155 wxMenuItem
* jitblocklinking
, *jitnoblockcache
, *jitoff
;
156 wxMenuItem
* jitlsoff
, *jitlslxzoff
, *jitlslwzoff
, *jitlslbzxoff
;
157 wxMenuItem
* jitlspoff
;
158 wxMenuItem
* jitlsfoff
;
159 wxMenuItem
* jitfpoff
;
162 wxMenuItem
* jitsroff
;
164 std::string fontDesc
;
167 wxListBox
* callstack
;
171 Common::Event sync_event
;
173 DECLARE_EVENT_TABLE()
176 #endif /*CODEWINDOW_*/