6 class CallStackView : Window
9 borderStyle = sizableDeep;
10 background = { 224, 224, 224 };
15 anchor = Anchor { left = 0, right = 0.2, top = 0 };
18 virtual void OnSelectFrame(int frameIndex);
19 virtual void OnToggleBreakpoint();
22 FindDialog findDialog { master = this, editBox = editBox, isModal = true, autoCreate = false, text = $"Find" };
26 parent = this, freeCaret = true, autoEmpty = true, multiLine = true, readOnly = true;
27 hasVertScroll = true, hasHorzScroll = true, borderStyle = none;
28 anchor = Anchor { left = 20, top = 0, right = 0, bottom = 0 };
29 background = viewsBackground;
30 foreground = viewsText;
31 selectionColor = selectionColor, selectionText = selectionText;
33 bool NotifyDoubleClick(EditBox editBox, EditLine line, Modifiers mods)
36 if(strcmp(editBox.line.text, "..."))
37 frameIndex = atoi(editBox.line.text);
38 OnSelectFrame(frameIndex);
42 bool NotifyKeyDown(EditBox editBox, Key key, unichar ch)
44 if(key == enter || key == keyPadEnter)
47 if(strcmp(editBox.line.text, "..."))
48 frameIndex = atoi(editBox.line.text);
49 OnSelectFrame(frameIndex);
60 void OnVScroll(ScrollBarAction action, int position, Key key)
62 if(anchor.left.distance)
64 Box box { 0, 0, anchor.left.distance-1, parent.clientSize.h - 1 };
67 EditBox::OnVScroll(action, position, key);
71 Menu editMenu { menu, $"Edit", e };
76 editMenu, $"Copy", c, ctrlC;
77 bool NotifySelect(MenuItem selection, Modifiers mods)
83 MenuDivider { editMenu };
84 MenuItem { editMenu, $"Find Previous", e, Key { f3, shift = true }, NotifySelect = MenuEditFind, id = 0 };
85 MenuItem { editMenu, $"Find Next", n, f3, NotifySelect = MenuEditFind, id = 1 };
86 MenuItem { editMenu, $"Find", f, ctrlF, NotifySelect = MenuEditFind, id = 2 };
88 bool MenuEditFind(MenuItem selection, Modifiers mods)
90 int64 id = selection.id;
91 char * searchString = findDialog.searchString;
92 if(id != 2 && searchString[0])
94 editBox.Find(searchString, findDialog.wholeWord, findDialog.matchCase, (bool)id);
101 void Logf(char * format, ...)
103 char string[MAX_F_STRING*10];
105 va_start(args, format);
106 vsnprintf(string, sizeof(string), format, args);
107 string[sizeof(string)-1] = 0;
112 void LogSprintf(char * entry)
114 char string[MAX_F_STRING];
115 sprintf(string, entry);
118 void LogRaw(char * entry)
122 void Log(char * string)
131 editBox.GetSelPos(&line1, &y1, &x1, &line2, &y2, &x2, false);
132 scroll = editBox.scroll;
135 editBox.PutS(string);
136 editBox.Update(null);
139 editBox.scroll = scroll;
140 editBox.SetSelPos(line1, y1, x1, line2, y2, x2);
156 ide.RepositionWindows(false);