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 };
30 background = colorScheme.viewsBackground;
31 foreground = colorScheme.viewsText;
32 selectionColor = colorScheme.selectionColor;
33 selectionText = colorScheme.selectionText;
36 bool NotifyDoubleClick(EditBox editBox, EditLine line, Modifiers mods)
39 if(strcmp(editBox.line.text, "..."))
40 frameIndex = atoi(editBox.line.text);
41 OnSelectFrame(frameIndex);
45 bool NotifyKeyDown(EditBox editBox, Key key, unichar ch)
47 if(key == enter || key == keyPadEnter)
50 if(strcmp(editBox.line.text, "..."))
51 frameIndex = atoi(editBox.line.text);
52 OnSelectFrame(frameIndex);
63 void OnVScroll(ScrollBarAction action, int position, Key key)
65 if(anchor.left.distance)
67 Box box { 0, 0, anchor.left.distance-1, parent.clientSize.h - 1 };
70 EditBox::OnVScroll(action, position, key);
74 Menu editMenu { menu, $"Edit", e };
79 editMenu, $"Copy", c, ctrlC;
80 bool NotifySelect(MenuItem selection, Modifiers mods)
86 MenuDivider { editMenu };
87 MenuItem { editMenu, $"Find Previous", e, Key { f3, shift = true }, NotifySelect = MenuEditFind, id = 0 };
88 MenuItem { editMenu, $"Find Next", n, f3, NotifySelect = MenuEditFind, id = 1 };
89 MenuItem { editMenu, $"Find", f, ctrlF, NotifySelect = MenuEditFind, id = 2 };
91 bool MenuEditFind(MenuItem selection, Modifiers mods)
93 int64 id = selection.id;
94 const char * searchString = findDialog.searchString;
95 if(id != 2 && searchString[0])
97 editBox.Find(searchString, findDialog.wholeWord, findDialog.matchCase, id != 0);
104 void Logf(const char * format, ...)
106 char string[MAX_F_STRING*10];
108 va_start(args, format);
109 vsnprintf(string, sizeof(string), format, args);
110 string[sizeof(string)-1] = 0;
116 void LogRaw(const char * entry)
120 void Log(const char * string)
129 editBox.GetSelPos(&line1, &y1, &x1, &line2, &y2, &x2, false);
130 scroll = editBox.scroll;
133 editBox.PutS(string);
134 editBox.Update(null);
137 editBox.scroll = scroll;
138 editBox.SetSelPos(line1, y1, x1, line2, y2, x2);
154 ide.RepositionWindows(false);