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")
60 wxMenuBar
* GetMenuBar();
61 wxAuiToolBar
* GetToolBar();
62 wxBitmap m_Bitmaps
[ToolbarDebugBitmapMax
];
64 bool UseInterpreter();
66 bool AutomaticStart();
67 bool JITNoBlockCache();
68 bool JITBlockLinking();
69 void JumpToAddress(u32 _Address
);
72 void NotifyMapLoaded();
73 void CreateMenu(const SCoreStartupParameter
& _LocalCoreStartupParameter
,
74 wxMenuBar
* pMenuBar
);
75 void CreateMenuView(wxMenuBar
* pMenuBar
, wxMenu
*);
76 void CreateMenuOptions(wxMenuBar
* pMenuBar
, wxMenu
*);
77 void CreateMenuSymbols();
78 void RecreateToolbar(wxAuiToolBar
*);
79 void PopulateToolbar(wxAuiToolBar
* toolBar
);
80 void UpdateButtonStates();
85 // -------------------
86 void OnCPUMode(wxCommandEvent
& event
); // CPU Mode menu
87 void OnJITOff(wxCommandEvent
& event
);
89 void OnToggleWindow(wxCommandEvent
& event
);
90 void ToggleCodeWindow(bool bShow
);
91 void ToggleRegisterWindow(bool bShow
);
92 void ToggleBreakPointWindow(bool bShow
);
93 void ToggleMemoryWindow(bool bShow
);
94 void ToggleJitWindow(bool bShow
);
95 void ToggleDLLWindow(int Id
, bool bShow
);
97 void OnChangeFont(wxCommandEvent
& event
);
99 void OnCodeStep(wxCommandEvent
& event
);
100 void OnAddrBoxChange(wxCommandEvent
& event
);
101 void OnSymbolsMenu(wxCommandEvent
& event
);
102 void OnJitMenu(wxCommandEvent
& event
);
103 void OnProfilerMenu(wxCommandEvent
& event
);
107 CRegisterWindow
* m_RegisterWindow
;
108 CBreakPointWindow
* m_BreakpointWindow
;
109 CMemoryWindow
* m_MemoryWindow
;
110 CJitWindow
* m_JitWindow
;
113 bool bAutomaticStart
; bool bBootToPause
;
116 bool bCodeWindow
; int iCodeWindow
;
117 bool bRegisterWindow
; int iRegisterWindow
;
118 bool bBreakpointWindow
; int iBreakpointWindow
;
119 bool bMemoryWindow
; int iMemoryWindow
;
120 bool bJitWindow
; int iJitWindow
;
121 bool bSoundWindow
; int iSoundWindow
;
122 bool bVideoWindow
; int iVideoWindow
;
128 // Debugger GUI Objects
136 void OnSymbolListChange(wxCommandEvent
& event
);
137 void OnSymbolListContextMenu(wxContextMenuEvent
& event
);
138 void OnCallstackListChange(wxCommandEvent
& event
);
139 void OnCallersListChange(wxCommandEvent
& event
);
140 void OnCallsListChange(wxCommandEvent
& event
);
141 void OnCodeViewChange(wxCommandEvent
&event
);
142 void SingleCPUStep();
143 void OnHostMessage(wxCommandEvent
& event
);
146 void UpdateCallstack();
147 void OnKeyDown(wxKeyEvent
& event
);
150 void CreateGUIControls(const SCoreStartupParameter
& _LocalCoreStartupParameter
);
152 wxMenuItem
* jitblocklinking
, *jitnoblockcache
, *jitoff
;
153 wxMenuItem
* jitlsoff
, *jitlslxzoff
, *jitlslwzoff
, *jitlslbzxoff
;
154 wxMenuItem
* jitlspoff
;
155 wxMenuItem
* jitlsfoff
;
156 wxMenuItem
* jitfpoff
;
159 wxMenuItem
* jitsroff
;
161 std::string fontDesc
;
164 wxListBox
* callstack
;
168 Common::Event sync_event
;
170 DECLARE_EVENT_TABLE()
173 #endif // CODEWINDOW_H_