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)
Menu editMenu { menu, $"Edit", e };
MenuItem item;
-
+
MenuItem copyItem
{
editMenu, $"Copy", c, ctrlC;
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;
va_start(args, format);
- vsprintf(string, format, args);
+ vsnprintf(string, sizeof(string), format, args);
+ string[sizeof(string)-1] = 0;
va_end(args);
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;
void Show()
{
visible = true;
+ ide.RepositionWindows(false);
Activate();
}
}