import "FileSystemIterator"
-AVLTree<String> binaryDocExt
+AVLTree<const String> binaryDocExt
{ [
"wav", "mp3", "flac", "ogg",
"mid",
{
parent = this;
- void OnGotoError(char * line, bool noParsing)
+ void OnGotoError(const char * line, bool noParsing)
{
ide.GoToError(line, noParsing);
}
- void OnCodeLocationParseAndGoTo(char * line)
+ void OnCodeLocationParseAndGoTo(const char * line)
{
ide.CodeLocationParseAndGoTo(line, ide.findInFilesDialog.findProject, ide.findInFilesDialog.findDir);
}
if(activeFrame)
{
bool error;
- int lineCursor, lineTopFrame, activeThread, hitThread;
+ int lineCursor, lineTopFrame;
int lineH, scrollY, boxH;
BitmapResource bmp;
Breakpoint bp = null;
boxH = clientSize.h;
scrollY = editBox.scroll.y;
displaySystem.FontExtent(editBox.font.font, " ", 1, null, &lineH);
- activeThread = debugger.activeThread;
- hitThread = debugger.hitThread;
+ //activeThread = debugger.activeThread;
+ //hitThread = debugger.hitThread;
debugger.GetCallStackCursorLine(&error, &lineCursor, &lineTopFrame);
// TODO: improve bp drawing... it should be visible even if it's not on the activeFrame
bool gotWhatWeWant = false;
int c;
int numSelections = ideFileDialog.numSelections;
- char ** multiFilePaths = ideFileDialog.multiFilePaths;
+ const char * const * multiFilePaths = ideFileDialog.multiFilePaths;
for(c = 0; c < numSelections; c++)
{
master = this, parent = this;
//anchor = { left = 100, top = 100, right = 100, bottom = 100 };
- void OnCommand(char * string)
+ void OnCommand(const char * string)
{
if(ide)
ide.debugger.SendGDBCommand(string);
}
}
- ProjectView CreateProjectView(Workspace workspace, char * fileName)
+ ProjectView CreateProjectView(Workspace workspace, const char * fileName)
{
Project project = workspace.projects.firstIterator.data;
projectView = ProjectView
if(this)
{
Window child;
- bool inDebugMode = debugger.isActive;
bool callStackVisible = expand ? false : callStackView.visible;
bool threadsVisible = expand ? false : threadsView.visible;
bool watchesVisible = expand ? false : watchesView.visible;
anchor.left = (sheet.visible || (projectView && projectView.visible)) ? 300 : 0;
anchor.right = toolBoxVisible ? 150 : 0;
}
- child.anchor = anchor;
+ if(ide.projectView)
+ child.anchor = anchor;
}
else if(expand)
{
}
// If this is not here, the IDE is not updated when doing Debug/Break then Alt-4 to show call stack (IDE not updated)
Update(null);
+ if(duck.visible) duck.Update(null); // TOFIX: If this is not here, the duck disappears -- Why?
}
}
return false;
}
- void DocumentSaved(Window document, char * fileName)
+ void DocumentSaved(Window document, const char * fileName)
{
ideSettings.AddRecentFile(fileName);
ide.UpdateRecentMenus();
settingsContainer.Save();
}
- bool Window::OnFileModified(FileChange fileChange, char * param)
+ bool Window::OnFileModified(FileChange fileChange, const char * param)
{
char temp[4096];
sprintf(temp, $"The document %s was modified by another application.\n"
bool running = isDebuggerRunning;
bool stopped = isDebuggerStopped;
bool active = debugger.isActive;
- bool noBreakpointToggle = !project;
bool isNotRunning = unavailable || !running;
bool isNotNotRunning = unavailable || running;
}
}
- void ChangeFileDialogsDirectory(char * directory, bool saveSettings)
+ void ChangeFileDialogsDirectory(const char * directory, bool saveSettings)
{
char tempString[MAX_LOCATION];
strcpy(tempString, directory);
settingsContainer.Save();
}
- Window FindWindow(char * filePath)
+ Window FindWindow(const char * filePath)
{
Window document = null;
// TOCHECK: Do we need to change slashes here?
for(document = firstChild; document; document = document.next)
{
- char * fileName = document.fileName;
+ const char * fileName = document.fileName;
if(document.isDocument && fileName && !fstrcmp(fileName, filePath))
{
document.visible = true;
return null;
}
- bool DontTerminateDebugSession(char * title)
+ bool DontTerminateDebugSession(const char * title)
{
if(debugger.isActive)
{
return false;
}
- Window OpenFile(char * origFilePath, bool dontMaximize, bool visible, char * type, OpenCreateIfFails createIfFails, OpenMethod openMethod, bool noParsing)
+ Window OpenFile(const char * origFilePath, bool dontMaximize, bool visible, const char * type, OpenCreateIfFails createIfFails, OpenMethod openMethod, bool noParsing)
{
char extension[MAX_EXTENSION] = "";
Window document = null;
bool isProject = false;
bool needFileModified = true;
char winFilePath[MAX_LOCATION];
- char * filePath = strstr(origFilePath, "http://") == origFilePath ? strcpy(winFilePath, origFilePath) : GetSystemPathBuffer(winFilePath, origFilePath);
+ const char * filePath = strstr(origFilePath, "http://") == origFilePath ? strcpy(winFilePath, origFilePath) : GetSystemPathBuffer(winFilePath, origFilePath);
Window currentDoc = activeClient;
bool maximizeDoc = !dontMaximize && ((currentDoc && currentDoc.state == maximized) || (!currentDoc && !projectView));
if(!type)
{
for(document = firstChild; document; document = document.next)
{
- char * fileName = document.fileName;
+ const char * fileName = document.fileName;
if(document.isDocument && fileName && !fstrcmp(fileName, filePath) && document.created)
{
document.visible = true;
{
for(;;)
{
- Project project;
Workspace workspace = null;
if(FileExists(filePath))
workspace = LoadWorkspace(filePath, null);
else
return null;
- //project = LoadProject(filePath, null);
}
if(workspace)
{
- char absolutePath[MAX_LOCATION];
CreateProjectView(workspace, filePath);
document = projectView;
prj = LoadProject(filePath, null);
if(prj)
{
- char * activeConfigName = null;
+ const char * activeConfigName = null;
CompilerConfig compiler = ideSettings.GetCompilerConfig(workspace.compiler);
prj.StartMonitoring();
workspace.projects.Add(prj);
void CodeLocationParseAndGoTo(const char * text, Project project, const char * dir)
{
char *s = null;
- char *path = text;
+ const char *path = text;
char *colon = strchr(text, ':');
char filePath[MAX_LOCATION] = "";
char completePath[MAX_LOCATION];
{
if(passThrough)
{
- char * arg = app.argv[c];
+ const char * arg = app.argv[c];
char * buf = new char[strlen(arg)*2+1];
if(ptArg++ > 0)
passArgs.concat(" ");
IDEWorkSpace()
{
// Graphics Driver Menu
- int c;
/*
app.currentSkin.selectionColor = selectionColor;
Menu recentProjects = fileMenu.FindMenu($"Recent Projects");
char * itemPath = new char[MAX_LOCATION];
char * itemName = new char[MAX_LOCATION+4];
- MenuItem item;
recentFiles.Clear();
c = 0;
define sdkDirName = "ecere";
#endif
-bool GetInstalledFileOrFolder(char * subDir, char * name, char * path, FileAttribs attribs)
+bool GetInstalledFileOrFolder(const char * subDir, const char * name, char * path, FileAttribs attribs)
{
bool found = false;
char * v = new char[maxPathLen];
#else
if(!found)
{
- byte * tokens[256];
+ char * tokens[256];
int c, numTokens;
GetEnvironment("XDG_DATA_DIRS", v, maxPathLen);
return found;
}
-void FindAndShellOpenInstalledFolder(char * name)
+void FindAndShellOpenInstalledFolder(const char * name)
{
char path[MAX_LOCATION];
if(GetInstalledFileOrFolder(name, null, path, { isDirectory = true }))
ShellOpen(path);
}
-void FindAndShellOpenInstalledFile(char * subdir, char * name)
+void FindAndShellOpenInstalledFile(const char * subdir, const char * name)
{
char path[MAX_LOCATION];
if(GetInstalledFileOrFolder(subdir, name, path, { isFile = true }))
{
bool preserveRootFolder;
- void OutFolder(char * folderPath, bool isRoot)
+ void OutFolder(const char * folderPath, bool isRoot)
{
if(!(preserveRootFolder && isRoot))
RemoveDir(folderPath);
}
- bool OnFile(char * filePath)
+ bool OnFile(const char * filePath)
{
DeleteFile(filePath);
return true;
if(ideSettings.language)
{
- String language = GetLanguageString();
+ const String language = GetLanguageString();
if(ideSettings.language.OnCompare(language))
{
LanguageRestart(ideSettings.language, app, null, null, null, null, true);
}
if(!LoadIncludeFile())
- PrintLn("error: unable to load :crossplatform.mk file inside ide binary.");
+ PrintLn($"error: unable to load :crossplatform.mk file inside ide binary.");
// Create language menu
{
char genericLocale[256];
i = 0;
strncpy(genericLocale, language, sizeof(genericLocale));
- genericLocale[sizeof(genericLocale)] = 0;
+ genericLocale[sizeof(genericLocale)-1] = 0;
under = strchr(genericLocale, '_');
if(under)