22 #ifndef DIRECTOR_DEBUGER_DT_INTERNAL_H 23 #define DIRECTOR_DEBUGER_DT_INTERNAL_H 25 #ifndef IMGUI_DEFINE_MATH_OPERATORS 26 #define IMGUI_DEFINE_MATH_OPERATORS 29 #include "graphics/surface.h" 31 #include "backends/imgui/imgui.h" 32 #include "backends/imgui/imgui_fonts.h" 33 #include "backends/imgui/components/imgui_logger.h" 34 #include "backends/imgui/components/imgui_memory_editor.h" 36 #include "director/types.h" 37 #include "director/window.h" 38 #include "director/lingo/lingo.h" 39 #include "director/lingo/lingodec/ast.h" 40 #include "director/lingo/lingodec/handler.h" 45 #define kMaxColumnsInTable 512 60 bool showByteCode =
false;
69 bool isMethod =
false;
70 bool isGenericEvent =
false;
81 return moviePath == c.moviePath && score == c.score &&
id == c.id && handlerId == c.handlerId;
89 bool controlPanel =
true;
91 bool channels =
false;
93 bool castDetails =
false;
94 bool funcList =
false;
97 bool settings =
false;
100 bool watchedVars =
false;
101 bool executionContext =
false;
102 bool scripts =
false;
104 bool imageViewer =
false;
105 bool windows =
false;
107 bool profiler =
false;
111 enum DebuggerAction {
118 kActToggleControlPanel,
121 kActToggleMouseIgnore,
129 ImGuiKeyChord defaultChord;
143 bool _showByteCode =
false;
144 bool _showScript =
false;
145 bool _scrollToCurrent =
false;
160 ImU32 tableLightColor;
161 ImU32 tableDarkColor;
163 ImU32 sidebarTextColor;
165 ImU32 playhead_color;
166 ImU32 current_statement_bg;
167 ImU32 channel_toggle;
168 ImU32 channel_hide_bg;
169 ImU32 channelSelectedCol;
170 ImU32 channelHoveredCol;
194 ImVec4 var_ref_out_of_scope;
229 bool isHandler =
false;
231 ScriptType scriptType = kScoreScript;
237 const Cast *cast =
nullptr;
252 float _sidebarWidth = 60.0f;
253 float _cellWidth = 14.0f;
254 float _cellHeight = 22.0f;
255 int _visibleFrames = 60;
256 int _visibleChannels = 20;
257 float _tableWidth = _cellWidth * _visibleFrames;
258 float _tableHeight = _cellHeight * _visibleChannels;
259 float _rulerHeight = 30.0f;
260 float _rulerWidth = _cellWidth * _visibleFrames;
261 float _sidebar1Height = _cellHeight * 6;
262 float _labelBarHeight = _cellHeight;
263 float _cellHeightExtended = 5 * _cellHeight;
267 int xSliderValue = 1;
268 int channelScrollOffset = 1;
273 bool _listView =
true;
274 bool _showGridNumbers =
false;
275 int _thumbnailSize = 64;
277 int _typeFilter = 0xFFFF;
282 bool _showScriptContexts =
true;
294 bool _isScriptDirty =
false;
295 bool _hostExecutionContext =
false;
296 bool _scrollToPC =
false;
297 uint _lastLinePC = 0;
298 uint _callstackSize = 0;
300 bool _suppressHighlight =
false;
304 char input[256] = {};
306 int mode = kSearchAll;
317 uint32 _lastTimeRefreshed = 0;
331 char *buffer =
nullptr;
332 size_t bufferSize = 0;
338 bool _wasHidden =
false;
341 bool _showCompleteScript =
true;
344 bool _quickOpen =
false;
345 char _quickOpenInput[256] = {};
348 bool _pickMode =
false;
351 ImGuiKeyChord _shortcuts[kActCount] = {};
352 int _shortcutCapture = -1;
353 ImGuiKeyChord _shortcutPending = ImGuiKey_None;
360 bool isMainChannel =
false;
361 } _selectedScoreCast;
382 int _scoreFrameOffset = 1;
383 int _scorePageSlider = 0;
384 int _selectedChannel = -1;
385 bool _scrollToChannel =
false;
387 ImFont *_tinyFont =
nullptr;
389 int _activeThemeID = kThemeLight;
397 byte *data =
nullptr;
404 bool _ignoreMouse =
false;
405 bool _enableMultiViewport =
true;
407 Window *_windowToRedraw =
nullptr;
414 bool _quickOpenGathered =
false;
427 void setScriptToDisplay(
const ImGuiScript &script);
434 void showImage(
const ImGuiImage &image,
const char *name,
float thumbnailSize);
435 void showImageWrappedBorder(
const ImGuiImage &image,
const char *name,
float size);
436 ImVec4 convertColor(uint32 color);
437 void displayVariable(
const Common::String &name,
bool changed,
bool outOfScope =
false);
442 bool selectableViewButton(
const char *label,
bool selected);
444 void setTheme(
int themeIndex);
449 dl->AddLine(
ImVec2(min.x, min.y),
ImVec2(max.x, min.y), col, thickness);
450 dl->AddLine(
ImVec2(max.x, min.y),
ImVec2(max.x, max.y), col, thickness);
451 dl->AddLine(
ImVec2(max.x, max.y),
ImVec2(min.x, max.y), col, thickness);
452 dl->AddLine(
ImVec2(min.x, max.y),
ImVec2(min.x, min.y), col, thickness);
456 void showImageViewer();
457 void showCastDetails();
458 void showControlPanel();
459 void handleDebuggerShortcuts();
464 void initShortcuts();
465 void resetShortcuts();
467 bool actionTriggered(DebuggerAction act);
471 void showWatchedVars();
472 void showBreakpointList();
480 void renderOldScriptAST(
ImGuiScript &script,
bool showByteCode,
bool scrollTo);
481 void renderScriptAST(
ImGuiScript &script,
bool showByteCode,
bool scrollTo);
485 void showExecutionContext();
486 void showScriptsWindow();
487 void showQuickOpen();
490 void saveCurrentState();
491 void loadSavedState();
495 void showSearchBar();
Definition: dt-internal.h:227
Definition: dt-internal.h:53
Definition: dt-internal.h:47
Definition: dt-internal.h:125
Definition: dt-internal.h:159
Definition: dt-internal.h:148
Definition: dt-internal.h:88
Definition: imgui_memory_editor.h:83
Definition: dt-internal.h:251
Definition: dt-internal.h:140
Definition: dt-internal.h:236
Definition: dt-internal.h:245
Definition: imgui_logger.h:33
Definition: dt-internal.h:266
Definition: dt-internal.h:243
Definition: debugger.h:45
Definition: dt-internal.h:58
Definition: castmember.h:48
Definition: lingo-object.h:213