bool moved, logging;
FindDialog findDialog { master = this, editBox = editBox, isModal = true, autoCreate = false, text = "Find" };
-
+
BitmapResource bmpCursor { ":codeMarks/cursor.png", window = this };
BitmapResource bmpCursorError { ":codeMarks/cursorError.png", window = this };
BitmapResource bmpTopFrame { ":codeMarks/topFrame.png", window = this };
};
- Menu editMenu { menu, "Edit", e };
+ Menu editMenu { menu, $"Edit", e };
MenuItem item;
-
+
MenuItem copyItem
{
- editMenu, "Copy", c, ctrlC;
+ editMenu, $"Copy", c, ctrlC;
bool NotifySelect(MenuItem selection, Modifiers mods)
{
editBox.Copy();
}
};
MenuDivider { editMenu };
- MenuItem { editMenu, "Find Previous", e, Key { f3, shift = true }, NotifySelect = MenuEditFind, id = 0 };
- MenuItem { editMenu, "Find Next", n, f3, NotifySelect = MenuEditFind, id = 1 };
- MenuItem { editMenu, "Find", f, ctrlF, NotifySelect = MenuEditFind, id = 2 };
+ MenuItem { editMenu, $"Find Previous", e, Key { f3, shift = true }, NotifySelect = MenuEditFind, id = 0 };
+ MenuItem { editMenu, $"Find Next", n, f3, NotifySelect = MenuEditFind, id = 1 };
+ MenuItem { editMenu, $"Find", f, ctrlF, NotifySelect = MenuEditFind, id = 2 };
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)
+ void LogSprintf(const 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();
}
int boxH = clientSize.h;
int lineNumber;
int activeThread, hitThread, signalThread;
-
+
if(OnGetThreadsInfo(&activeThread, &hitThread, &signalThread))
{
EditLine line;