X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ide%2Fsrc%2Fpanels%2FCallStackView.ec;h=8f0e3c36534210d95d8c04f6ee7d7d8564b005f9;hb=84e623c3cb902d941ac9967bcf91767bae8f128b;hp=9adbc51679de9b87df76539b07a15da1ceb0645b;hpb=3f984239997719884c762168ec2e5cf3711312f9;p=sdk diff --git a/ide/src/panels/CallStackView.ec b/ide/src/panels/CallStackView.ec index 9adbc51..8f0e3c3 100644 --- a/ide/src/panels/CallStackView.ec +++ b/ide/src/panels/CallStackView.ec @@ -15,43 +15,41 @@ class CallStackView : Window anchor = Anchor { left = 0, right = 0.2, top = 0 }; size.h = 200; - virtual void OnGotoLine(char * line); - virtual void OnSelectFrame(int lineNumber); + virtual void OnSelectFrame(int frameIndex); virtual void OnToggleBreakpoint(); bool moved, logging; FindDialog findDialog { master = this, editBox = editBox, isModal = true, autoCreate = false, text = $"Find" }; - + EditBox editBox { parent = this, freeCaret = true, autoEmpty = true, multiLine = true, readOnly = true; hasVertScroll = true, hasHorzScroll = true, borderStyle = none; anchor = Anchor { left = 20, top = 0, right = 0, bottom = 0 }; - background = viewsBackground; - foreground = viewsText; - selectionColor = selectionColor, selectionText = selectionText; + /* + background = colorScheme.viewsBackground; + foreground = colorScheme.viewsText; + selectionColor = colorScheme.selectionColor; + selectionText = colorScheme.selectionText; + */ bool NotifyDoubleClick(EditBox editBox, EditLine line, Modifiers mods) { - OnGotoLine(editBox.line.text); + int frameIndex = -1; if(strcmp(editBox.line.text, "...")) - { - int lineNumber = atoi(editBox.line.text); - OnSelectFrame(lineNumber); - } - return true; + frameIndex = atoi(editBox.line.text); + OnSelectFrame(frameIndex); + return false; } bool NotifyKeyDown(EditBox editBox, Key key, unichar ch) { if(key == enter || key == keyPadEnter) { - OnGotoLine(editBox.line.text); + int frameIndex = -1; if(strcmp(editBox.line.text, "...")) - { - int lineNumber = atoi(editBox.line.text); - OnSelectFrame(lineNumber); - } + frameIndex = atoi(editBox.line.text); + OnSelectFrame(frameIndex); return false; } if(key == f9) @@ -75,7 +73,7 @@ class CallStackView : Window Menu editMenu { menu, $"Edit", e }; MenuItem item; - + MenuItem copyItem { editMenu, $"Copy", c, ctrlC; @@ -92,18 +90,18 @@ class CallStackView : Window bool MenuEditFind(MenuItem selection, Modifiers mods) { - int id = selection.id; - char * searchString = findDialog.searchString; + int64 id = selection.id; + const char * searchString = findDialog.searchString; if(id != 2 && searchString[0]) { - editBox.Find(searchString, findDialog.wholeWord, findDialog.matchCase, id); + editBox.Find(searchString, findDialog.wholeWord, findDialog.matchCase, id != 0); return true; } findDialog.Create(); return true; } - void Logf(char * format, ...) + void Logf(const char * format, ...) { char string[MAX_F_STRING*10]; va_list args; @@ -114,17 +112,12 @@ class CallStackView : Window Log(string); } - void LogSprintf(char * entry) - { - char string[MAX_F_STRING]; - sprintf(string, entry); - Log(string); - } - void LogRaw(char * entry) + + void LogRaw(const char * entry) { Log(entry); } - void Log(char * string) + void Log(const char * string) { EditLine line1; EditLine line2; @@ -158,6 +151,7 @@ class CallStackView : Window void Show() { visible = true; + ide.RepositionWindows(false); Activate(); } }